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 \
fi
echo "" >>$tmp.summary
if $do_report; then
- _make_section_report
+ _make_section_report "$n_try" "$n_bad" "$n_notrun"
fi
needwrap=false
fi
_xunit_make_section_report()
{
# xfstest:section ==> xunit:testsuite
+ local tests_count="$1"
+ local bad_count="$2"
+ local notrun_count="$3"
local sect_name=$section
local sect_time=`expr $sect_stop - $sect_start`
- local n_total=`expr $n_try + $n_notrun`
if [ $sect_name == '-no-sections-' ]; then
sect_name='global'
if [ -z "$date_time" ]; then
date_time=$(date +"%F %T")
fi
- local dtime=`echo $date_time| tr " " 'T'`
- local stats="failures=\"$n_bad\" skipped=\"$n_notrun\" tests=\"$n_total\" time=\"$sect_time\""
- local hw_info="hostname=\"$HOST\" timestamp=\"$dtime\" "
+ local stats="failures=\"$bad_count\" skipped=\"$notrun_count\" tests=\"$tests_count\" time=\"$sect_time\""
+ local hw_info="hostname=\"$HOST\" timestamp=\"${date_time/ /T}\" "
echo "<testsuite name=\"xfstests\" $stats $hw_info >" >> $REPORT_DIR/result.xml
# Properties
# Common report generator entry points
_make_section_report()
{
+ local tests_count="$1"
+ local bad_count="$2"
+ local notrun_count="$3"
for report in $REPORT_LIST; do
case "$report" in
"xunit")
- _xunit_make_section_report
+ _xunit_make_section_report "$tests_count" "$bad_count" "$notrun_count"
;;
*)
_dump_err "format '$report' is not supported"