From: Zbigniew Jędrzejewski-Szmek Date: Wed, 25 Mar 2020 12:46:44 +0000 (+0100) Subject: run-integration-tests: add support for blacklisting X-Git-Tag: v246-rc1~601^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3597bf75502a607c4cdf10f34f3082b1606d6abd;p=thirdparty%2Fsystemd.git run-integration-tests: add support for blacklisting 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 --- diff --git a/test/run-integration-tests.sh b/test/run-integration-tests.sh index bcbbb8b7ed4..5c6c21ea09b 100755 --- a/test/run-integration-tests.sh +++ b/test/run-integration-tests.sh @@ -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