From dbf840392d1d6f212d0dc1756644edfccba2a244 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier Date: Fri, 19 Aug 2022 11:31:09 +0200 Subject: 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 --- Source/CTest/cmCTestTestHandler.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); + } } } -- cgit v0.12