diff options
author | Brad King <brad.king@kitware.com> | 2017-04-27 12:53:34 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-04-27 12:55:40 (GMT) |
commit | ef205e04d4b06b4cc1456c2bca91d3859e5cb85c (patch) | |
tree | a9d3b28b2ed3b16c17be02ee012e48914111ed70 /Source/CTest/cmCTestTestHandler.cxx | |
parent | 5081dfca8332957a4894bce0653c86ba1b7b2bfe (diff) | |
parent | 851b6c1595363c8916f24b7da8db991cf6fc3f25 (diff) | |
download | CMake-ef205e04d4b06b4cc1456c2bca91d3859e5cb85c.zip CMake-ef205e04d4b06b4cc1456c2bca91d3859e5cb85c.tar.gz CMake-ef205e04d4b06b4cc1456c2bca91d3859e5cb85c.tar.bz2 |
Merge topic 'ctest_test-ignore-skipped-tests'
851b6c15 cmCTestTestHandler: indicate why a test did not run
25a7f14f Help: add release notes
ab8bbef9 cmCTestTestHandler: count skipped tests as disabled
202a44a4 cmCTestRunTest: do not count skipped tests as failed
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !741
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 167fecf..c24aecb 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -17,6 +17,7 @@ #include <string.h> #include <time.h> +#include "cmAlgorithms.h" #include "cmCTest.h" #include "cmCTestBatchTestHandler.h" #include "cmCTestMultiProcessHandler.h" @@ -495,7 +496,8 @@ int cmCTestTestHandler::ProcessHandler() for (SetOfTests::iterator ftit = resultsSet.begin(); ftit != resultsSet.end(); ++ftit) { - if (ftit->CompletionStatus == "Disabled") { + if (cmHasLiteralPrefix(ftit->CompletionStatus, "SKIP_RETURN_CODE=") || + ftit->CompletionStatus == "Disabled") { disabledTests.push_back(*ftit); } } @@ -521,17 +523,22 @@ int cmCTestTestHandler::ProcessHandler() if (!disabledTests.empty()) { cmGeneratedFileStream ofs; cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl - << "The following tests are disabled and did not run:" - << std::endl); + << "The following tests did not run:" << std::endl); this->StartLogFile("TestsDisabled", ofs); + const char* disabled_reason; for (std::vector<cmCTestTestHandler::cmCTestTestResult>::iterator dtit = disabledTests.begin(); dtit != disabledTests.end(); ++dtit) { ofs << dtit->TestCount << ":" << dtit->Name << std::endl; + if (dtit->CompletionStatus == "Disabled") { + disabled_reason = "Disabled"; + } else { + disabled_reason = "Skipped"; + } cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3) << dtit->TestCount << " - " << dtit->Name - << std::endl); + << " (" << disabled_reason << ")" << std::endl); } } @@ -544,6 +551,7 @@ int cmCTestTestHandler::ProcessHandler() for (SetOfTests::iterator ftit = resultsSet.begin(); ftit != resultsSet.end(); ++ftit) { if (ftit->Status != cmCTestTestHandler::COMPLETED && + !cmHasLiteralPrefix(ftit->CompletionStatus, "SKIP_RETURN_CODE=") && ftit->CompletionStatus != "Disabled") { ofs << ftit->TestCount << ":" << ftit->Name << std::endl; cmCTestLog( |