summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx18
1 files changed, 13 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",