diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-05-30 15:07:48 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-05-30 15:07:48 +0200 |
commit | faa88343f0dbf1259fbc1cd8f00c14dd24b5feaa (patch) | |
tree | 71b544084021e7e4d86988daa161f0fa0871ce21 | |
parent | f6e1c8fe15669ded3dc6adc203493ba1f9a9518e (diff) |
test-x: Try to run tests without fluxbox
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-rwxr-xr-x | test/run_test.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/run_test.sh b/test/run_test.sh index a41de6a8..35603594 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -9,9 +9,11 @@ function create_fake_x ( ) Xvfb +extension XINERAMA +xinerama -screen 0 1280x1024x24 -screen 1 800x600x24 ${DISPLAY} &>test-x-logs/xserver-:$1.log & XPID=$! sleep 1; - timeout -k 30s 30s fluxbox &>test-x-logs/fluxbox-:$1.log & - FPID=$! - sleep 1 + if [ -x "$(which fluxbox 2>/dev/null)" ]; then + timeout -k 30s 30s fluxbox &>test-x-logs/fluxbox-:$1.log & + FPID=$! + sleep 1 + fi } function destroy_fake_x ( ) @@ -19,9 +21,11 @@ function destroy_fake_x ( ) if [ -n "${XPID}" ] then echo "Stopping fake X: ${XPID} - ${FPID}" - kill ${FPID} - echo " wait flux" - wait ${FPID} + if [ -n "${FPID}" ]; then + kill ${FPID} + echo " wait flux" + wait ${FPID} + fi kill ${XPID} echo "wait x" wait ${XPID} |