]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: run clean-again between tests, not at the end 31868/head
authorLuca Boccassi <bluca@debian.org>
Thu, 21 Mar 2024 11:11:01 +0000 (11:11 +0000)
committerLuca Boccassi <bluca@debian.org>
Thu, 21 Mar 2024 11:11:01 +0000 (11:11 +0000)
So that we free up space for the next run, as we are seeing disk space
issues on Ubuntu CI due to the many images built and left around

test/run-integration-tests.sh

index 833f6093aae832090e1406352ac877718286037e..e1c0c0ae9c00554f8f9b9aa9e0892114abb29768 100755 (executable)
@@ -118,14 +118,12 @@ if [[ ${#ARGS[@]} -ne 0 ]]; then
         RESULTS["$test"]="$result"
         TIMES["$test"]="$SECONDS"
 
-        [[ "$result" -ne 0 ]] && FAILURES=$((FAILURES + 1))
-    done
-fi
-
-# Run clean-again, if requested, and if no tests failed
-if [[ $FAILURES -eq 0 && $CLEAN_AGAIN -eq 1 ]]; then
-    for test in "${!RESULTS[@]}"; do
-        test_run "$test" make -C "$test" clean-again
+        # Run clean-again here to free up space, if requested, and if the test succeeded
+        if [[ "$result" -ne 0 ]]; then
+            FAILURES=$((FAILURES + 1))
+        elif [[ $CLEAN_AGAIN -eq 1 ]]; then
+            test_run "$test" make -C "$test" clean-again
+        fi
     done
 fi