CMakePresets.json: Disallow extra properties in test output schema

And add test for testOutputTruncation being unsupported.
This commit is contained in:
Kyle Edwards
2022-10-18 14:27:46 -04:00
parent 787fc8caa8
commit b68c3596e7
5 changed files with 73 additions and 3 deletions

View File

@@ -1073,7 +1073,24 @@
"environment": {},
"configuration": {},
"overwriteConfigurationFile": {},
"output": {},
"output": {
"type": "object",
"properties": {
"shortProgress": {},
"verbosity": {},
"debug": {},
"outputOnFailure": {},
"quiet": {},
"outputLogFile": {},
"labelSummary": {},
"subprojectSummary": {},
"maxPassedTestOutputSize": {},
"maxFailedTestOutputSize": {},
"maxTestNameWidth": {},
"testOutputTruncation": {}
},
"additionalProperties": false
},
"filter": {},
"execution": {},
"condition": {}
@@ -1105,7 +1122,23 @@
"environment": {},
"configuration": {},
"overwriteConfigurationFile": {},
"output": {},
"output": {
"type": "object",
"properties": {
"shortProgress": {},
"verbosity": {},
"debug": {},
"outputOnFailure": {},
"quiet": {},
"outputLogFile": {},
"labelSummary": {},
"subprojectSummary": {},
"maxPassedTestOutputSize": {},
"maxFailedTestOutputSize": {},
"maxTestNameWidth": {}
},
"additionalProperties": false
},
"filter": {},
"execution": {},
"condition": {}
@@ -1136,7 +1169,23 @@
"environment": {},
"configuration": {},
"overwriteConfigurationFile": {},
"output": {},
"output": {
"type": "object",
"properties": {
"shortProgress": {},
"verbosity": {},
"debug": {},
"outputOnFailure": {},
"quiet": {},
"outputLogFile": {},
"labelSummary": {},
"subprojectSummary": {},
"maxPassedTestOutputSize": {},
"maxFailedTestOutputSize": {},
"maxTestNameWidth": {}
},
"additionalProperties": false
},
"filter": {},
"execution": {}
},

View File

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

View File

@@ -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\.$

View File

@@ -0,0 +1,17 @@
{
"version": 4,
"configurePresets": [
{
"name": "default"
}
],
"testPresets": [
{
"name": "default",
"configurePreset": "default",
"output": {
"testOutputTruncation": "tail"
}
}
]
}