]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove test directory for skipped test suite
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 24 Jul 2020 13:57:08 +0000 (15:57 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 24 Jul 2020 13:57:08 +0000 (15:57 +0200)
test/run

index 469a831742a2652ec82b4585e3d2a01e4c2ad53d..eb17a04fe350730c2fb91d7dc00d9a1f88d1197b 100755 (executable)
--- a/test/run
+++ b/test/run
@@ -21,6 +21,7 @@
 # this program; if not, write to the Free Software Foundation, Inc., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
+skip_code=125
 
 # only use ansi color codes if output is to a terminal
 if [[ -t 1 ]]; then
@@ -287,15 +288,17 @@ run_suite() {
         if [ -n "$skip_reason" ]; then
             echo "Skipped test suite $suite_name [$skip_reason]"
             if [ -n "$EXIT_IF_SKIPPED" ]; then
-                exit 125
+                return $skip_code
             fi
-            return
+            return 0
         fi
     fi
 
     printf "Running test suite %s" "$(bold $suite_name)"
     SUITE_$suite_name
     echo
+
+    return 0
 }
 
 TEST() {
@@ -532,11 +535,22 @@ if [ -z "$suites" ]; then
     suites="$all_suites"
 fi
 
+skipped=false
 for suite in $suites; do
     run_suite $suite
+    if [ $? -eq $skip_code ]; then
+        skipped=true
+        break
+    fi
 done
 
 cd /
 rm -rf $ABS_TESTDIR
-green PASSED
-exit 0
+
+if $skipped; then
+    exit $skip_code
+else
+    green PASSED
+    exit 0
+fi
+