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