From: MyungJoo Ham Date: Wed, 18 Dec 2019 03:29:22 +0000 (+0900) Subject: Add "--summary " option X-Git-Tag: accepted/tizen/unified/20191218.120945^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db596b61adbb8d5c4fe4f7aff25d003bab6ccd45;p=platform%2Fupstream%2FSSAT.git Add "--summary " option Write a summary of test results to the given filename. Signed-off-by: MyungJoo Ham --- diff --git a/ssat.sh b/ssat.sh index a050242..d01f59f 100755 --- a/ssat.sh +++ b/ssat.sh @@ -37,6 +37,7 @@ TARGET=$(pwd) BASEPATH=`dirname "$0"` BASENAME=`basename "$0"` TESTCASE="runTest.sh" +SUMMARYFILENAME="" # SILENT=1 @@ -125,6 +126,9 @@ do printf "Shows this message\n" printf " --help or -h\n" printf " $ ${BASENAME} --help \n" + printf "\n" + printf "Write result summary as a file\n" + printf " --summary \n" printf "\n\n" exit 0 ;; @@ -153,6 +157,11 @@ do VALGRIND=1 shift ;; + --summary) + SUMMARYFILENAME="$2" + shift + shift + ;; *) # Unknown, which is probably target (the path to root-dir of test groups). TARGET="$1" shift @@ -232,6 +241,10 @@ printf "==================================================\n\n" printf "$groupLog" printf "==================================================\n" +if [ "${SUMMARYFILENAME}" != "" ] +then + echo "passed=${TNtcpass}, failed=${TNtcfail}, ignored=${TNtcignore}" > "${SUMMARYFILENAME}" +fi if (( ${TNgroupfail} == 0 )) then printf "${LightGreen}[PASSED] ${Blue}All Test Groups (${TNgroup}) Passed!${NC}\n"