diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCTest.cxx | 18 | ||||
-rw-r--r-- | Source/cmCTest.h | 3 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 66507a7..f60a1e9 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2116,11 +2116,7 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, return false; } i++; - this->Impl->TestHandler.SetJUnitXMLFileName(std::string(args[i])); - // Turn test output compression off. - // This makes it easier to include test output in the resulting - // JUnit XML report. - this->Impl->CompressTestOutput = false; + this->SetOutputJUnitFileName(std::string(args[i])); } cm::string_view noTestsPrefix = "--no-tests="; @@ -2458,6 +2454,9 @@ bool cmCTest::SetArgsFromPreset(const std::string& presetName, if (!expandedPreset->Output->OutputLogFile.empty()) { this->SetOutputLogFileName(expandedPreset->Output->OutputLogFile); } + if (!expandedPreset->Output->OutputJUnitFile.empty()) { + this->SetOutputJUnitFileName(expandedPreset->Output->OutputJUnitFile); + } this->Impl->LabelSummary = expandedPreset->Output->LabelSummary.value_or(true); @@ -3541,6 +3540,15 @@ void cmCTest::SetOutputLogFileName(const std::string& name) } } +void cmCTest::SetOutputJUnitFileName(const std::string& name) +{ + this->Impl->TestHandler.SetJUnitXMLFileName(name); + // Turn test output compression off. + // This makes it easier to include test output in the resulting + // JUnit XML report. + this->Impl->CompressTestOutput = false; +} + static const char* cmCTestStringLogType[] = { "DEBUG", "OUTPUT", "HANDLER_OUTPUT", diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 551c116..0017b3e 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -359,6 +359,9 @@ public: /** Set the output log file name */ void SetOutputLogFileName(const std::string& name); + /** Set the output JUnit file name */ + void SetOutputJUnitFileName(const std::string& name); + /** Set the visual studio or Xcode config type */ void SetConfigType(const std::string& ct); |