Merge topic 'ctest-progress-output-fixes'

39cdc8afb9 ctest: Make verbose mode override progress behavior
1bcd9b06b9 ctest: Don't treat skipped test as failed tests in progess report

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5663
This commit is contained in:
Brad King
2021-01-07 13:14:36 +00:00
committed by Kitware Robot
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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 = this->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());
}
+1 -1
View File
@@ -2901,7 +2901,7 @@ bool cmCTest::GetFailover() const
bool cmCTest::GetTestProgressOutput() const
{
return this->Impl->TestProgressOutput;
return this->Impl->TestProgressOutput && !GetExtraVerbose();
}
bool cmCTest::GetVerbose() const