summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-03-17 15:02:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-03-17 15:02:25 -0700
commit618db3621a845e02d0e557f9eed4908facbabb22 (patch)
tree737d40e5fd2124721e7a9d6cf783411c81f9b708 /t
parentMerge branch 'en/simplify-check-updates-in-unpack-trees' into maint (diff)
parenttests: fix --write-junit-xml with subshells (diff)
downloadtgif-618db3621a845e02d0e557f9eed4908facbabb22.tar.xz
Merge branch 'js/test-write-junit-xml-fix' into maint
Testfix. * js/test-write-junit-xml-fix: tests: fix --write-junit-xml with subshells
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 44df51be8f..0ea1e5a05e 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1083,7 +1083,8 @@ finalize_junit_xml () {
# adjust the overall time
junit_time=$(test-tool date getnanos $junit_suite_start)
- sed "s/<testsuite [^>]*/& time=\"$junit_time\"/" \
+ sed -e "s/\(<testsuite.*\) time=\"[^\"]*\"/\1/" \
+ -e "s/<testsuite [^>]*/& time=\"$junit_time\"/" \
<"$junit_xml_path" >"$junit_xml_path.new"
mv "$junit_xml_path.new" "$junit_xml_path"