File: root-unittests

package info (click to toggle)
systemd 232-25+deb9u11
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 46,164 kB
  • sloc: ansic: 290,592; xml: 49,217; makefile: 5,503; sh: 4,031; python: 2,596; perl: 1,838
file content (37 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (2)
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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
set -eu

# these tests fail because of the hardcoded TESTS_DIR; make overridable with env var
EXFAIL="test-dns-packet
test-cgroup-mask
test-engine
test-execute
test-path
test-sched-prio
test-journal-importer
"

# No items in catalog.
# Assertion 'r >= 0' failed at ../src/journal/test-catalog.c:252, function main(). Aborting.
EXFAIL="$EXFAIL
test-catalog
"

res=0
for t in $(cat /usr/lib/*/systemd-tests/unittests.txt); do
    echo "====== $t ======="
    # exit code 77 means "skip"
    rc=0
    /usr/lib/*/systemd-tests/$t || rc=$?
    if [ "$rc" = 0 ]; then
        echo "PASS: $t"
    elif [ "$rc" = 77 ]; then
        echo "SKIP: $t"
    elif [ "${EXFAIL%$t*}" != "$EXFAIL" ]; then
        echo "EXFAIL: $t"
    else
        echo "FAIL: $t (code: $rc)"
        res=$rc
    fi
done
exit $res