| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
LOGFILE="$AUTOPKGTEST_TMP/test.log" |
| 4 |
|
| 5 |
# copy tests to temporary directory, as current one might be read-only |
| 6 |
cp -a test "$AUTOPKGTEST_TMP" |
| 7 |
cd "$AUTOPKGTEST_TMP/test" |
| 8 |
|
| 9 |
# start Xvfb for X11 tests |
| 10 |
Xvfb :42 & |
| 11 |
XVFB_PID=$! |
| 12 |
export DISPLAY=:42.0 |
| 13 |
|
| 14 |
# run tests |
| 15 |
for dir in apps apps-x11 apps-x11-xorg; |
| 16 |
do |
| 17 |
pushd $dir |
| 18 |
bash -x ./$dir.sh | tee -a "$LOGFILE" |
| 19 |
popd |
| 20 |
done |
| 21 |
|
| 22 |
echo "======================================" |
| 23 |
grep "TESTING" "$LOGFILE" |
| 24 |
echo "======================================" |
| 25 |
|
| 26 |
kill $XVFB_PID |
| 27 |
|
| 28 |
[ $(grep -c "TESTING ERROR" "$LOGFILE") -gt 0 ] && exit 1 |
| 29 |
|
| 30 |
exit 0 |