[PATCH xserver 3/7] meson: Add Xvfb and Xephyr-glamor testing.

Eric Anholt eric at anholt.net
Thu Aug 3 18:28:47 UTC 2017


The Xvfb tests are passing and Xephyr-glamor is failing for me, but it
fails identically on autotools.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 meson.build                          |  1 +
 test/meson.build                     | 24 ++++++++++++++++++++++++
 test/scripts/xephyr-glamor-piglit.sh |  7 +++++++
 test/scripts/xvfb-piglit.sh          |  2 ++
 4 files changed, 34 insertions(+)
 create mode 100644 test/meson.build

diff --git a/meson.build b/meson.build
index 3efec0def027..ea2a01520eaa 100644
--- a/meson.build
+++ b/meson.build
@@ -426,3 +426,4 @@ libxserver = [
 libxserver += libxserver_dri3
 
 subdir('hw')
+subdir('test')
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 000000000000..b71d7e24909d
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,24 @@
+simple_xinit = executable(
+    'simple-xinit',
+    'simple-xinit.c',
+    include_directories: inc,
+)
+
+piglit_env = environment()
+piglit_env.set('XSERVER_DIR', meson.source_root())
+piglit_env.set('XSERVER_BUILDDIR', meson.build_root())
+
+if get_option('xvfb')
+    test('xvfb-piglit', find_program('scripts/xvfb-piglit.sh'),
+        env: piglit_env,
+        timeout: 1200,
+    )
+
+    if get_option('xephyr') and build_glamor
+        test('xephyr-glamor',
+            find_program('scripts/xephyr-glamor-piglit.sh'),
+            env: piglit_env,
+            timeout: 1200,
+        )
+    endif
+endif
diff --git a/test/scripts/xephyr-glamor-piglit.sh b/test/scripts/xephyr-glamor-piglit.sh
index 51d42c313643..e38a3276d590 100755
--- a/test/scripts/xephyr-glamor-piglit.sh
+++ b/test/scripts/xephyr-glamor-piglit.sh
@@ -1,3 +1,10 @@
+#!/bin/sh
+
+# this times out on Travis, because the tests take too long.
+if test "x$TRAVIS_ROOT" != "x"; then
+    exit 77
+fi
+
 # Start a Xephyr server using glamor.  Since the test environment is
 # headless, we start an Xvfb first to host the Xephyr.
 export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xephyr-glamor
diff --git a/test/scripts/xvfb-piglit.sh b/test/scripts/xvfb-piglit.sh
index 763599ef4ce9..a3aa663b50a1 100755
--- a/test/scripts/xvfb-piglit.sh
+++ b/test/scripts/xvfb-piglit.sh
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 export SERVER_COMMAND="$XSERVER_BUILDDIR/hw/vfb/Xvfb \
         -noreset \
         -screen scrn 1280x1024x24"
-- 
2.13.3



More information about the xorg-devel mailing list