On Tue, 23 Apr 2013 14:54:49 +0200
Quentin Glidic <[email protected]> wrote:

> From: Quentin Glidic <[email protected]>
> 
> Signed-off-by: Quentin Glidic <[email protected]>

Any explanation why doing this?

> ---
>  tests/.gitignore       | 10 +++------
>  tests/Makefile.am      | 56 
> ++++++++++++++++++++++++++++++++++++--------------
>  tests/weston-tests-env | 39 -----------------------------------
>  3 files changed, 44 insertions(+), 61 deletions(-)
>  delete mode 100755 tests/weston-tests-env
> 
> diff --git a/tests/.gitignore b/tests/.gitignore
> index 05bc024..fe61189 100644
> --- a/tests/.gitignore
> +++ b/tests/.gitignore
> @@ -1,13 +1,9 @@
> -logs
> -matrix-test
> +*.test
> +*.log
> +*.trs
>  setbacklight
>  test-client
>  test-text-client
>  wayland-test-client-protocol.h
>  wayland-test-protocol.c
>  wayland-test-server-protocol.h
> -text-test
> -keyboard-test
> -event-test
> -button-test
> -xwayland-test
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 2729545..453c567 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -1,36 +1,62 @@
>  TESTS = $(module_tests) $(weston_tests)
>  
> +# Keep them in sync
>  module_tests =                               \
> +     .libs/surface-test.so           \
> +     .libs/surface-global-test.so
> +
> +module_tests_la = \
>       surface-test.la                 \
>       surface-global-test.la
>  
>  weston_tests =                               \
> -     keyboard-test                   \
> -     event-test                      \
> -     button-test                     \
> -     text-test                       \
> +     keyboard.test                   \
> +     event.test                      \
> +     button.test                     \
> +     text.test                       \
>       $(xwayland_test)
>  
> -AM_TESTS_ENVIRONMENT = \
> -     abs_builddir='$(abs_builddir)'; export abs_builddir;
> +TEST_WESTON  ?= $(top_builddir)/src/weston
>  
> -LOG_COMPILER = $(srcdir)/weston-tests-env
> + #ifneq ($(strip $(WAYLAND_DISPLAY)),)
> + ifdef WAYLAND_DISPLAY
> +TEST_BACKEND ?= $(top_builddir)/src/.libs/wayland-backend.so
> + else ifneq ($(strip $(DISPLAY)),)
> +TEST_BACKEND ?= $(top_builddir)/src/.libs/x11-backend.so
> + else
> +TEST_BACKEND ?= $(top_builddir)/src/.libs/headless-backend.so
> + endif
>  
> -clean-local:
> -     -rm -rf logs
> +TEST_EXTENSIONS = .test .so
>  
> -# To remove when automake 1.11 support is dropped
> -export abs_builddir

Dropping automake 1.11 support should be a separate patch. It is an
important change that deserves special attention.

Or if this patch does not drop 1.11 support, you should state that in
the commit message. The first question popping to my mind, when I
looked at this patch, was: does this still work with the older automake?


Thanks,
pq

> +LOG_COMPILER = $(TEST_WESTON)
> +TEST_LOG_COMPILER = $(LOG_COMPILER)
> +SO_LOG_COMPILER = $(LOG_COMPILER)
>  
> -noinst_LTLIBRARIES =                 \
> -     $(weston_test)
> +AM_LOG_FLAGS = \
> +     --modules xwayland.so \
> +     --backend $(TEST_BACKEND) \
> +     --socket test-socket-$(notdir $@)
> +
> +AM_TEST_LOG_FLAGS = \
> +     $(AM_LOG_FLAGS) \
> +     --modules .libs/weston-test.so
> +
> +# Keep --modules as the last arg, so it grabs the test module in
> +AM_SO_LOG_FLAGS = \
> +     $(AM_LOG_FLAGS) \
> +     --modules
> +
> +clean-local:
> +     -rm -rf logs
>  
>  noinst_PROGRAMS =                    \
>       $(setbacklight)                 \
>       matrix-test
>  
>  check_LTLIBRARIES =                  \
> -     $(module_tests)
> +     $(module_tests_la)              \
> +     $(weston_test)
>  
>  check_PROGRAMS =                     \
>       $(weston_tests)
> @@ -89,7 +115,7 @@ xwayland_test_SOURCES = xwayland-test.c    
> $(weston_test_client_src)
>  xwayland_test_LDADD = $(weston_test_client_libs) $(XWAYLAND_TEST_LIBS)
>  
>  if ENABLE_XWAYLAND_TEST
> -xwayland_test = xwayland_test
> +xwayland_test = xwayland.test
>  endif
>  
>  matrix_test_SOURCES =                                \
> diff --git a/tests/weston-tests-env b/tests/weston-tests-env
> deleted file mode 100755
> index ed10d68..0000000
> --- a/tests/weston-tests-env
> +++ /dev/null
> @@ -1,39 +0,0 @@
> -#!/bin/bash
> -
> -WESTON=$abs_builddir/../src/weston
> -LOGDIR=$abs_builddir/logs
> -
> -mkdir -p "$LOGDIR"
> -
> -SERVERLOG="$LOGDIR/$1-serverlog.txt"
> -OUTLOG="$LOGDIR/$1-log.txt"
> -
> -rm -f "$SERVERLOG"
> -
> -if test x$WAYLAND_DISPLAY != x; then
> -     BACKEND=$abs_builddir/../src/.libs/wayland-backend.so
> -elif test x$DISPLAY != x; then
> -     BACKEND=$abs_builddir/../src/.libs/x11-backend.so
> -else
> -     BACKEND=$abs_builddir/../src/.libs/wayland-backend.so
> -fi
> -
> -case $1 in
> -     *.la|*.so)
> -             $WESTON --backend=$BACKEND \
> -                     --socket=test-$(basename $1) \
> -                     --modules=xwayland.so \
> -                     --modules=$abs_builddir/.libs/${1/.la/.so} \
> -                     --log="$SERVERLOG" \
> -                     &> "$OUTLOG"
> -             ;;
> -     *)
> -             $WESTON \
> -                     --socket=test-$(basename $1) \
> -                     --backend=$BACKEND \
> -                     --log="$SERVERLOG" \
> -                     --modules=xwayland.so \
> -                     --modules=$abs_builddir/.libs/weston-test.so \
> -                     $abs_builddir/$1 \
> -                     &> "$OUTLOG"
> -esac

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to