]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
report: fix xunit tests count
authorDavid Disseldorp <ddiss@suse.de>
Mon, 20 Jun 2022 19:29:32 +0000 (21:29 +0200)
committerZorro Lang <zlang@kernel.org>
Fri, 24 Jun 2022 15:15:03 +0000 (23:15 +0800)
commit2b1016e1f507fe248c4b02cb3abeb9f478a8dacc
treefc6c49ba8a263bc08b57ccf1f92aa170a83d07d2
parent40aa19bcc2f18d71d5a3f5e2662014357f035e85
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>
check
common/report