mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
CI: Add timing to junit
Signed-off-by: Anthony PERARD <anthony.perard@vates.tech> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
1cdf180308
commit
321b74f29d
1 file changed
+4
-1
@@ -18,9 +18,12 @@ for f in "$1"/*; do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "Running $f"
|
echo "Running $f"
|
||||||
printf ' <testcase name="%s">\n' "$f" >> "$xml_out"
|
time_start=$EPOCHREALTIME
|
||||||
"$f" 2>&1 | tee /tmp/out
|
"$f" 2>&1 | tee /tmp/out
|
||||||
ret=${PIPESTATUS[0]}
|
ret=${PIPESTATUS[0]}
|
||||||
|
time_end=$EPOCHREALTIME
|
||||||
|
time_delta="$(bc <<<"$time_end - $time_start")"
|
||||||
|
printf ' <testcase name="%s" time="%f">\n' "$f" "$time_delta" >> "$xml_out"
|
||||||
if [ "$ret" -ne 0 ]; then
|
if [ "$ret" -ne 0 ]; then
|
||||||
echo "FAILED: $f"
|
echo "FAILED: $f"
|
||||||
failed+=" $f"
|
failed+=" $f"
|
||||||
|
|||||||