Parcourir la source

gestion des tests skip

David Sniperovitch il y a 8 ans
Parent
commit
b70e70a771
3 fichiers modifiés avec 9 ajouts et 5 suppressions
  1. 1 1
      t/05_1c_1d_1p_priv_export
  2. 1 1
      t/06_1c_1d_1p_priv
  3. 7 3
      t/alltests

+ 1 - 1
t/05_1c_1d_1p_priv_export

@@ -5,7 +5,7 @@ printf "$PRINTFPATTERN" $0 : "1 Compilation. 1 Dossier. 1 Projet. Pad Privé. ex
 if test "$TRAVIS" == "true";
 then
   echo "[ SKIP ]"
-  exit 0
+  exit 99
 fi
 
 URL_BASE=https%3A%2F%2Fpad.exegetes.eu.org%2Fgroup.html%2F19%2Fpad.html%2Fg.STVKtWnA83RsmVUC%24Abro2-PRIVE%2Fexport%2Ftxt

+ 1 - 1
t/06_1c_1d_1p_priv

@@ -5,7 +5,7 @@ printf "$PRINTFPATTERN" $0 : "1 Compilation. 1 Dossier. 1 Projet. Pad Privé."
 if test "$TRAVIS" == "true";
 then
   echo "[ SKIP ]"
-  exit 0
+  exit 99
 fi
 
 URL_BASE=https%3A%2F%2Fpad.exegetes.eu.org%2Fgroup.html%2F19%2Fpad.html%2Fg.STVKtWnA83RsmVUC%24Abro2-PRIVE

+ 7 - 3
t/alltests

@@ -2,6 +2,7 @@
 MAXRC=0
 testOK=0
 testFAILED=0
+testSKIPPED=0
 testCOUNT=0
 export PRINTFPATTERN='%-31s %s %-70s'
 for test in t/*;
@@ -13,7 +14,10 @@ do
     $test
     RC=$?
     printf "RC:=(%d) (%s)\n\n" $RC $test
-    if test "$RC" -ne "0";
+    if test "$RC" -eq "99";
+    then
+      testSKIPPED=$(($testSKIPPED + 1))
+    elif test "$RC" -ne "0";
     then
       MAXRC="$RC"
       testFAILED=$(($testFAILED + 1))
@@ -25,9 +29,9 @@ done
 
 if test "$MAXRC" -eq "0";
 then
-  echo "All tests : OK:$testOK/$testCOUNT FAILED:$testFAILED/$testCOUNT [  OK  ]"
+  echo "All tests : OK:$testOK/$testCOUNT FAILED:$testFAILED/$testCOUNT SKIPPED=$testSKIPPED/$testCOUNT [  OK  ]"
 else
-  echo "All tests : OK:$testOK/$testCOUNT FAILED:$testFAILED/$testCOUNT [FAILED]"
+  echo "All tests : OK:$testOK/$testCOUNT FAILED:$testFAILED/$testCOUNT SKIPPED=$testSKIPPED/$testCOUNT [FAILED]"
 fi
 
 exit $MAXRC