]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/run-integration-tests.sh
core: use id unit when retrieving unit file state (#8038)
[thirdparty/systemd.git] / test / run-integration-tests.sh
CommitLineData
8fe9c8d9
LP
1#!/bin/bash -e
2
ded65775 3BUILD_DIR="$($(dirname "$0")/../tools/find-build-dir.sh)"
2535f23d
ZJS
4if [ $# -gt 0 ]; then
5 args="$@"
6else
7 args="clean setup run"
8fi
8fe9c8d9 9
ded65775 10ninja -C "$BUILD_DIR"
8fe9c8d9
LP
11
12declare -A results
13
14RESULT=0
15FAILURES=0
16
ded65775 17cd "$(dirname "$0")"
8fe9c8d9
LP
18for TEST in TEST-??-* ; do
19 echo -e "\n--x-- Starting $TEST --x--"
20 set +e
2535f23d 21 make -C "$TEST" "BUILD_DIR=$BUILD_DIR" $args
8fe9c8d9
LP
22 RESULT=$?
23 set -e
24 echo "--x-- Result of $TEST: $RESULT --x--"
25
26 results["$TEST"]="$RESULT"
27
28 [ "$RESULT" -ne "0" ] && FAILURES=$(($FAILURES+1))
29done
30
31echo ""
32
33for TEST in ${!results[@]}; do
34 RESULT="${results[$TEST]}"
35 if [ "$RESULT" -eq "0" ] ; then
36 echo "$TEST: SUCCESS"
37 else
38 echo "$TEST: FAIL"
39 fi
40done | sort
41
42if [ "$FAILURES" -eq 0 ] ; then
43 echo -e "\nALL PASSED"
44else
45 echo -e "\nTOTAL FAILURES: $FAILURES"
46fi
47
48exit "$FAILURES"