tests: use the headless backend to run the test suite
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Fri, 7 Feb 2014 08:34:47 +0000 (09:34 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 18 Feb 2014 21:50:24 +0000 (13:50 -0800)
Other backends can be used by passing BACKEND=some-backend.so, e.g.

    $ make check BACKEND=x11-backend.so

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
tests/weston-tests-env

index 04b91a9..9180053 100755 (executable)
@@ -17,14 +17,12 @@ OUTLOG="$LOGDIR/$1-log.txt"
 
 rm -f "$SERVERLOG"
 
-if test x$WAYLAND_DISPLAY != x; then
-       BACKEND=$abs_builddir/.libs/wayland-backend.so
-elif test x$DISPLAY != x; then
-       BACKEND=$abs_builddir/.libs/x11-backend.so
-else
-       BACKEND=$abs_builddir/.libs/wayland-backend.so
+if test -z "$BACKEND"; then
+       BACKEND=headless-backend.so
 fi
 
+BACKEND=$abs_builddir/.libs/$BACKEND
+
 case $TESTNAME in
        *.la|*.so)
                $WESTON --backend=$BACKEND \