From fa91eb4496ae57cb88d5c1be909d59a5b179b107 Mon Sep 17 00:00:00 2001 From: ymqytw Date: Thu, 15 Jun 2017 13:38:41 -0700 Subject: [PATCH] fix naming for testgrid --- third_party/forked/shell2junit/sh2ju.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/third_party/forked/shell2junit/sh2ju.sh b/third_party/forked/shell2junit/sh2ju.sh index c33d6f3ce06..2db50941628 100755 --- a/third_party/forked/shell2junit/sh2ju.sh +++ b/third_party/forked/shell2junit/sh2ju.sh @@ -146,17 +146,17 @@ $errMsg " ## testsuite block - if [[ -e "$juDIR/junit-$suite.xml" ]]; then + if [[ -e "$juDIR/junit_$suite.xml" ]]; then # file exists. first update the failures count - failCount=`sed -n "s/.*testsuite.*failures=\"\([0-9]*\)\".*/\1/p" "$juDIR/junit-$suite.xml"` + failCount=`sed -n "s/.*testsuite.*failures=\"\([0-9]*\)\".*/\1/p" "$juDIR/junit_$suite.xml"` errors=$(($failCount+$errors)) - sed -i "0,/failures=\"$failCount\"/ s/failures=\"$failCount\"/failures=\"$errors\"/" "$juDIR/junit-$suite.xml" - sed -i "0,/errors=\"$failCount\"/ s/errors=\"$failCount\"/errors=\"$errors\"/" "$juDIR/junit-$suite.xml" + sed -i "0,/failures=\"$failCount\"/ s/failures=\"$failCount\"/failures=\"$errors\"/" "$juDIR/junit_$suite.xml" + sed -i "0,/errors=\"$failCount\"/ s/errors=\"$failCount\"/errors=\"$errors\"/" "$juDIR/junit_$suite.xml" # file exists. Need to append to it. If we remove the testsuite end tag, we can just add it in after. - sed -i "s^^^g" $juDIR/junit-$suite.xml ## remove testSuite so we can add it later - sed -i "s^^^g" $juDIR/junit-$suite.xml - cat <> "$juDIR/junit-$suite.xml" + sed -i "s^^^g" $juDIR/junit_$suite.xml ## remove testSuite so we can add it later + sed -i "s^^^g" $juDIR/junit_$suite.xml + cat <> "$juDIR/junit_$suite.xml" $content @@ -164,7 +164,7 @@ EOF else # no file exists. Adding a new file - cat < "$juDIR/junit-$suite.xml" + cat < "$juDIR/junit_$suite.xml"