summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.cxx
diff options
context:
space:
mode:
authorFrank Winklmeier <frank.winklmeier@cern.ch>2022-03-07 08:28:55 (GMT)
committerBrad King <brad.king@kitware.com>2022-03-08 13:18:02 (GMT)
commit140704d443e73c2dc74ac8192a109ae0c21e834a (patch)
tree7781fb36c21aa925d0442daf27ec5344d89e76f9 /Source/CTest/cmCTestRunTest.cxx
parent359e5b17d8edd092a1e500698af7968f96fe1d8d (diff)
downloadCMake-140704d443e73c2dc74ac8192a109ae0c21e834a.zip
CMake-140704d443e73c2dc74ac8192a109ae0c21e834a.tar.gz
CMake-140704d443e73c2dc74ac8192a109ae0c21e834a.tar.bz2
ctest: add option for output truncation
Add `--test-output-truncation` to `ctest`. This option can be used to customize which part of the test output is being truncated. Currently supported values are `tail`, `middle` and `head`. Also add equivalent `CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variable. Fixes: #23206
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r--Source/CTest/cmCTestRunTest.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 6cd3b09..f594300 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -277,7 +277,8 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
static_cast<size_t>(
this->TestResult.Status == cmCTestTestHandler::COMPLETED
? this->TestHandler->CustomMaximumPassedTestOutputSize
- : this->TestHandler->CustomMaximumFailedTestOutputSize));
+ : this->TestHandler->CustomMaximumFailedTestOutputSize),
+ this->TestHandler->TestOutputTruncation);
}
this->TestResult.Reason = reason;
if (this->TestHandler->LogFile) {