report: fix summary statistics in xUnit header
authorTheodore Ts'o <tytso@mit.edu>
Mon, 2 Oct 2017 03:39:32 +0000 (23:39 -0400)
committerEryu Guan <eguan@redhat.com>
Tue, 3 Oct 2017 08:55:03 +0000 (16:55 +0800)
The xUnit XML DTD distinguishes between test failures and test errors,
where a test failure indicate that the test has explicitly indicated
that the code under test has behaved in an unexpected fashion, whereas
a test error indicates the test code itself has thrown an error or
there has been some other test implementation error.

Xfstest failures are correctly marked as xUnit failures, but in the
attributes of the testsuite XML element, the number of test failures
was incorrectly reported as the number of errors.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/report

index bb689836ae22b3b3c603c799936bbd281776666d..058c0bba6a1e002ec4d3dd0e58bdd37fff364591 100644 (file)
@@ -59,7 +59,7 @@ _xunit_make_section_report()
        # Header
        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $REPORT_DIR/result.xml
        local dtime=`echo $date_time| tr  " " 'T'`
-       local stats="errors=\"$n_bad\" skipped=\"$n_notrun\" tests=\"$n_total\" time=\"$sect_time\""
+       local stats="failures=\"$n_bad\" skipped=\"$n_notrun\" tests=\"$n_total\" time=\"$sect_time\""
        local hw_info="hostname=\"$HOST\" timestamp=\"$dtime\" "
        echo "<testsuite name=\"xfstests\" $stats  $hw_info >" >> $REPORT_DIR/result.xml