From 4899e00b808141bac0258883a0d4a40472e712e9 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Mon, 12 Nov 2018 15:27:40 +0900 Subject: [PATCH] Added option "-p" showing the progress With -p the progress is printed out. Signed-off-by: MyungJoo Ham --- ssat.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ssat.sh b/ssat.sh index 6e039de..8c0d930 100755 --- a/ssat.sh +++ b/ssat.sh @@ -40,6 +40,7 @@ TESTCASE="runTest.sh" # SILENT=1 +PROGRESS=0 date=`date +"%b %d %Y"` ## @fn createTemplate() @@ -114,6 +115,9 @@ do printf "Create a template 'runTest.sh' test group at your current directory\n" printf " --createtemplate or -c\n" printf "\n" + printf "Show progress during execution\n" + printf " --progress or -p\n" + printf "\n" printf "Shows this message\n" printf " --help or -h\n" printf " $ ${BASENAME} --help \n" @@ -137,6 +141,10 @@ do createTemplate shift ;; + -p|--progress) + PROGRESS=1 + shift + ;; *) # Unknown, which is probably target (the path to root-dir of test groups). TARGET="$1" shift @@ -168,6 +176,9 @@ do Nfail=0 tmpfile=$(mktemp) + if [[ "$PROGRESS" -eq "1" ]]; then + printf "[Starting] $CASENAME\n" + fi pushd $CASEBASEPATH > /dev/null output=$(. $file $CASEBASEPATH) retcode=$? -- 2.7.4