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