summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-27 14:20:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-27 14:20:30 (GMT)
commit120945587f52816ba8b5fac1853fd82223341837 (patch)
treef0c3925de54d28add37b96c422aebd6ef3012796 /Source/CTest
parenta48d668d187b04fe1fe6edbd4123d762322adca6 (diff)
parent65260d6c1e09fbe2dd15e1b01a04c729c9d5bd6f (diff)
downloadCMake-120945587f52816ba8b5fac1853fd82223341837.zip
CMake-120945587f52816ba8b5fac1853fd82223341837.tar.gz
CMake-120945587f52816ba8b5fac1853fd82223341837.tar.bz2
Merge topic 'ctest_ninja_full_output'
65260d6c1e ctest: only report make-level errors when no others are found Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7710
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx35
1 files changed, 25 insertions, 10 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 2aba79d..66c30c0 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -893,16 +893,31 @@ int cmCTestBuildHandler::RunMakeCommand(const std::string& command,
// If there was an error running command, report that on the
// dashboard.
if (this->UseCTestLaunch) {
- cmCTestLaunchReporter reporter;
- reporter.RealArgs = args;
- reporter.ComputeFileNames();
- reporter.ExitCode = *retVal;
- reporter.Process = cp;
- // Use temporary BuildLog file to populate this error for CDash.
- ofs.flush();
- reporter.LogOut = this->LogFileNames["Build"];
- reporter.LogOut += ".tmp";
- reporter.WriteXML();
+ // For launchers, do not record this top-level error if other
+ // more granular build errors have already been captured.
+ bool launcherXMLFound = false;
+ cmsys::Directory launchDir;
+ launchDir.Load(this->CTestLaunchDir);
+ unsigned long n = launchDir.GetNumberOfFiles();
+ for (unsigned long i = 0; i < n; ++i) {
+ const char* fname = launchDir.GetFile(i);
+ if (cmHasLiteralSuffix(fname, ".xml")) {
+ launcherXMLFound = true;
+ break;
+ }
+ }
+ if (!launcherXMLFound) {
+ cmCTestLaunchReporter reporter;
+ reporter.RealArgs = args;
+ reporter.ComputeFileNames();
+ reporter.ExitCode = *retVal;
+ reporter.Process = cp;
+ // Use temporary BuildLog file to populate this error for CDash.
+ ofs.flush();
+ reporter.LogOut = this->LogFileNames["Build"];
+ reporter.LogOut += ".tmp";
+ reporter.WriteXML();
+ }
} else {
cmCTestBuildErrorWarning errorwarning;
errorwarning.LineNumber = 0;