summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-11-30 16:13:01 (GMT)
committerAsit Dhal <dhal.asitk@gmail.com>2020-12-01 00:53:03 (GMT)
commit5a6c199069fdf3d1e781a5d08059d5669051fb63 (patch)
treeb4567aba70a33bfd3e93f40f732358c8c4c6d5aa /Source/cmCTest.cxx
parent8187bd2f4bc54c9003cb0034b21530e3bfd24e8d (diff)
downloadCMake-5a6c199069fdf3d1e781a5d08059d5669051fb63.zip
CMake-5a6c199069fdf3d1e781a5d08059d5669051fb63.tar.gz
CMake-5a6c199069fdf3d1e781a5d08059d5669051fb63.tar.bz2
ctest: Provide hints about inspecting test failures
Fixes: #20955
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx11
1 files changed, 11 insertions, 0 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;
}