summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2022-06-20 21:29:32 +0200
committerZorro Lang <zlang@kernel.org>2022-06-24 23:15:03 +0800
commit2b1016e1f507fe248c4b02cb3abeb9f478a8dacc (patch)
treefc6c49ba8a263bc08b57ccf1f92aa170a83d07d2 /check
parent40aa19bcc2f18d71d5a3f5e2662014357f035e85 (diff)
report: fix xunit tests count
The xunit "section report" provides a tests attribute, which according to https://llg.cubic.org/docs/junit/ represents: tests="" <!-- The total number of tests in the suite, required. --> The current value is generated as a sum of the $n_try and $n_notrun counters. This is incorrect as the $n_try counter already includes tests which are run but complete with _notrun. One special case exists for $showme (check -n), where $n_try remains zero, so $n_notrun can be used as-is. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'check')
-rwxr-xr-xcheck13
1 files changed, 6 insertions, 7 deletions
diff --git a/check b/check
index 43c072d2..a5183d3a 100755
--- a/check
+++ b/check
@@ -430,13 +430,12 @@ _wrapup()
seq="check"
check="$RESULT_BASE/check"
- if $showme; then
- if $needwrap; then
- if $do_report; then
- _make_section_report
- fi
- needwrap=false
+ if $showme && $needwrap; then
+ if $do_report; then
+ # $showme = all selected tests are notrun (no tries)
+ _make_section_report "$n_notrun" "0" "$n_notrun"
fi
+ needwrap=false
elif $needwrap; then
if [ -f $check.time -a -f $tmp.time ]; then
cat $check.time $tmp.time \
@@ -495,7 +494,7 @@ _wrapup()
fi
echo "" >>$tmp.summary
if $do_report; then
- _make_section_report
+ _make_section_report "$n_try" "$n_bad" "$n_notrun"
fi
needwrap=false
fi