summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2022-07-08 10:51:39 +0200
committerZorro Lang <zlang@kernel.org>2022-07-09 01:13:22 +0800
commite47930fb73bcfe9c046fa5bb01ae293bbca559f9 (patch)
treeb7b92edfb0fe13e15f3a45b5fea69c299b937714 /check
parentde1fda54e5f0475c91c6b6a175236023d89e744a (diff)
report: pass through most details as function parameters
Report generation currently involves reaching into a whole bunch of globals for things like section name and start/end times. Pass these through as explicit function parameters to avoid unintentional breakage. One minor fix included is the default xunit error message, which used $sequm instead of $seqnum. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'check')
-rwxr-xr-xcheck14
1 files changed, 10 insertions, 4 deletions
diff --git a/check b/check
index 4b0ebad6..dbad6dde 100755
--- a/check
+++ b/check
@@ -432,7 +432,9 @@ _wrapup()
if $showme && $needwrap; then
if $do_report; then
# $showme = all selected tests are notrun (no tries)
- _make_section_report "${#notrun[*]}" "0" "${#notrun[*]}"
+ _make_section_report "$section" "${#notrun[*]}" "0" \
+ "${#notrun[*]}" \
+ "$((sect_stop - sect_start))"
fi
needwrap=false
elif $needwrap; then
@@ -493,7 +495,9 @@ _wrapup()
fi
echo "" >>$tmp.summary
if $do_report; then
- _make_section_report "${#try[*]}" "${#bad[*]}" "${#notrun[*]}"
+ _make_section_report "$section" "${#try[*]}" \
+ "${#bad[*]}" "${#notrun[*]}" \
+ "$((sect_stop - sect_start))"
fi
needwrap=false
fi
@@ -736,7 +740,8 @@ function run_section()
bad+=("$seqnum")
fi
if $do_report && [[ ! $tc_status =~ ^(init|expunge)$ ]]; then
- _make_testcase_report "$prev_seq" "$tc_status"
+ _make_testcase_report "$section" "$seqnum" \
+ "$tc_status" "$((stop - start))"
fi
prev_seq="$seq"
@@ -940,7 +945,8 @@ function run_section()
bad+=("$seqnum")
fi
if $do_report && [[ ! $tc_status =~ ^(init|expunge)$ ]]; then
- _make_testcase_report "$prev_seq" "$tc_status"
+ _make_testcase_report "$section" "$seqnum" "$tc_status" \
+ "$((stop - start))"
fi
sect_stop=`_wallclock`