From 5d1913ea9a0699af3ca1a97aa1deb70bf241a964 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 17 Jun 2011 12:29:17 +0100 Subject: [PATCH 02/14] Use standard autotools @abs_top_builddir@ to replace TEST_SERVICE_BINARY etc. --- configure.ac | 20 -------------------- test/core/Makefile.am | 2 +- .../data/valid-service-files/debug-echo.service.in | 2 +- .../data/valid-service-files/debug-glib.service.in | 2 +- .../valid-service-files/interfaces-test.service.in | 2 +- test/interfaces/Makefile.am | 2 +- 6 files changed, 5 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac index 849ebc6..fbda99e 100644 --- a/configure.ac +++ b/configure.ac @@ -357,26 +357,6 @@ AC_SUBST(DBUS_GLIB_TOOL_LIBS) ### gtk-doc Documentation GTK_DOC_CHECK(1.4) -#### Tell tests where to find certain stuff in builddir -ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd` - -AC_DEFUN([TEST_PATH], [ -TEST_$1=${ABSOLUTE_TOP_BUILDDIR}/test/$2 -AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1", - [Full path to test file test/$2 in builddir]) -AC_SUBST(TEST_$1) -]) - -TEST_PATH(SERVICE_DIR, data/valid-service-files) -TEST_PATH(SERVICE_BINARY, test-service) -TEST_PATH(SHELL_SERVICE_BINARY, test-shell-service) -TEST_PATH(CORE_SERVICE_BINARY, core/test-service-glib) -TEST_PATH(INTERFACES_SERVICE_BINARY, interfaces/test-service) -TEST_PATH(EXIT_BINARY, test-exit) -TEST_PATH(SEGFAULT_BINARY, test-segfault) -TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever) -AC_SUBST(ABSOLUTE_TOP_BUILDDIR) - if ! test -z "$with_test_socket_dir" ; then TEST_SOCKET_DIR="$with_test_socket_dir" else diff --git a/test/core/Makefile.am b/test/core/Makefile.am index ef6cb26..92def10 100644 --- a/test/core/Makefile.am +++ b/test/core/Makefile.am @@ -22,7 +22,7 @@ tool_ldadd = \ ## so if adding tests not to be run in make check, don't add them to ## TESTS if DBUS_BUILD_TESTS -TESTS_ENVIRONMENT=DBUS_TOP_BUILDDIR=$(ABSOLUTE_TOP_BUILDDIR) +TESTS_ENVIRONMENT=DBUS_TOP_BUILDDIR=@abs_top_builddir@ TESTS=run-test.sh run-peer-test.sh else TESTS= diff --git a/test/data/valid-service-files/debug-echo.service.in b/test/data/valid-service-files/debug-echo.service.in index 735a98a..64603c0 100644 --- a/test/data/valid-service-files/debug-echo.service.in +++ b/test/data/valid-service-files/debug-echo.service.in @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.freedesktop.DBus.GLib.TestEchoService -Exec=@TEST_SERVICE_BINARY@ +Exec=@abs_top_builddir@/test/test-service@EXEEXT@ diff --git a/test/data/valid-service-files/debug-glib.service.in b/test/data/valid-service-files/debug-glib.service.in index d0d3761..4b1ceeb 100644 --- a/test/data/valid-service-files/debug-glib.service.in +++ b/test/data/valid-service-files/debug-glib.service.in @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.freedesktop.DBus.GLib.TestService -Exec=@TEST_CORE_SERVICE_BINARY@ +Exec=@abs_top_builddir@/test/core/test-service-glib@EXEEXT@ diff --git a/test/data/valid-service-files/interfaces-test.service.in b/test/data/valid-service-files/interfaces-test.service.in index 8710d5c..77bd001 100644 --- a/test/data/valid-service-files/interfaces-test.service.in +++ b/test/data/valid-service-files/interfaces-test.service.in @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.freedesktop.DBus.GLib.Test.Interfaces -Exec=@TEST_INTERFACES_SERVICE_BINARY@ +Exec=@abs_top_builddir@/test/interfaces/test-service@EXEEXT@ diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am index 3cb2c39..dbaf560 100644 --- a/test/interfaces/Makefile.am +++ b/test/interfaces/Makefile.am @@ -15,7 +15,7 @@ LDADD = $(DBUS_GLIB_LIBS) \ ## TESTS if DBUS_BUILD_TESTS TESTS_ENVIRONMENT = \ - DBUS_TOP_BUILDDIR=$(ABSOLUTE_TOP_BUILDDIR) \ + DBUS_TOP_BUILDDIR=@abs_top_builddir@ \ DBUS_BINDING_TOOL=$(DBUS_BINDING_TOOL) \ $(NULL) TESTS=run-test.sh -- 1.7.5.4