diff options
author | Betsy McPhail <betsy.mcphail@kitware.com> | 2017-03-13 16:50:14 (GMT) |
---|---|---|
committer | Betsy McPhail <betsy.mcphail@kitware.com> | 2017-03-27 18:21:21 (GMT) |
commit | 42c68aadf81a47d563392421636e14ef77644e03 (patch) | |
tree | f6833495d73858bb4a6ff175e41380aa35569818 | |
parent | 89e2c92f546c3d1b702b2c0ca206eabfc3f7caab (diff) | |
download | CMake-42c68aadf81a47d563392421636e14ef77644e03.zip CMake-42c68aadf81a47d563392421636e14ef77644e03.tar.gz CMake-42c68aadf81a47d563392421636e14ef77644e03.tar.bz2 |
CTest: Improve 'Completion Status' reported to CDash for 'Not Run' tests
Previously, the completion status of not run tests was always set to
"Not Run". Make it more descriptive. This value is written to
`Test.xml` and then displayed as 'Test Details' in CDash.
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 11 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 15 |
2 files changed, 15 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index f148f30..be2b59e 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -215,6 +215,9 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) if (this->TestProperties->SkipReturnCode >= 0 && this->TestProperties->SkipReturnCode == retVal) { this->TestResult.Status = cmCTestTestHandler::NOT_RUN; + std::ostringstream s; + s << "SKIP_RETURN_CODE=" << this->TestProperties->SkipReturnCode; + this->TestResult.CompletionStatus = s.str(); cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Skipped "); } else if ((success && !this->TestProperties->WillFail) || (!success && this->TestProperties->WillFail)) { @@ -437,7 +440,7 @@ bool cmCTestRunTest::StartTest(size_t total) cmCTestLog(this->CTest, HANDLER_OUTPUT, msg << std::endl); this->TestResult.Output = msg; this->TestResult.FullCommandLine = ""; - this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.CompletionStatus = "Fixture dependency failed"; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } @@ -457,7 +460,7 @@ bool cmCTestRunTest::StartTest(size_t total) cmCTestLog(this->CTest, ERROR_MESSAGE, msg << std::endl); this->TestResult.Output = msg; this->TestResult.FullCommandLine = ""; - this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.CompletionStatus = "Missing Configuration"; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } @@ -477,7 +480,7 @@ bool cmCTestRunTest::StartTest(size_t total) "Unable to find required file: " << file << std::endl); this->TestResult.Output = "Unable to find required file: " + file; this->TestResult.FullCommandLine = ""; - this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.CompletionStatus = "Required Files Missing"; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } @@ -493,7 +496,7 @@ bool cmCTestRunTest::StartTest(size_t total) "Unable to find executable: " << args[1] << std::endl); this->TestResult.Output = "Unable to find executable: " + args[1]; this->TestResult.FullCommandLine = ""; - this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.CompletionStatus = "Unable to find executable"; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; return false; } diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 9d22065..f377de1 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1222,8 +1222,7 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.EndElement(); // NamedMeasurement if (!result->Reason.empty()) { const char* reasonType = "Pass Reason"; - if (result->Status != cmCTestTestHandler::COMPLETED && - result->Status != cmCTestTestHandler::NOT_RUN) { + if (result->Status != cmCTestTestHandler::COMPLETED) { reasonType = "Fail Reason"; } xml.StartElement("NamedMeasurement"); @@ -1232,12 +1231,14 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.Element("Value", result->Reason); xml.EndElement(); // NamedMeasurement } - xml.StartElement("NamedMeasurement"); - xml.Attribute("type", "text/string"); - xml.Attribute("name", "Completion Status"); - xml.Element("Value", result->CompletionStatus); - xml.EndElement(); // NamedMeasurement } + + xml.StartElement("NamedMeasurement"); + xml.Attribute("type", "text/string"); + xml.Attribute("name", "Completion Status"); + xml.Element("Value", result->CompletionStatus); + xml.EndElement(); // NamedMeasurement + xml.StartElement("NamedMeasurement"); xml.Attribute("type", "text/string"); xml.Attribute("name", "Command Line"); |