summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-09-18 17:34:29 -0700
committerAdam Jackson <ajax@redhat.com>2017-09-20 13:19:25 -0400
commita8eeb332ccf4d13b3fdcc382397bd3ea45e76212 (patch)
treeeefdcef98f34f09170508f082f052465e6fbcefd
parenta09743c9300f805d6527368ddcf44f5dccd4b366 (diff)
meson: Add Xvfb and Xephyr-glamor testing.
The Xvfb tests are passing and Xephyr-glamor is failing for me, but it fails identically on autotools. It's disabled on Travis for now because the >10 minutes of silence during testing times out the entire build. v2: Fix the disable on travis. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--meson.build1
-rw-r--r--test/meson.build24
-rwxr-xr-xtest/scripts/xephyr-glamor-piglit.sh7
-rwxr-xr-xtest/scripts/xvfb-piglit.sh7
4 files changed, 39 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 3efec0def..ea2a01520 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 000000000..b71d7e249
--- /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 51d42c313..c16fdc4f3 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_BUILD_DIR" != "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 763599ef4..ae9f4662e 100755
--- a/test/scripts/xvfb-piglit.sh
+++ b/test/scripts/xvfb-piglit.sh
@@ -1,3 +1,10 @@
+#!/bin/sh
+
+# this times out on Travis, because the tests take too long.
+if test "x$TRAVIS_BUILD_DIR" != "x"; then
+ exit 77
+fi
+
export SERVER_COMMAND="$XSERVER_BUILDDIR/hw/vfb/Xvfb \
-noreset \
-screen scrn 1280x1024x24"