diff options
author | Brad King <brad.king@kitware.com> | 2020-02-25 14:00:17 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-02-25 14:00:25 (GMT) |
commit | cf789bb447274b6889fd631769894d69cc1b597b (patch) | |
tree | 19a3f4a44e7e59092ac50b92179863e1a76be58f /Source/CTest/cmCTestRunTest.cxx | |
parent | 8a7c485d3ff6a08033249ace680e2d5176c28a8c (diff) | |
parent | a5be3916eeee82d5237f9ace85a74fc052240717 (diff) | |
download | CMake-cf789bb447274b6889fd631769894d69cc1b597b.zip CMake-cf789bb447274b6889fd631769894d69cc1b597b.tar.gz CMake-cf789bb447274b6889fd631769894d69cc1b597b.tar.bz2 |
Merge topic 'ctest-failure-error-reporting' into release-3.17
a5be3916ee CTest: Provide more detailed information on resource allocation error
f0df3ed5b9 Refactor: Provide more detailed error information from TryAllocateResources()
f1c34443b7 CTest: Improve error reporting with bad working directory for tests
1dec359422 Refactor: Require detail when calling cmCTestRunTest::StartFailure()
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4390
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index cc5de43..ec54960 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -324,8 +324,9 @@ bool cmCTestRunTest::StartAgain(size_t completed) cmWorkingDirectory workdir(this->TestProperties->Directory); if (workdir.Failed()) { this->StartFailure("Failed to change working directory to " + - this->TestProperties->Directory + " : " + - std::strerror(workdir.GetLastResult())); + this->TestProperties->Directory + " : " + + std::strerror(workdir.GetLastResult()), + "Failed to change working directory"); return true; } @@ -381,7 +382,8 @@ void cmCTestRunTest::MemCheckPostProcess() handler->PostProcessTest(this->TestResult, this->Index); } -void cmCTestRunTest::StartFailure(std::string const& output) +void cmCTestRunTest::StartFailure(std::string const& output, + std::string const& detail) { // Still need to log the Start message so the test summary records our // attempt to start this test @@ -404,7 +406,7 @@ void cmCTestRunTest::StartFailure(std::string const& output) this->TestResult.ExecutionTime = cmDuration::zero(); this->TestResult.CompressOutput = false; this->TestResult.ReturnValue = -1; - this->TestResult.CompletionStatus = "Failed to start"; + this->TestResult.CompletionStatus = detail; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; this->TestResult.TestCount = this->TestProperties->Index; this->TestResult.Name = this->TestProperties->Name; |