summaryrefslogtreecommitdiff
path: root/tests/virtualfb.sh
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-01-28 05:38:50 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-01-28 05:38:50 (GMT)
commitd6f2cc1a1e6f7bc55d137d653242086c29a1bf32 (patch)
tree6f9612971383d26374bbcf75b389d311a56bf492 /tests/virtualfb.sh
parentd0856efe6da545693f9c50a8a2514a9f999ab5ef (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-xtests/virtualfb.sh22
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
contact: Jan Huwald // Impressum