From 8d5e0c07b965d545c925c34be95d41c29135a63a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 25 Sep 2016 13:30:16 -0700 Subject: [PATCH] test: Handle srcdir != builddir in Xvfb testing Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt --- test/Makefile.am | 3 ++- test/scripts/xvfb-piglit.sh | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 5a35e2bb1..4ccadf5b0 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -26,7 +26,8 @@ TESTS = \ $(NULL) TESTS_ENVIRONMENT = \ - XSERVER_DIR=$(abs_top_builddir) \ + XSERVER_DIR=$(abs_top_srcdir) \ + XSERVER_BUILDDIR=$(abs_top_builddir) \ $(XORG_MALLOC_DEBUG_ENV) \ $(NULL) diff --git a/test/scripts/xvfb-piglit.sh b/test/scripts/xvfb-piglit.sh index 2a4e94052..b775239e3 100755 --- a/test/scripts/xvfb-piglit.sh +++ b/test/scripts/xvfb-piglit.sh @@ -20,12 +20,18 @@ if test "x$XSERVER_DIR" = "x"; then exit 1 fi +if test "x$XSERVER_BUILDDIR" = "x"; then + echo "XSERVER_BUILDDIR must be set to the build directory of the xserver repository." + # Exit as a real failure because it should always be set. + exit 1 +fi + export PIGLIT_RESULTS_DIR=$PIGLIT_DIR/results/xvfb startx \ $XSERVER_DIR/test/scripts/xinit-piglit-session.sh \ -- \ - $XSERVER_DIR/hw/vfb/Xvfb \ + $XSERVER_BUILDDIR/hw/vfb/Xvfb \ -noreset \ -screen scrn 1280x1024x24