summaryrefslogtreecommitdiff
path: root/Source/cmCMakePresetsGraph.cxx
diff options
context:
space:
mode:
authorFrank Winklmeier <frank.winklmeier@cern.ch>2022-03-07 09:28:55 +0100
committerBrad King <brad.king@kitware.com>2022-03-08 08:18:02 -0500
commit140704d443e73c2dc74ac8192a109ae0c21e834a (patch)
tree7781fb36c21aa925d0442daf27ec5344d89e76f9 /Source/cmCMakePresetsGraph.cxx
parent359e5b17d8edd092a1e500698af7968f96fe1d8d (diff)
downloadcmake-140704d443e73c2dc74ac8192a109ae0c21e834a.tar.gz
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/cmCMakePresetsGraph.cxx')
-rw-r--r--Source/cmCMakePresetsGraph.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmCMakePresetsGraph.cxx b/Source/cmCMakePresetsGraph.cxx
index 705e2b022e..39bb326aae 100644
--- a/Source/cmCMakePresetsGraph.cxx
+++ b/Source/cmCMakePresetsGraph.cxx
@@ -773,6 +773,8 @@ cmCMakePresetsGraph::TestPreset::VisitPresetInherit(
parentOutput.MaxPassedTestOutputSize);
InheritOptionalValue(output.MaxFailedTestOutputSize,
parentOutput.MaxFailedTestOutputSize);
+ InheritOptionalValue(output.TestOutputTruncation,
+ parentOutput.TestOutputTruncation);
InheritOptionalValue(output.MaxTestNameWidth,
parentOutput.MaxTestNameWidth);
} else {
@@ -1027,6 +1029,9 @@ const char* cmCMakePresetsGraph::ResultToString(ReadFileResult result)
"support.";
case ReadFileResult::CYCLIC_INCLUDE:
return "Cyclic include among preset files";
+ case ReadFileResult::TEST_OUTPUT_TRUNCATION_UNSUPPORTED:
+ return "File version must be 5 or higher for testOutputTruncation "
+ "preset support.";
}
return "Unknown error";