summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorFrank Winklmeier <frank.winklmeier@cern.ch>2022-08-19 09:31:09 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-07 15:52:03 (GMT)
commitdbf840392d1d6f212d0dc1756644edfccba2a244 (patch)
treec93e664d54e8e61d8529aff1a933b0b96b0862af /Source
parent9a916eaae3f9ddf668d1c4194b268738b1b18c9b (diff)
downloadCMake-dbf840392d1d6f212d0dc1756644edfccba2a244.zip
CMake-dbf840392d1d6f212d0dc1756644edfccba2a244.tar.gz
CMake-dbf840392d1d6f212d0dc1756644edfccba2a244.tar.bz2
ctest: print error for invalid CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION
Print an error message for invalid values of `CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` in a ctest dashboard script. The option was added by commit 140704d443 (ctest: add option for output truncation, 2022-03-07, v3.24.0-rc1~513^2). Fixes: #23869
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index d1fad62..daaf5fd 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -363,7 +363,11 @@ void cmCTestTestHandler::PopulateCustomVectors(cmMakefile* mf)
cmValue dval = mf->GetDefinition("CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION");
if (dval) {
- this->SetTestOutputTruncation(dval);
+ if (!this->SetTestOutputTruncation(dval)) {
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Invalid value for CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION: "
+ << dval << std::endl);
+ }
}
}