Codebase list firejail / db2f9df
Add autopkgtests to run upstream's test suite Reiner Herrmann 7 years ago
4 changed file(s) with 60 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1717 dh_auto_install
1818 # documentation will be installed by debhelper
1919 rm --verbose -rf debian/firejail/usr/share/doc/firejail
20
21 override_dh_auto_test:
22 # skip tests here as they are run as autopkgtest
0 Tests: run-tests
1 Restrictions: allow-stderr, breaks-testbed
2 Depends: @, expect, file, strace, sudo, man-db, csh, zsh, xvfb, xserver-xephyr, xterm, evince, icedove, firefox, transmission-gtk
3
4 Tests: run-network-test
5 Restrictions: allow-stderr, breaks-testbed, isolation-container, needs-root
6 Depends: @, expect, iproute2, net-tools, bridge-utils
0 #!/bin/bash
1
2 LOGFILE="$ADTTMP/test-network.log"
3
4 # copy tests to temporary directory, as current one might be read-only
5 cp -a test "$ADTTMP"
6 cd "$ADTTMP/test"
7
8 pushd network
9 bash -x ./configure
10 runuser -u nobody -g nogroup -- bash -x ./network.sh | tee "$LOGFILE"
11 popd
12
13 echo "======================================"
14 grep "TESTING" "$LOGFILE"
15 echo "======================================"
16
17 [ $(grep -c "TESTING ERROR" "$LOGFILE") -gt 0 ] && exit 1
18
19 exit 0
0 #!/bin/bash
1
2 LOGFILE="$ADTTMP/test.log"
3
4 # copy tests to temporary directory, as current one might be read-only
5 cp -a test "$ADTTMP"
6 cd "$ADTTMP/test"
7
8 # start Xvfb for X11 tests
9 Xvfb :42 &
10 XVFB_PID=$!
11 export DISPLAY=:42.0
12
13 # run tests
14 for dir in apps apps-x11 filters fs profiles utils environment;
15 do
16 pushd $dir
17 bash -x ./$dir.sh | tee -a "$LOGFILE"
18 popd
19 done
20
21 echo "======================================"
22 grep "TESTING" "$LOGFILE"
23 echo "======================================"
24
25 kill $XVFB_PID
26
27 [ $(grep -c "TESTING ERROR" "$LOGFILE") -gt 0 ] && exit 1
28
29 exit 0