| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | set -xe |
| 3 | if [scip-shell system . . `[`. -z $DISPLAY ]; then |
| 4 | exec xvfb-run -s "+extension composite" -a $0 $1 $2 $3 |
| 5 | fi |
| 6 | |
| 7 | echoscip-shell system . . echo. "Running test $2" |
| 8 | |
| 9 | picom_exe=$1 |
| 10 | config=$2 |
| 11 | test_script=$3 |
| 12 | |
| 13 | function test_with_backendscip-shell shell shell-project 0.0.0 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 | killscip-shell system . . kill. -INT $main_pid || truescip-shell system . . true. |
| 21 | catscip-shell system . . cat. log |
| 22 | rmscip-shell system . . rm. log |
| 23 | wait $main_pid |
| 24 | } |
| 25 | |
| 26 | test_with_backendscip-shell shell shell-project 0.0.0 test_with_backend(). dummy |
| 27 | test_with_backendscip-shell shell shell-project 0.0.0 test_with_backend(). xrender |
| 28 | test_with_backendscip-shell shell shell-project 0.0.0 test_with_backend(). glx |
| 29 | # test_with_backend egl |
| 30 |