summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-17 21:22:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-17 21:22:18 (GMT)
commit966b69f02f3e6016303f3cf6fcd5e741d376caf6 (patch)
tree2bb39294900c193c6c81361cbe9a251468b4ca60
parentd880c3de231da4ff930d12e07b3cae9dc0c31415 (diff)
parent076ee3e8a2a631671dea5787924ed3181c5a919c (diff)
downloadgit-966b69f02f3e6016303f3cf6fcd5e741d376caf6.zip
git-966b69f02f3e6016303f3cf6fcd5e741d376caf6.tar.gz
git-966b69f02f3e6016303f3cf6fcd5e741d376caf6.tar.bz2
Merge branch 'js/test-write-junit-xml-fix'
Testfix. * js/test-write-junit-xml-fix: tests: fix --write-junit-xml with subshells
-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 44df51b..0ea1e5a 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"