tests: support specifying config files for tests
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
bfb6cad648
commit
33aa805048
|
@ -1,16 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
if [ -z $DISPLAY ]; then
|
if [ -z $DISPLAY ]; then
|
||||||
exec xvfb-run -s "+extension composite" -a $0 $1 $2
|
exec xvfb-run -s "+extension composite" -a $0 $1 $2 $3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running test $2"
|
echo "Running test $2"
|
||||||
|
|
||||||
# TODO keep the log file, and parse it to see if test is successful
|
# 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) &
|
($1 --experimental-backends --backend dummy --log-level=debug --log-file=$PWD/log --config=$2) &
|
||||||
compton_pid=$!
|
compton_pid=$!
|
||||||
$2
|
$3
|
||||||
|
|
||||||
kill -INT $compton_pid
|
kill -INT $compton_pid
|
||||||
|
wait $compton_pid
|
||||||
cat log
|
cat log
|
||||||
rm log
|
rm log
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
compton=$(realpath $1)
|
compton=$(realpath $1)
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
./run_one_test.sh $compton testcases/basic.py
|
./run_one_test.sh $compton configs/empty.conf testcases/basic.py
|
||||||
|
|
Loading…
Reference in New Issue