2019-08-04 14:50:34 -04:00
|
|
|
#!/bin/sh
|
2019-09-23 16:14:02 -04:00
|
|
|
set -xe
|
2019-08-04 14:50:34 -04:00
|
|
|
if [ -z $DISPLAY ]; then
|
2019-09-23 16:11:16 -04:00
|
|
|
exec xvfb-run -s "+extension composite" -a $0 $1 $2 $3
|
2019-08-04 14:50:34 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Running test $2"
|
|
|
|
|
|
|
|
# TODO keep the log file, and parse it to see if test is successful
|
2022-08-21 01:00:43 -04:00
|
|
|
($1 --dbus --backend dummy --log-level=debug --log-file=$PWD/log --config=$2) &
|
2019-10-23 14:27:30 -04:00
|
|
|
main_pid=$!
|
2019-09-23 16:11:16 -04:00
|
|
|
$3
|
2019-08-04 14:50:34 -04:00
|
|
|
|
2019-10-23 14:27:30 -04:00
|
|
|
kill -INT $main_pid || true
|
2019-08-04 19:05:23 -04:00
|
|
|
cat log
|
|
|
|
rm log
|
2019-10-23 14:27:30 -04:00
|
|
|
wait $main_pid
|
2019-08-04 14:50:34 -04:00
|
|
|
|
|
|
|
|