From 3597bf75502a607c4cdf10f34f3082b1606d6abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 25 Mar 2020 13:46:44 +0100 Subject: [PATCH] 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 --- test/run-integration-tests.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/run-integration-tests.sh b/test/run-integration-tests.sh index bcbbb8b7ed..5c6c21ea09 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