Skip to content

Commit

Permalink
s1kd-appcheck: Add -X (--xml-with-errors) option
Browse files Browse the repository at this point in the history
Added a new XML report option, -X, which will include details of errors
from the validation tools (such as s1kd-validate and s1kd-brexcheck),
rather than just a pass/fail for each set of asserts.
  • Loading branch information
kibook committed Dec 23, 2024
1 parent 3c0ae61 commit 4cf7ed5
Show file tree
Hide file tree
Showing 4 changed files with 268 additions and 45 deletions.
12 changes: 11 additions & 1 deletion tools/s1kd-appcheck/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ the actual validation.
used to determine if the object is valid (with a non-zero exit
status indicating it is invalid). This overrides the default
commands (s1kd-validate, and s1kd-brexcheck if -b is specified).

When the -X (--xml-with-errors) option is used, if these commands
output an XML document with any elements named `error`, those
elements will be copied into the XML report output by this tool.

- \-F, --valid-filenames
Print the filenames of valid objects.
Expand Down Expand Up @@ -141,8 +145,14 @@ the actual validation.
- \-v, --verbose
Verbose output. Specify multiple times to increase the verbosity.

- \-X, --xml-with-errors
Output an XML report of the check, including full details of errors
produced by the validation tools (such as s1kd-validate and
s1kd-brexcheck) for each set of assertions tested.

- \-x, --xml
Print an XML report of the check.
Output a simplified XML report of the check, only including whether
sets of assertions passed or failed.

- \-\~, --dependencies
Check with CCT dependency tests added to assertions which use the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<dmIdent>
<dmCode modelIdentCode="S1KDTOOLS" systemDiffCode="A" systemCode="11" subSystemCode="0" subSubSystemCode="0" assyCode="00" disassyCode="00" disassyCodeVariant="A" infoCode="040" infoCodeVariant="A" itemLocationCode="D"/>
<language languageIsoCode="en" countryIsoCode="CA"/>
<issueInfo issueNumber="010" inWork="06"/>
<issueInfo issueNumber="010" inWork="07"/>
</dmIdent>
<dmAddressItems>
<issueDate year="2024" month="08" day="14"/>
<issueDate year="2024" month="12" day="23"/>
<dmTitle>
<techName>s1kd-appcheck(1) | s1kd-tools</techName>
</dmTitle>
Expand Down Expand Up @@ -53,6 +53,9 @@
<reasonForUpdate id="rfu-0005" updateHighlight="1">
<simplePara>Add --unstrict-nested option.</simplePara>
</reasonForUpdate>
<reasonForUpdate id="rfu-0006" updateHighlight="1">
<simplePara>Add --xml-with-errors option.</simplePara>
</reasonForUpdate>
</dmStatus>
</identAndStatusSection>
<content>
Expand Down Expand Up @@ -123,6 +126,7 @@
<listItemTerm>-e, --exec &lt;cmd&gt;</listItemTerm>
<listItemDefinition>
<para>The commands used to validate objects. Multiple commands can be used by specifying this option multiple times. The objects will be passed to each command on stdin, and the exit status of the command will be used to determine if the object is valid (with a non-zero exit status indicating it is invalid). This overrides the default commands (s1kd-validate, and s1kd-brexcheck if -b is specified).</para>
<para changeMark="1" changeType="add" reasonForUpdateRefIds="rfu-0006">When the -X (--xml-with-errors) option is used, if these commands output an XML document with any elements named <verbatimText>error</verbatimText>, those elements will be copied into the XML report output by this tool.</para>
</listItemDefinition>
</definitionListItem>
<definitionListItem>
Expand Down Expand Up @@ -245,10 +249,16 @@
<para>Verbose output. Specify multiple times to increase the verbosity.</para>
</listItemDefinition>
</definitionListItem>
<definitionListItem changeMark="1" changeType="add" reasonForUpdateRefIds="rfu-0006">
<listItemTerm>-X, --xml-with-errors</listItemTerm>
<listItemDefinition>
<para>Output an XML report of the check, including full details of errors produced by the validation tools (such as s1kd-validate and s1kd-brexcheck) for each set of assertions tested.</para>
</listItemDefinition>
</definitionListItem>
<definitionListItem>
<listItemTerm>-x, --xml</listItemTerm>
<listItemDefinition>
<para>Print an XML report of the check.</para>
<para changeMark="1" changeType="modify" reasonForUpdateRefIds="rfu-0006">Output a simplified XML report of the check, only including whether sets of assertions passed or failed.</para>
</listItemDefinition>
</definitionListItem>
<definitionListItem>
Expand Down
16 changes: 14 additions & 2 deletions tools/s1kd-appcheck/doc/s1kd-appcheck.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 2.0.6
.\"
.TH "s1kd\-appcheck" "1" "2024\-08\-14" "" "s1kd\-tools"
.TH "s1kd\-appcheck" "1" "2024\-12\-23" "" "s1kd\-tools"
.hy
.SH NAME
.PP
Expand Down Expand Up @@ -89,6 +89,10 @@ non\-zero exit status indicating it is invalid).
This overrides the default commands (s1kd\-validate, and s1kd\-brexcheck
if \-b is specified).
.RS
.PP
When the \-X (\-\-xml\-with\-errors) option is used, if these commands
output an XML document with any elements named \f[C]error\f[], those
elements will be copied into the XML report output by this tool.
.RE
.TP
.B \-F, \-\-valid\-filenames
Expand Down Expand Up @@ -209,8 +213,16 @@ Specify multiple times to increase the verbosity.
.RS
.RE
.TP
.B \-X, \-\-xml\-with\-errors
Output an XML report of the check, including full details of errors
produced by the validation tools (such as s1kd\-validate and
s1kd\-brexcheck) for each set of assertions tested.
.RS
.RE
.TP
.B \-x, \-\-xml
Print an XML report of the check.
Output a simplified XML report of the check, only including whether sets
of assertions passed or failed.
.RS
.RE
.TP
Expand Down
Loading

0 comments on commit 4cf7ed5

Please sign in to comment.