Debian Codegraph @

tests/run_one_test.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2 set -xe
3 if [ -z $DISPLAY ]; then
4 exec xvfb-run -s "+extension composite" -a $0 $1 $2 $3
5 fi
6
7 echo "Running test $2"
8
9 picom_exe=$1
10 config=$2
11 test_script=$3
12
13 function test_with_backend() {
14 backend=$1
15 # TODO keep the log file, and parse it to see if test is successful
16 ($picom_exe --dbus --backend $backend --log-level=debug --log-file=$PWD/log --config=$config) &
17 main_pid=$!
18 $test_script
19
20 kill -INT $main_pid || true
21 cat log
22 rm log
23 wait $main_pid
24 }
25
26 test_with_backend dummy
27 test_with_backend xrender
28 test_with_backend glx
29 # test_with_backend egl
30