From a8eeb332ccf4d13b3fdcc382397bd3ea45e76212 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 18 Sep 2017 17:34:29 -0700 Subject: [PATCH] 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 Reviewed-by: Adam Jackson --- meson.build | 1 + test/meson.build | 24 ++++++++++++++++++++++++ test/scripts/xephyr-glamor-piglit.sh | 7 +++++++ test/scripts/xvfb-piglit.sh | 7 +++++++ 4 files changed, 39 insertions(+) create mode 100644 test/meson.build 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"