File: run_one_test.sh

package info (click to toggle)
picom 12.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,492 kB
  • sloc: ansic: 28,038; python: 548; sh: 365; makefile: 11
file content (30 lines) | stat: -rwxr-xr-x 575 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -xe
if [ -z $DISPLAY ]; then
	exec xvfb-run -s "+extension composite" -a $0 $1 $2 $3
fi

echo "Running test $2"

picom_exe=$1
config=$2
test_script=$3

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

	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