From: Lennart Poettering Date: Tue, 28 Nov 2017 18:42:15 +0000 (+0100) Subject: test: add a simple script that runs all our integration tests one after the other X-Git-Tag: v236~65^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8fe9c8d9200f1b5e1bdd5f7bdf38d6a37b7412e7;p=thirdparty%2Fsystemd.git test: add a simple script that runs all our integration tests one after the other --- diff --git a/test/run-integration-tests.sh b/test/run-integration-tests.sh new file mode 100755 index 00000000000..3ece46c7717 --- /dev/null +++ b/test/run-integration-tests.sh @@ -0,0 +1,45 @@ +#!/bin/bash -e + +if ! test -d ../build ; then + echo "Expected build directory in ../build, but couldn't find it." >&2 + exit 1 +fi + +ninja -C ../build + +declare -A results + +RESULT=0 +FAILURES=0 + +for TEST in TEST-??-* ; do + echo -e "\n--x-- Starting $TEST --x--" + set +e + make -C "$TEST" BUILD_DIR=$(pwd)/../build clean setup run + RESULT=$? + set -e + echo "--x-- Result of $TEST: $RESULT --x--" + + results["$TEST"]="$RESULT" + + [ "$RESULT" -ne "0" ] && FAILURES=$(($FAILURES+1)) +done + +echo "" + +for TEST in ${!results[@]}; do + RESULT="${results[$TEST]}" + if [ "$RESULT" -eq "0" ] ; then + echo "$TEST: SUCCESS" + else + echo "$TEST: FAIL" + fi +done | sort + +if [ "$FAILURES" -eq 0 ] ; then + echo -e "\nALL PASSED" +else + echo -e "\nTOTAL FAILURES: $FAILURES" +fi + +exit "$FAILURES"