diff options
author | Brad King <brad.king@kitware.com> | 2019-07-11 12:50:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-11 12:50:36 (GMT) |
commit | 6e4e79e1b054fd7f9f697e67136dc2c4ef405dc8 (patch) | |
tree | a40cf975a191d37b538ab05875856683c27500bf /Source | |
parent | 01a8b89f292c031e7a35bedf92b7cda98bef7f6d (diff) | |
parent | adcbdb143cfd302c6b3ae6da9b53f469e01a900b (diff) | |
download | CMake-6e4e79e1b054fd7f9f697e67136dc2c4ef405dc8.zip CMake-6e4e79e1b054fd7f9f697e67136dc2c4ef405dc8.tar.gz CMake-6e4e79e1b054fd7f9f697e67136dc2c4ef405dc8.tar.bz2 |
Merge topic 'fix_ctest_output'
adcbdb143c CTest: Clean up stdout and logfile output for Pass/Fail regex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3509
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 31976b9..b865cab 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -85,27 +85,30 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) if (pass.first.find(this->ProcessOutput)) { found = true; reason = "Required regular expression found."; + reason += " Regex=["; + reason += pass.second; + reason += "]"; break; } } if (!found) { reason = "Required regular expression not found."; + reason += " Regex=["; + for (auto& pass : this->TestProperties->RequiredRegularExpressions) { + reason += pass.second; + reason += "\n"; + } + reason += "]"; forceFail = true; } - reason += "Regex=["; - for (auto& pass : this->TestProperties->RequiredRegularExpressions) { - reason += pass.second; - reason += "\n"; - } - reason += "]"; } if (!this->TestProperties->ErrorRegularExpressions.empty() && this->FailedDependencies.empty()) { - for (auto& pass : this->TestProperties->ErrorRegularExpressions) { - if (pass.first.find(this->ProcessOutput)) { + for (auto& fail : this->TestProperties->ErrorRegularExpressions) { + if (fail.first.find(this->ProcessOutput)) { reason = "Error regular expression found in output."; reason += " Regex=["; - reason += pass.second; + reason += fail.second; reason += "]"; forceFail = true; break; |