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
This commit is contained in:
Frank Winklmeier
2022-08-19 11:31:09 +02:00
committed by Brad King
parent 9a916eaae3
commit dbf840392d

View File

@@ -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);
}
}
}