Merge topic 'cmake-presets-output-junit' into release-3.25

bea4ed5430 CTest: Add support for outputJUnitFile in presets
9270a02003 CMakePresets.json: Add outputJUnitFile to test presets schema
757786bb73 Tests: Add test for outputLogFile in CMakePresets.json
b68c3596e7 CMakePresets.json: Disallow extra properties in test output schema

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !7806
This commit is contained in:
Brad King
2022-10-19 14:04:18 +00:00
committed by Kitware Robot
19 changed files with 229 additions and 11 deletions

View File

@@ -657,6 +657,12 @@ that may contain the following fields:
passing :option:`--output-log <ctest --output-log>` on the command line.
This field supports macro expansion.
``outputJUnitFile``
An optional string specifying a path to a JUnit file. Equivalent to
passing :option:`--output-junit <ctest --output-junit>` on the command line.
This field supports macro expansion. This is allowed in preset files
specifying version ``6`` or above.
``labelSummary``
An optional bool. If false, equivalent to passing
:option:`--no-label-summary <ctest --no-label-summary>` on the command

View File

@@ -83,7 +83,7 @@
"vendor": { "$ref": "#/definitions/vendor" },
"configurePresets": { "$ref": "#/definitions/configurePresetsV3"},
"buildPresets": { "$ref": "#/definitions/buildPresetsV4"},
"testPresets": { "$ref": "#/definitions/testPresetsV5"},
"testPresets": { "$ref": "#/definitions/testPresetsV6"},
"packagePresets": { "$ref": "#/definitions/packagePresetsV6"},
"workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" },
"include": { "$ref": "#/definitions/include"}
@@ -705,6 +705,25 @@
"additionalProperties": false
}
},
"testPresetsItemsV6": {
"type": "array",
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 6 and higher.",
"items": {
"type": "object",
"properties": {
"output": {
"type": "object",
"description": "An optional object specifying output options.",
"properties": {
"outputJUnitFile": {
"type": "string",
"description": "An optional string specifying a path to a JUnit file. Equivalent to passing --output-junit on the command line."
}
}
}
}
}
},
"testPresetsItemsV5": {
"type": "array",
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 5 and higher.",
@@ -1051,6 +1070,58 @@
]
}
},
"testPresetsV6": {
"type": "array",
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 6 and higher.",
"allOf": [
{ "$ref": "#/definitions/testPresetsItemsV2" },
{ "$ref": "#/definitions/testPresetsItemsV3" },
{ "$ref": "#/definitions/testPresetsItemsV5" },
{ "$ref": "#/definitions/testPresetsItemsV6" }
],
"items": {
"type": "object",
"properties": {
"name": {},
"hidden": {},
"inherits": {},
"configurePreset": {},
"vendor": {},
"displayName": {},
"description": {},
"inheritConfigureEnvironment": {},
"environment": {},
"configuration": {},
"overwriteConfigurationFile": {},
"output": {
"type": "object",
"properties": {
"shortProgress": {},
"verbosity": {},
"debug": {},
"outputOnFailure": {},
"quiet": {},
"outputLogFile": {},
"outputJUnitFile": {},
"labelSummary": {},
"subprojectSummary": {},
"maxPassedTestOutputSize": {},
"maxFailedTestOutputSize": {},
"maxTestNameWidth": {},
"testOutputTruncation": {}
},
"additionalProperties": false
},
"filter": {},
"execution": {},
"condition": {}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"testPresetsV5": {
"type": "array",
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 5 and higher.",
@@ -1073,7 +1144,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 +1193,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 +1240,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

@@ -21,6 +21,9 @@ Presets
* The :manual:`cmake-presets(7)` format now supports a
``workflowPresets`` field to specify presets for :option:`cmake --workflow`.
* The :manual:`cmake-presets(7)` format now supports a
``outputJUnitFile`` field to specify JUnit output in test presets.
Languages
---------