diff options
author | Brad King <brad.king@kitware.com> | 2020-12-02 14:26:51 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-12-02 14:27:38 (GMT) |
commit | 2b0152ce093ac041d6e68084eea01f66e5bbb3fa (patch) | |
tree | ab2f5202c7b75db28d7d8788f7c6f8bb9c9a7e55 | |
parent | dee36398d2f869d3fb5370b1289381905a35ac62 (diff) | |
parent | 5a6c199069fdf3d1e781a5d08059d5669051fb63 (diff) | |
download | CMake-2b0152ce093ac041d6e68084eea01f66e5bbb3fa.zip CMake-2b0152ce093ac041d6e68084eea01f66e5bbb3fa.tar.gz CMake-2b0152ce093ac041d6e68084eea01f66e5bbb3fa.tar.bz2 |
Merge topic 'issue-20955'
5a6c199069 ctest: Provide hints about inspecting test failures
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5552
-rw-r--r-- | Source/cmCTest.cxx | 11 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/repeat-until-fail-ctest-stderr.txt | 4 |
3 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 8cf5ae9..8479458 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1017,6 +1017,17 @@ int cmCTest::ProcessSteps() } if (res != 0) { cmCTestLog(this, ERROR_MESSAGE, "Errors while running CTest" << std::endl); + if (!this->Impl->OutputTestOutputOnTestFailure) { + const std::string lastTestLog = + this->GetBinaryDir() + "/Testing/Temporary/LastTest.log"; + cmCTestLog(this, ERROR_MESSAGE, + "Output from these tests are in: " << lastTestLog + << std::endl); + cmCTestLog(this, ERROR_MESSAGE, + "Use \"--rerun-failed --output-on-failure\" to re-run the " + "failed cases verbosely." + << std::endl); + } } return res; } diff --git a/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt b/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt index 97e2a10..b27da43 100644 --- a/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt +++ b/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt @@ -1,4 +1,6 @@ ^CMake Error at CTestTestfile.cmake:[0-9]+ \(subdirs\): subdirs called with incorrect number of arguments + -Errors while running CTest$ +Errors while running CTest +Output from these tests are in: .*/Testing/Temporary/LastTest.log +Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.$ diff --git a/Tests/RunCMake/CTestCommandLine/repeat-until-fail-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/repeat-until-fail-ctest-stderr.txt index 7593783..a993ac6 100644 --- a/Tests/RunCMake/CTestCommandLine/repeat-until-fail-ctest-stderr.txt +++ b/Tests/RunCMake/CTestCommandLine/repeat-until-fail-ctest-stderr.txt @@ -1 +1,3 @@ -^Errors while running CTest$ +^Errors while running CTest +Output from these tests are in: .*/Testing/Temporary/LastTest.log +Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.$ |