File: root

package info (click to toggle)
dbus 1.16.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,048 kB
  • sloc: ansic: 106,015; xml: 9,270; sh: 1,967; python: 242; makefile: 230; cpp: 27
file content (59 lines) | stat: -rwxr-xr-x 1,344 bytes parent folder | download | duplicates (3)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Run some tests as root. Output TAP format because why not

set -e
set -u
NULL=

if [ -z "${HOME-}" ] || ! [ -w "${HOME}" ]; then
    export HOME="${AUTOPKGTEST_TMP}"
fi

timeout="timeout 300s"
ret=0
i=0

for d in /usr/lib/dbus-1.0/installed-tests/dbus /usr/lib/dbus-1.0/debug-build/libexec/installed-tests/dbus
do
    export DBUS_TEST_DATA="$d/data"
    export DBUS_TEST_EXEC="$d"
    case "$d" in
        (*/debug-build/*)
            export PATH="/usr/lib/dbus-1.0/debug-build/bin:$PATH"
            ;;
    esac

    for t in \
        $d/test-dbus-daemon \
        $d/test-uid-permissions \
        ${NULL}
    do
        i=$(( $i + 1 ))
        echo "# Subtest: $t"
        echo "x" > "$AUTOPKGTEST_TMP/result"
        (
            set +e
            # One test needs us to have a small fd limit
            ulimit -S -n 1024
            ulimit -H -n 1024
            $timeout $t --tap
            echo "$?" > "$AUTOPKGTEST_TMP/result"
        ) | sed 's/^/    /'
        e="$(cat "$AUTOPKGTEST_TMP/result")"
        case "$e" in
            (0)
                echo "ok $i - $t"
                ;;
            (77)
                echo "ok $i # SKIP $t"
                ;;
            (*)
                echo "not ok $i - $t ($e)"
                ret=1
                ;;
        esac
    done
done

echo "1..$i"
exit $ret