]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
run-integration-tests: add support for blacklisting
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 25 Mar 2020 12:46:44 +0000 (13:46 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Mar 2020 10:31:10 +0000 (12:31 +0200)
This was done downstream in debian and ubuntu [1]. I want to change the
downstream file to use run-integration-tests so we can change the way tests
work more easily. Let's start moving downstream functionality upstream.

$ sudo BLACKLIST_MARKERS='blacklist-ubuntu-ci-arm64 blacklist-ubuntu-ci' \
   BUILD_DIR=build test/run-integration-tests.sh

[1] https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/tests/upstream

test/run-integration-tests.sh

index bcbbb8b7ed42ecbf6c3a8eb6f4278cd150064756..5c6c21ea09bfed7069b19ef1af3344328b2bf3d7 100755 (executable)
@@ -25,9 +25,21 @@ if [ $do_clean = 1 ]; then
     done
 fi
 
+pass_blacklist() {
+    for marker in $BLACKLIST_MARKERS; do
+        if [ -f "$1/$marker" ]; then
+            echo "========== BLACKLISTED: $1 ($marker) =========="
+            return 1
+        fi
+    done
+    return 0
+}
+
 for TEST in TEST-??-* ; do
     COUNT=$(($COUNT+1))
 
+    pass_blacklist $TEST || continue
+
     echo -e "\n--x-- Running $TEST --x--"
     set +e
     ( set -x ; make -C "$TEST" "BUILD_DIR=$BUILD_DIR" $args )
@@ -41,7 +53,7 @@ for TEST in TEST-??-* ; do
 done
 
 if [ $FAILURES -eq 0 -a $do_clean = 1 ]; then
-    for TEST in TEST-??-* ; do
+    for TEST in ${!results[@]}; do
         ( set -x ; make -C "$TEST" "BUILD_DIR=$BUILD_DIR" clean-again )
     done
 fi