diff options
author | Brad King <brad.king@kitware.com> | 2016-09-22 12:09:55 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-09-22 12:09:55 (GMT) |
commit | f4475eb92beade22fca16f21b40df19b48c6559b (patch) | |
tree | 58ef2d59485fa84c63ad8a24d4674d848858f055 /Source/CTest/cmCTestRunTest.cxx | |
parent | 3e14e594b41fe66d0366eadd5691c9a53e7e13c9 (diff) | |
parent | 73f47c9e46d42513cd7eeb08e27c4d1a424949ad (diff) | |
download | CMake-f4475eb92beade22fca16f21b40df19b48c6559b.zip CMake-f4475eb92beade22fca16f21b40df19b48c6559b.tar.gz CMake-f4475eb92beade22fca16f21b40df19b48c6559b.tar.bz2 |
Merge topic 'test-fixtures'
73f47c9e CTest: Add support for test fixtures
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index e7e51d5..fb53a7e 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -177,7 +177,8 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) passIt; bool forceFail = false; bool outputTestErrorsToConsole = false; - if (!this->TestProperties->RequiredRegularExpressions.empty()) { + if (!this->TestProperties->RequiredRegularExpressions.empty() && + this->FailedDependencies.empty()) { bool found = false; for (passIt = this->TestProperties->RequiredRegularExpressions.begin(); passIt != this->TestProperties->RequiredRegularExpressions.end(); @@ -201,7 +202,8 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) } reason += "]"; } - if (!this->TestProperties->ErrorRegularExpressions.empty()) { + if (!this->TestProperties->ErrorRegularExpressions.empty() && + this->FailedDependencies.empty()) { for (passIt = this->TestProperties->ErrorRegularExpressions.begin(); passIt != this->TestProperties->ErrorRegularExpressions.end(); ++passIt) { @@ -437,6 +439,23 @@ bool cmCTestRunTest::StartTest(size_t total) this->TestResult.Name = this->TestProperties->Name; this->TestResult.Path = this->TestProperties->Directory; + if (!this->FailedDependencies.empty()) { + this->TestProcess = new cmProcess; + std::string msg = "Failed test dependencies:"; + for (std::set<std::string>::const_iterator it = + this->FailedDependencies.begin(); + it != this->FailedDependencies.end(); ++it) { + msg += " " + *it; + } + *this->TestHandler->LogFile << msg << std::endl; + cmCTestLog(this->CTest, HANDLER_OUTPUT, msg << std::endl); + this->TestResult.Output = msg; + this->TestResult.FullCommandLine = ""; + this->TestResult.CompletionStatus = "Not Run"; + this->TestResult.Status = cmCTestTestHandler::NOT_RUN; + return false; + } + if (args.size() >= 2 && args[1] == "NOT_AVAILABLE") { this->TestProcess = new cmProcess; std::string msg; |