summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-10-18 18:27:46 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2022-10-18 18:40:11 (GMT)
commitb68c3596e7e9c1390d17b36163cd60aa12ead028 (patch)
treebf066bed088ec3f47cc9a41c8f034bb5d0712da8 /Tests/RunCMake
parent787fc8caa8c46b7c29e05c9b367f8e85665845d4 (diff)
downloadCMake-b68c3596e7e9c1390d17b36163cd60aa12ead028.zip
CMake-b68c3596e7e9c1390d17b36163cd60aa12ead028.tar.gz
CMake-b68c3596e7e9c1390d17b36163cd60aa12ead028.tar.bz2
CMakePresets.json: Disallow extra properties in test output schema
And add test for testOutputTruncation being unsupported.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported.json.in17
4 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
index bec0dd94..e9e8395 100644
--- a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
@@ -105,6 +105,7 @@ run_cmake_test_presets(Invalid "" "" "hidden;vendorMacro")
set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
run_cmake_test_presets(PresetsUnsupported "" "" "x")
run_cmake_test_presets(ConditionFuture "" "" "x")
+run_cmake_test_presets(TestOutputTruncationUnsupported "" "" "x")
set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
run_cmake_test_presets(ConfigurePresetUnreachable "" "" "x")
set(CMakePresetsTest_NO_CONFIGURE 0)
diff --git a/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-result.txt b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt
new file mode 100644
index 0000000..90ea7c3
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported: File version must be 5 or higher for testOutputTruncation preset support\.$
diff --git a/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported.json.in b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported.json.in
new file mode 100644
index 0000000..c116039
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported.json.in
@@ -0,0 +1,17 @@
+{
+ "version": 4,
+ "configurePresets": [
+ {
+ "name": "default"
+ }
+ ],
+ "testPresets": [
+ {
+ "name": "default",
+ "configurePreset": "default",
+ "output": {
+ "testOutputTruncation": "tail"
+ }
+ }
+ ]
+}