Failing ignorable case should not alarm administrators accepted/tizen/unified/20191211.022200 submit/tizen/20191211.013828
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 15 Oct 2019 04:43:28 +0000 (13:43 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 15 Oct 2019 04:43:28 +0000 (13:43 +0900)
If a case "ignorable" fails, count it seperatedly so that it does not alarm administrators.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
ssat-api.sh
ssat.sh

index 4f4ecee..101f037 100644 (file)
@@ -84,7 +84,7 @@ function report() {
                        writef "${Red}[FAILED]${NC} Test Group $_group has ${Red}failed cases ($_fail)${NC}"
                else
                        writef "${Green}==================================================${NC}"
-                       writef "${LightGreen}[PASSED]${NC} Test Group $_group has ${Red}failed cases ($_fail), but they are not critical.${NC}"
+                       writef "${LightGreen}[PASSED]${NC} Test Group $_group has ${Red}failed cases ($_fail), but they are ignorable cases and not critical.${NC}"
                fi
        fi
 
@@ -93,7 +93,9 @@ function report() {
        # do nothing
                echo ""
        else
-               writef "${_cases},${_pass},${_fail}"
+               _ignore=$((_fail-_criticalFail))
+               _fail=${criticalFail}
+               writef "${_cases},${_pass},${_fail},${_ignore}"
                echo "${ResultLog}" > ${_filename}
                printf "\n${_filename}\n"
        fi
@@ -157,7 +159,7 @@ function testResult() {
                _fail=$((_fail+1))
                if [[ "${4}" == "1" ]]
                then
-                       writef "${Purple}[FAILED][Ignorable] $2${NC}:${Purple}$3${NC}"
+                       writef "${Purple}[IGNORED] $2${NC}:${Purple}$3${NC}"
                else
                        writef "${Red}[FAILED][Critical] $2${NC}:${Purple}$3${NC}"
                        _criticalFail=$((_criticalFail+1))
diff --git a/ssat.sh b/ssat.sh
index b049a83..a050242 100755 (executable)
--- a/ssat.sh
+++ b/ssat.sh
@@ -169,6 +169,7 @@ fi
 TNtc=0
 TNtcpass=0
 TNtcfail=0
+TNtcignore=0
 TNgroup=0
 TNgrouppass=0
 TNgroupfail=0
@@ -203,11 +204,13 @@ do
        Ntc=$1
        Npass=$2
        Nfail=$3
+       Nignore=$4
        unset IFS
 
        TNtc=$((TNtc+Ntc))
        TNtcpass=$((TNtcpass+Npass))
        TNtcfail=$((TNtcfail+Nfail))
+       TNtcignore=$((TNtcignore+Nignore))
 
        TNgroup=$((TNgroup+1))
        if [[ "$retcode" -eq "0" ]]
@@ -232,11 +235,11 @@ printf "==================================================\n"
 if (( ${TNgroupfail} == 0 ))
 then
        printf "${LightGreen}[PASSED] ${Blue}All Test Groups (${TNgroup}) Passed!${NC}\n"
-       printf "         TC Passed: ${TNtcpass} / Failed: ${TNtcfail}\n\n";
+       printf "         TC Passed: ${TNtcpass} / Failed: ${TNtcfail} / Ignored: ${TNtcignore}\n\n";
        exit 0
 else
        printf "${Red}[FAILED] ${Purple}There are failed test groups! (${TNgroupfail})${NC}\n"
-       printf "         TC Passed: ${TNtcpass} / Failed: ${TNtcfail}\n\n";
+       printf "         TC Passed: ${TNtcpass} / Failed: ${TNtcfail} / Ignored: ${TNtcignore}\n\n";
        exit 1
 fi
 # gather reports & publish them.