From 586bb1f02877d2988b7ba273e5455f82a4a21a75 Mon Sep 17 00:00:00 2001 From: Minhan Xia Date: Tue, 28 Jun 2016 15:02:36 -0700 Subject: [PATCH] rename junit file --- 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 866ea504e55..d96e7b7a98f 100755 --- a/third_party/forked/shell2junit/sh2ju.sh +++ b/third_party/forked/shell2junit/sh2ju.sh @@ -43,7 +43,7 @@ function eVal() { # Method to clean old tests function juLogClean() { echo "+++ Removing old junit reports from: $juDIR " - rm -f "$juDIR"/TEST-* + rm -f "$juDIR"/junit-* } # Execute a command and record its results @@ -151,23 +151,23 @@ $errMsg " ## testsuite block - if [[ -e "$juDIR/TEST-$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/TEST-$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/TEST-$suite.xml" - sed -i "0,/errors=\"$failCount\"/ s/errors=\"$failCount\"/errors=\"$errors\"/" "$juDIR/TEST-$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/TEST-$suite.xml ## remove testSuite so we can add it later - cat <> "$juDIR/TEST-$suite.xml" + sed -i "s^^^g" $juDIR/junit-$suite.xml ## remove testSuite so we can add it later + cat <> "$juDIR/junit-$suite.xml" $content EOF else # no file exists. Adding a new file - cat < "$juDIR/TEST-$suite.xml" + cat < "$juDIR/junit-$suite.xml" $content