diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-18 07:43:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-18 07:43:21 +0100 |
commit | 02f184e0ef428d9d80fecbaa438a7cbd87c18a91 (patch) | |
tree | 956639d4b4ef7e810a4a334d065f31b1e29630af /test | |
parent | 9058dac3029b0e4f35eaa8ac101d38f3071f3c52 (diff) |
test: Make SHM tests in lowlevel-blt-bench optional
A slightly more complex patch to disable the SHM based tests of
lowlevel-blt-bench when MIT-SHM support is not available at compile
time.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 5 | ||||
-rw-r--r-- | test/lowlevel-blt-bench.c | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index be0b1f09..f9906d44 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -40,10 +40,7 @@ stress_TESTS += \ endif check_PROGRAMS = $(stress_TESTS) -noinst_PROGRAMS = -if X11_SHM -noinst_PROGRAMS += lowlevel-blt-bench -endif +noinst_PROGRAMS = lowlevel-blt-bench AM_CFLAGS = @CWARNFLAGS@ $(X11_CFLAGS) $(DRM_CFLAGS) LDADD = libtest.la $(X11_LIBS) $(DRM_LIBS) $(CLOCK_GETTIME_LIBS) diff --git a/test/lowlevel-blt-bench.c b/test/lowlevel-blt-bench.c index c54fbd52..9eef8db0 100644 --- a/test/lowlevel-blt-bench.c +++ b/test/lowlevel-blt-bench.c @@ -37,6 +37,7 @@ #include <X11/Xutil.h> /* for XDestroyImage */ #include <X11/Xlibint.h> #include <X11/extensions/Xrender.h> +#if HAVE_MIT_SHM #include <X11/extensions/XShm.h> #if HAVE_X11_EXTENSIONS_SHMPROTO_H #include <X11/extensions/shmproto.h> @@ -45,9 +46,10 @@ #else #error Failed to find the right header for X11 MIT-SHM protocol definitions #endif -#include <pixman.h> /* for pixman blt functions */ #include <sys/ipc.h> #include <sys/shm.h> +#endif +#include <pixman.h> /* for pixman blt functions */ #include "test.h" @@ -228,6 +230,7 @@ static Picture source_radial_generic(struct test_display *t, struct test_target return XRenderCreateRadialGradient(t->dpy, &gradient, stops, colors, 2); } +#if HAVE_MIT_SHM static XShmSegmentInfo shmref, shmout; static void setup_shm(struct test *t) @@ -290,6 +293,10 @@ static Picture source_shm(struct test_display *t, struct test_target *target) return picture; } +#else +static void setup_shm(struct test *t) { } +static Picture source_shm(struct test_display *t, struct test_target *target) { return 0; } +#endif static const struct { Picture (*create)(struct test_display *, struct test_target *); |