diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-01-28 05:38:50 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-01-28 05:38:50 (GMT) |
commit | d6f2cc1a1e6f7bc55d137d653242086c29a1bf32 (patch) | |
tree | 6f9612971383d26374bbcf75b389d311a56bf492 /tests/virtualfb.sh | |
parent | d0856efe6da545693f9c50a8a2514a9f999ab5ef (diff) |
if we are on linux/BSD and there's no X running, try Xvfb automatically.
also workaround some Gallium bugs and Imagemagick bugs
Diffstat (limited to 'tests/virtualfb.sh')
-rwxr-xr-x | tests/virtualfb.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/virtualfb.sh b/tests/virtualfb.sh new file mode 100755 index 0000000..3c0cf0e --- /dev/null +++ b/tests/virtualfb.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ "`command -v Xvfb`" ]; then + VFB_BINARY=Xvfb +fi + +if [ "`command -v Xvnc`" ]; then + VFB_BINARY=Xvnc +fi + +if [ ! $VFB_BINARY ]; then + echo "$0 Failed, cannot find Xvfb or Xvnc" + exit 1 +fi + +DISPLAY=:98 +$VFB_BINARY $DISPLAY -screen 0 800x600x24 &> virtualfblog & +echo PID=$! " " +echo DISPLAY=$DISPLAY +# trap "kill -KILL $xpid ||:" EXIT +export DISPLAY +sleep 3 |