Merge branch 'js/test-write-junit-xml-fix' into maint

Testfix.

* js/test-write-junit-xml-fix:
  tests: fix --write-junit-xml with subshells
This commit is contained in:
Junio C Hamano 2020-03-17 15:02:25 -07:00
Родитель 50e1b4166f 076ee3e8a2
Коммит 618db3621a
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -1083,7 +1083,8 @@ finalize_junit_xml () {
# adjust the overall time # adjust the overall time
junit_time=$(test-tool date getnanos $junit_suite_start) 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" <"$junit_xml_path" >"$junit_xml_path.new"
mv "$junit_xml_path.new" "$junit_xml_path" mv "$junit_xml_path.new" "$junit_xml_path"