-
Notifications
You must be signed in to change notification settings - Fork 83
Introduce new 'docker run' validation command #3716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
williamjallen
merged 1 commit into
Kitware:master
from
josephsnyder:add_run_command_for_xml_validation
May 13, 2026
+66
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Validating XML files for CDash | ||
|
|
||
| CDash maintains a set of schema files for the expected structure of | ||
| the incoming XML files that will be parsed. Normally, this is not a | ||
| problem as CTest writes properly formatted files. | ||
|
|
||
| In the rare case that the XML files are not being created by CTest, we have a | ||
| few opportunities for the user to be informed that there are problems | ||
| with the XML files that are uploaded | ||
|
|
||
| 1. Prior to Submission | ||
|
|
||
| The CDash Docker container has an entry point which will look for files within | ||
| a directory which has been mounted to the container. The directory of files | ||
| should be mounted to `/tmp/validate` using the `-v` flag. The entry point | ||
| to call `validate-xml` should be executed via the `docker run` command. | ||
|
|
||
| ```bash | ||
| docker run -v /example/host/directory/xml:/tmp/validate kitware/cdash validate-xml | ||
| ``` | ||
| For example, when all files are properly validated, the report would print to | ||
| the screen like this: | ||
|
|
||
| ```bash | ||
| Validated file: /tmp/validate/Build.xml. | ||
| Validated file: /tmp/validate/Configure.xml. | ||
| Validated file: /tmp/validate/Coverage.xml. | ||
| Validated file: /tmp/validate/CoverageLog-0.xml. | ||
| Validated file: /tmp/validate/Done.xml. | ||
| Validated file: /tmp/validate/Test.xml. | ||
| ``` | ||
|
|
||
| Errors in a file will be printed to the screen: | ||
|
|
||
| ```bash | ||
| WARNING: Element 'Site': The attribute 'Name' is required but missing. | ||
| in /tmp/validate/Build.xml, line: 25, column: 0 | ||
| Validated file: /tmp/validate/Configure.xml. | ||
| Validated file: /tmp/validate/Coverage.xml. | ||
| Validated file: /tmp/validate/CoverageLog-0.xml. | ||
| FAILED: Some XML file checks did not pass! | ||
| ``` | ||
|
|
||
| 2. During Submission | ||
|
|
||
| For validation during the submission process, CDash will look at the | ||
| `VALIDATE_SUBMISSIONS` environment variable. The value of the variable | ||
| determines how strict CDash will be when accepting XML files that may be | ||
| invalid. | ||
|
|
||
| * `SILENT` | ||
| * CDash will log a message to its log file about the failures it finds, | ||
| but will continue to process the content of the file. | ||
| * This is the default value. | ||
| * `WARN` | ||
| * CDash will log a message to its log file about the failures it finds. | ||
| It will also send the failure results in the `message` attribute of the | ||
| response from the HTTP request but will continue processing the content | ||
| of the file. | ||
| * `REJECT` | ||
| * CDash will log a message to its log file about the failures it finds. | ||
| It will also halt processing the file, returning a 400 response code, and | ||
| informing the user the failure results |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.