2019-08-05 02:50:34 +08:00
|
|
|
#!/bin/sh
|
2019-09-24 04:11:16 +08:00
|
|
|
set -x
|
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
|
2019-09-24 04:11:16 +08:00
|
|
|
($1 --experimental-backends --backend dummy --log-level=debug --log-file=$PWD/log --config=$2) &
|
2019-08-05 02:50:34 +08:00
|
|
|
compton_pid=$!
|
2019-09-24 04:11:16 +08:00
|
|
|
$3
|
2019-08-05 02:50:34 +08:00
|
|
|
|
|
|
|
kill -INT $compton_pid
|
2019-09-24 04:11:16 +08:00
|
|
|
wait $compton_pid
|
2019-08-05 07:05:23 +08:00
|
|
|
cat log
|
|
|
|
rm log
|
2019-08-05 02:50:34 +08:00
|
|
|
|
|
|
|
|