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