From b5d96564904e0d7c0361574d76f7dce1847fb4c3 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 30 Oct 2013 16:17:41 +0000 Subject: [PATCH 4/5] Require Automake 1.12 and force use of the parallel tests driver This means we can use the newly-recommended AM_TESTS_ENVIRONMENT for the environment (TESTS_ENVIRONMENT is now reserved for the user, like CFLAGS), and LOG_COMPILER for the executable that will wrap the logs. We also no longer need test-wrapper.sh for the tests, because Automake has similar functionality built-in (on a buildbot or whatever, use "make check VERBOSE=1" to cat the logs automatically). Also use subdir-objects, to shut Automake 1.14 up. --- autogen.sh | 13 ------------- configure.ac | 2 +- tests/Makefile.am | 13 +++++-------- tests/dbus/Makefile.am | 13 +++++-------- tests/tools/Makefile.am | 2 +- 5 files changed, 12 insertions(+), 31 deletions(-) diff --git a/autogen.sh b/autogen.sh index 3184e69..fa642be 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,19 +3,6 @@ set -e gtkdocize -if test -n "$AUTOMAKE"; then - : # don't override an explicit user request -elif automake-1.11 --version >/dev/null 2>/dev/null && \ - aclocal-1.11 --version >/dev/null 2>/dev/null; then - # If we have automake-1.11, use it. This is the oldest version (=> least - # likely to introduce undeclared dependencies) that will give us - # --enable-silent-rules support. - AUTOMAKE=automake-1.11 - export AUTOMAKE - ACLOCAL=aclocal-1.11 - export ACLOCAL -fi - autoreconf -i -f # Honor NOCONFIGURE for compatibility with gnome-autogen.sh diff --git a/configure.ac b/configure.ac index 5f54dcc..f50a152 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,7 @@ AC_INIT([Telepathy-GLib], [tp_glib_version], AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([1.11 -Wno-portability]) +AM_INIT_AUTOMAKE([1.12 -Wno-portability subdir-objects parallel-tests]) AC_CONFIG_HEADERS(config.h) AM_SILENT_RULES diff --git a/tests/Makefile.am b/tests/Makefile.am index 29a557c..f6ede2a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -40,22 +40,19 @@ tpglib-tests.list: TESTS = $(programs_list) \ all-errors-documented.py -TESTS_ENVIRONMENT = \ +AM_TESTS_ENVIRONMENT = \ abs_top_builddir=@abs_top_builddir@ \ abs_top_srcdir=@abs_top_srcdir@ \ G_SLICE=debug-blocks \ G_DEBUG=fatal_warnings,fatal_criticals$(maybe_gc_friendly) \ G_MESSAGES_DEBUG=all \ PYTHONPATH=@abs_top_srcdir@/tools \ - $(top_srcdir)/tools/test-wrapper.sh \ - $(EXTRA_TESTS_ENVIRONMENT) - -EXTRA_TESTS_ENVIRONMENT = + $(NULL) +LOG_COMPILER = include $(top_srcdir)/tools/valgrind.mk -VALGRIND_TESTS_ENVIRONMENT = \ - $(TESTS_ENVIRONMENT) \ +VALGRIND_LOG_COMPILER = \ env G_SLICE=always-malloc CHECK_VERBOSE=1 \ $(top_builddir)/libtool --mode=execute \ $(VALGRIND) --suppressions=$(top_srcdir)/tests/tests.supp $(VALGRIND_FLAGS) @@ -64,7 +61,7 @@ check-valgrind: $(MAKE) check-TESTS \ maybe_gc_friendly=,gc-friendly \ TESTS='$$(programs_list)' \ - TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)" + LOG_COMPILER="$(VALGRIND_LOG_COMPILER)" $(MAKE) -C dbus check-valgrind EXTRA_DIST = README \ diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am index a2978e1..8f6e3da 100644 --- a/tests/dbus/Makefile.am +++ b/tests/dbus/Makefile.am @@ -278,7 +278,7 @@ AM_LDFLAGS = \ AM_CFLAGS = $(ERROR_CFLAGS) -TESTS_ENVIRONMENT = \ +AM_TESTS_ENVIRONMENT = \ abs_top_builddir=@abs_top_builddir@ \ XDG_DATA_HOME=@abs_builddir@ \ XDG_DATA_DIRS=@abs_srcdir@:$${XDG_DATA_DIRS:=/usr/local/share:/usr/share} \ @@ -289,20 +289,17 @@ TESTS_ENVIRONMENT = \ GSETTINGS_BACKEND=memory \ TP_TESTS_SERVICES_DIR=@abs_srcdir@/dbus-1/services \ DBUS_SESSION_BUS_ADDRESS=this-is-clearly-not-valid \ - $(top_srcdir)/tools/test-wrapper.sh \ - $(EXTRA_TESTS_ENVIRONMENT) - -EXTRA_TESTS_ENVIRONMENT = + $(NULL) +LOG_COMPILER = check-valgrind: $(MAKE) check-TESTS \ maybe_gc_friendly=,gc-friendly \ - TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)" + LOG_COMPILER="$(VALGRIND_LOG_COMPILER)" include $(top_srcdir)/tools/valgrind.mk -VALGRIND_TESTS_ENVIRONMENT = \ - $(TESTS_ENVIRONMENT) \ +VALGRIND_LOG_COMPILER = \ env G_SLICE=always-malloc CHECK_VERBOSE=1 \ $(top_builddir)/libtool --mode=execute \ $(VALGRIND) --suppressions=$(top_srcdir)/tests/tests.supp $(VALGRIND_FLAGS) diff --git a/tests/tools/Makefile.am b/tests/tools/Makefile.am index 4a7de16..ce988c3 100644 --- a/tests/tools/Makefile.am +++ b/tests/tools/Makefile.am @@ -12,7 +12,7 @@ EXTRA_DIST = \ TESTS = $(dist_noinst_SCRIPTS) -TESTS_ENVIRONMENT = \ +AM_TESTS_ENVIRONMENT = \ PYTHON=$(PYTHON) \ srcdir=$(srcdir) \ top_srcdir=$(top_srcdir) \ -- 1.8.4.rc3