From 7d2a3a539edbf05a4bed669d1464123047a5a3fb Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 6 Jun 2011 16:01:41 +0100 Subject: [PATCH 3/5] Run dbus-test from test/, not dbus/ This avoids failures caused by test/data not having been set up yet. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405 --- dbus/Makefile.am | 15 ++++----------- test/Makefile.am | 12 ++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dbus/Makefile.am b/dbus/Makefile.am index 2e6ca1d..094773c 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -269,20 +269,13 @@ libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD libdbus_internal_la_LIBADD=$(DBUS_CLIENT_LIBS) libdbus_internal_la_LDFLAGS=$(export_symbols_internal) @R_DYNAMIC_LDFLAG@ -## note that TESTS has special meaning (stuff to use in make check) -## so if adding tests not to be run in make check, don't add them to -## TESTS +noinst_PROGRAMS = + if DBUS_BUILD_TESTS -TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus -TESTS=dbus-test -else -TESTS= +# We can't actually run this til we've reached test/ +noinst_PROGRAMS += dbus-test endif -## we use noinst_PROGRAMS not check_PROGRAMS so that we build -## even when not doing "make check" -noinst_PROGRAMS=$(TESTS) - dbus_test_SOURCES= \ dbus-test-main.c diff --git a/test/Makefile.am b/test/Makefile.am index 4bd4640..9a12e0b 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -30,6 +30,13 @@ TESTS = \ shell-test \ $(NULL) +## These are conceptually part of directories that come earlier in SUBDIRS +## order, but we don't want to run them til we arrive in this directory, +## since they depend on stuff from this directory +TESTS += \ + ../dbus/dbus-test \ + $(NULL) + else !DBUS_BUILD_TESTS TEST_BINARIES= @@ -37,6 +44,11 @@ TESTS= endif !DBUS_BUILD_TESTS +TESTS_ENVIRONMENT = \ + DBUS_TEST_DATA=$(top_builddir)/test/data \ + DBUS_TEST_HOMEDIR=$(top_builddir)/dbus \ + $(NULL) + noinst_PROGRAMS= $(TEST_BINARIES) test_service_SOURCES= \ -- 1.7.5.3