diff options
Diffstat (limited to 'debian/tests/root')
-rwxr-xr-x | debian/tests/root | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/debian/tests/root b/debian/tests/root new file mode 100755 index 00000000..ceab6dc8 --- /dev/null +++ b/debian/tests/root @@ -0,0 +1,39 @@ +#!/bin/sh +# Run some tests as root. Output TAP format because why not + +set -e + +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/lib/dbus-1.0/installed-tests/dbus +do + DBUS_TEST_DATA="$d/data" + export DBUS_TEST_DATA + + for t in $d/test-uid-permissions + do + i=$(( $i + 1 )) + echo "# $i - $t ..." + echo "x" > "$ADTTMP/result" + ( set +e; $timeout $t; echo "$?" > "$ADTTMP/result" ) 2>&1 | sed 's/^/# /' + e="$(cat "$ADTTMP/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 |