1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00
picom/tests/run_one_test.sh
Yuxuan Shui 44fd3f93f7
tests: add test case for #239
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:36:09 +01:00

19 lines
377 B
Bash
Executable file

#!/bin/sh
set -xe
if [ -z $DISPLAY ]; then
exec xvfb-run -s "+extension composite" -a $0 $1 $2 $3
fi
echo "Running test $2"
# TODO keep the log file, and parse it to see if test is successful
($1 --experimental-backends --backend dummy --log-level=debug --log-file=$PWD/log --config=$2) &
compton_pid=$!
$3
kill -INT $compton_pid || true
cat log
rm log
wait $compton_pid