summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-04-22 13:42:43 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-04-22 13:42:43 -0700
commitd72fa768f497ddc7e29bae3ad9cd1337dca633b5 (patch)
tree22a262249fd0c3a8525299441982abbe659d00bb
parentMerge branch 'js/tests-gpg-integration-on-windows' (diff)
parenttests(junit-xml): avoid invalid XML (diff)
downloadtgif-d72fa768f497ddc7e29bae3ad9cd1337dca633b5.tar.xz
Merge branch 'js/test-junit-finalization-fix'
Test fix. * js/test-junit-finalization-fix: tests(junit-xml): avoid invalid XML
-rw-r--r--t/test-lib.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index b831e1d252..dfe93a6fb6 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1072,6 +1072,7 @@ finalize_junit_xml () {
junit_time=$(test-tool date getnanos $junit_suite_start)
sed -e "s/\(<testsuite.*\) time=\"[^\"]*\"/\1/" \
-e "s/<testsuite [^>]*/& time=\"$junit_time\"/" \
+ -e '/^ *<\/testsuite/d' \
<"$junit_xml_path" >"$junit_xml_path.new"
mv "$junit_xml_path.new" "$junit_xml_path"