report: Add xunit format report generator
authorDmitry Monakhov <dmonakhov@openvz.org>
Fri, 3 Mar 2017 08:26:16 +0000 (12:26 +0400)
committerEryu Guan <eguan@redhat.com>
Tue, 7 Mar 2017 11:53:31 +0000 (19:53 +0800)
commitf9fde7db2fa504aecbe379a535fa1a394d3f1b32
tree5906a4549f9f3ec4abd14d7d7a1ac85b1bbdfe64
parente11c5199183e7c7debde7684b79e8afc5c65c396
report: Add xunit format report generator

xunit[1]/junit[2] are well known report formats for tests frameworks
which supported by most of test CI frameworks(such as Jenkins [3],
Bamboo [4], Avocado [5]) Basically this is just xml document which
can be easily parsed later by external tools.

EXAMPLE:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="xfstests" errors="0" skipped="1" tests="2" time="7"  hostname="alice" timestamp="2017-02-21T15:15:06"  >
<properties>
<property name="SECTION" value="ext4"/>
<property name="FSTYP" value="ext4"/>
<property name="MOUNT_OPTIONS" value="-o acl,user_xattr "/>
<property name="HOST_OPTIONS" value="/devel/xfstests-dev.git/configs/alice.config"/>
<property name="XFS_MKFS_OPTIONS" value="-bsize=4096"/>
<property name="TIME_FACTOR" value="1"/>
<property name="LOAD_FACTOR" value="1"/>
<property name="TEST_DIR" value="/mnt/test"/>
<property name="TEST_DEV" value="/dev/ram0"/>
<property name="SCRATCH_DEV" value="/dev/ram1"/>
<property name="SCRATCH_MNT" value="/mnt/scratch"/>
<property name="OVERLAY_UPPER_DIR" value="upper"/>
<property name="OVERLAY_LOWER_DIR" value="lower"/>
<property name="OVERLAY_WORK_DIR" value="work"/>
</properties>
<testcase classname="xfstests.ext4" name="generic/001" time="5">
</testcase>
<testcase classname="xfstests.ext4" name="generic/010" time="1">
<skipped message="src/dbtest not built" />
</testcase>
</testsuite>

Footnotes:
[1] https://xunit.github.io/docs/format-xml-v2.html
[2] http://help.catchsoftware.com/display/ET/JUnit+Format
[3] https://jenkins.io
[4] https://www.atlassian.com/software/bamboo
[5] https://github.com/avocado-framework/avocado

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
check
common/rc
common/report [new file with mode: 0644]