summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorSylvain Joubert <joubert.sy@gmail.com>2021-01-05 09:11:29 (GMT)
committerSylvain Joubert <joubert.sy@gmail.com>2021-01-05 09:32:33 (GMT)
commit1bcd9b06b920eeadf0a574490dbd82bc78a46719 (patch)
treed0ba2983872f93d74db0ed70e82182e1edbe6fdc /Source/CTest
parent764ce15ffbe232347a41e40509a2e485bae226f6 (diff)
downloadCMake-1bcd9b06b920eeadf0a574490dbd82bc78a46719.zip
CMake-1bcd9b06b920eeadf0a574490dbd82bc78a46719.tar.gz
CMake-1bcd9b06b920eeadf0a574490dbd82bc78a46719.tar.bz2
ctest: Don't treat skipped test as failed tests in progess report
Skipped tests should not stand out on their own lines Fixes #21143
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestRunTest.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 4d65c9b..a4b0e22 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -139,7 +139,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
s << "SKIP_RETURN_CODE=" << this->TestProperties->SkipReturnCode;
}
this->TestResult.CompletionStatus = s.str();
- cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Skipped ");
+ outputStream << "***Skipped ";
skipped = true;
} else if (success != this->TestProperties->WillFail) {
this->TestResult.Status = cmCTestTestHandler::COMPLETED;
@@ -195,8 +195,9 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
sprintf(buf, "%6.2f sec", this->TestProcess->GetTotalTime().count());
outputStream << buf << "\n";
+ bool passedOrSkipped = passed || skipped;
if (this->CTest->GetTestProgressOutput()) {
- if (!passed) {
+ if (!passedOrSkipped) {
// If the test did not pass, reprint test name and error
std::string output = GetTestPrefix(completed, total);
std::string testName = this->TestProperties->Name;
@@ -216,7 +217,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
cmCTestLog(this->CTest, HANDLER_TEST_PROGRESS_OUTPUT, testName);
}
}
- if (!this->CTest->GetTestProgressOutput() || !passed) {
+ if (!this->CTest->GetTestProgressOutput() || !passedOrSkipped) {
cmCTestLog(this->CTest, HANDLER_OUTPUT, outputStream.str());
}