summaryrefslogtreecommitdiffstats
path: root/debian/tests/root-unittests
blob: 96416e286a2ad3c85cedd0e4bcdc1f3bf2c29f4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
set -eu

EXFAIL=""

res=0
for t in /usr/lib/systemd/tests/test-*; do
    tname=$(basename $t)
    # test-udev needs special prep and has its own test
    [ "$tname" != test-udev ] || continue
    echo "====== $tname ======="
    # exit code 77 means "skip"
    rc=0
    $t || rc=$?
    if [ "$rc" = 0 ]; then
        echo "PASS: $tname"
    elif [ "$rc" = 77 ]; then
        echo "SKIP: $tname"
    elif [ "${EXFAIL%$tname*}" != "$EXFAIL" ]; then
        echo "EXFAIL: $tname"
    else
        echo "FAIL: $tname (code: $rc)"
        res=$rc
    fi
done
exit $res