diff options
| author | Leitwolf | 2026-11-01 15:29:13 +0300 |
|---|---|---|
| committer | GitHub | 2026-11-01 15:29:13 +0300 |
| commit | b7fe8c2061c98e7aec886e9b1e6282f48c3b5456 (patch) | |
| tree | f933300c29658c3eb89d126d74b6c30fdff9dd04 /src/Progmasoft/Runner/Options.cpp | |
| parent | 1559307a6ac7731ffd6a8e28147552b3987dbd93 (diff) | |
| parent | 569620dad14df7e13bb9fd31d256e9fd873ef6ec (diff) | |
| download | catch3-b7fe8c2061c98e7aec886e9b1e6282f48c3b5456.tar.gz | |
Merge pull request #28 from Progmasoft/feature/result-import
Import the results of other test frameworks
Diffstat (limited to 'src/Progmasoft/Runner/Options.cpp')
| -rw-r--r-- | src/Progmasoft/Runner/Options.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/Progmasoft/Runner/Options.cpp b/src/Progmasoft/Runner/Options.cpp index c59d7e40..383ed68d 100644 --- a/src/Progmasoft/Runner/Options.cpp +++ b/src/Progmasoft/Runner/Options.cpp @@ -683,6 +683,59 @@ namespace Progmasoft::Catch3::Runner options.replayFailures = true; return Status::Ok(); }}, + {"import", + '\0', + Takes::kValue, + "FILE", + "Importing results", + "read a report of another framework instead of running tests " + "(repeatable)", + [](Options &options, const std::optional<std::string> &value) { + options.mode = Mode::kImport; + options.importFiles.push_back(*value); + return Status::Ok(); + }}, + {"import-format", + '\0', + Takes::kValue, + "FORMAT", + "Importing results", + "auto (default), catch3, junit, xunit, trx, tap or ctrf", + [](Options &options, const std::optional<std::string> &value) { + return ReadChoice<ImportFormat>( + value, + "import-format", + {{"auto", ImportFormat::kAuto}, + {"catch3", ImportFormat::kCatch3}, + {"junit", ImportFormat::kJUnit}, + {"xunit", ImportFormat::kXUnit}, + {"trx", ImportFormat::kTrx}, + {"tap", ImportFormat::kTap}, + {"ctrf", ImportFormat::kCtrf}}, + options.importFormat); + }}, + {"import-name", + '\0', + Takes::kValue, + "NAME", + "Importing results", + "the history imported results go to (default: imported); " + "--analytics reads it too", + [](Options &options, const std::optional<std::string> &value) { + options.importName = *value; + return Status::Ok(); + }}, + {"import-revision", + '\0', + Takes::kValue, + "REVISION", + "Importing results", + "what the reports tested; a verdict that changes on one " + "revision counts as flaky", + [](Options &options, const std::optional<std::string> &value) { + options.importRevision = *value; + return Status::Ok(); + }}, {"analytics", '\0', Takes::kOptionalValue, |