summaryrefslogtreecommitdiff
path: root/test/Makefile.am
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-03-27 17:42:07 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-03-27 17:42:07 +0300
commit0c9ed253893faa13313fee30ce6dbf40a0339035 (patch)
tree488b25b9c65c93011c75eb09035db2d5ee2f400f /test/Makefile.am
parent6a2ee6bd4acd68ec4f28fa397543079d8cab77cc (diff)
parentc1c801dcb5e6470e9327195c89ee2da6e505127b (diff)
downloaddbus-0c9ed253893faa13313fee30ce6dbf40a0339035.tar.gz
Merge branch 'master' of git://anonscm.debian.org/pkg-utopia/dbus
Conflicts: debian/changelog debian/dbus.postinst
Diffstat (limited to 'test/Makefile.am')
-rw-r--r--test/Makefile.am147
1 files changed, 99 insertions, 48 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index e9448998..cec5cdab 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -19,25 +19,49 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
static_cppflags = \
$(AM_CPPFLAGS) \
-DDBUS_STATIC_BUILD \
+ -DDBUS_COMPILATION \
+ -DDBUS_TEST_USE_INTERNAL \
$(NULL)
-libdbus_testutils_la_CPPFLAGS = \
- $(static_cppflags)
+noinst_LTLIBRARIES = libdbus-testutils-internal.la
+
+# You can link either libdbus-testutils, dbus-glib and libdbus-1,
+# or libdbus-testutils-internal and libdbus-internal - never both in the
+# same binary.
+if DBUS_WITH_DBUS_GLIB
+noinst_LTLIBRARIES += libdbus-testutils.la
libdbus_testutils_la_SOURCES = \
test-utils.c \
test-utils.h \
$(NULL)
libdbus_testutils_la_LIBADD = \
- $(top_builddir)/dbus/libdbus-internal.la \
+ $(top_builddir)/dbus/libdbus-1.la \
+ $(GLIB_LIBS) \
+ $(DBUS_GLIB_LIBS) \
$(NULL)
+testutils_shared_if_possible_cppflags = $(AM_CPPFLAGS)
+testutils_shared_if_possible_libs = libdbus-testutils.la
+else
+testutils_shared_if_possible_cppflags = $(static_cppflags)
+testutils_shared_if_possible_libs = libdbus-testutils-internal.la
+endif
-noinst_LTLIBRARIES = libdbus-testutils.la
+libdbus_testutils_internal_la_CPPFLAGS = \
+ $(static_cppflags) \
+ $(NULL)
+libdbus_testutils_internal_la_SOURCES = \
+ test-utils.c \
+ test-utils.h \
+ $(NULL)
+libdbus_testutils_internal_la_LIBADD = \
+ $(top_builddir)/dbus/libdbus-internal.la \
+ $(NULL)
-if DBUS_BUILD_TESTS
+if DBUS_ENABLE_EMBEDDED_TESTS
## break-loader removed for now
## these binaries are used in tests but are not themselves tests
TEST_BINARIES = \
- spawn-test \
+ test-spawn \
test-exit \
test-names \
test-segfault \
@@ -50,44 +74,50 @@ TEST_BINARIES = \
## order, but we don't want to run them til we arrive in this directory,
## since they depend on stuff from this directory
TESTS = \
- ../bus/bus-test$(EXEEXT) \
- ../bus/bus-test-system$(EXEEXT) \
- ../dbus/dbus-test$(EXEEXT) \
+ ../bus/test-bus$(EXEEXT) \
+ ../bus/test-bus-system$(EXEEXT) \
+ ../dbus/test-dbus$(EXEEXT) \
$(NULL)
if DBUS_UNIX
-TESTS += ../bus/bus-test-launch-helper$(EXEEXT)
+TESTS += ../bus/test-bus-launch-helper$(EXEEXT)
endif
-else !DBUS_BUILD_TESTS
+else !DBUS_ENABLE_EMBEDDED_TESTS
TEST_BINARIES=
TESTS=
-endif !DBUS_BUILD_TESTS
+endif !DBUS_ENABLE_EMBEDDED_TESTS
noinst_PROGRAMS= $(TEST_BINARIES)
test_service_CPPFLAGS = $(static_cppflags)
-test_service_LDADD = libdbus-testutils.la
+test_service_LDADD = libdbus-testutils-internal.la
test_names_CPPFLAGS = $(static_cppflags)
-test_names_LDADD = libdbus-testutils.la
+test_names_LDADD = libdbus-testutils-internal.la
## break_loader_CPPFLAGS = $(static_cppflags)
## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
test_shell_service_CPPFLAGS = $(static_cppflags)
-test_shell_service_LDADD = libdbus-testutils.la
-shell_test_CPPFLAGS = $(static_cppflags)
-shell_test_LDADD = libdbus-testutils.la
-spawn_test_CPPFLAGS = $(static_cppflags)
-spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+test_shell_service_LDADD = libdbus-testutils-internal.la
+test_shell_SOURCES = shell-test.c
+test_shell_CPPFLAGS = $(static_cppflags)
+test_shell_LDADD = libdbus-testutils-internal.la
+test_spawn_SOURCES = spawn-test.c
+test_spawn_CPPFLAGS = $(static_cppflags)
+test_spawn_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+
+test_printf_SOURCES = internals/printf.c
+test_printf_CPPFLAGS = $(static_cppflags)
+test_printf_LDADD = $(top_builddir)/dbus/libdbus-internal.la
test_refs_SOURCES = internals/refs.c
test_refs_CPPFLAGS = $(static_cppflags)
-test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+test_refs_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS)
test_syslog_SOURCES = internals/syslog.c
test_syslog_CPPFLAGS = $(static_cppflags)
-test_syslog_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+test_syslog_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS)
EXTRA_DIST = dbus-test-runner
@@ -96,7 +126,10 @@ testexecdir = $(libdir)/dbus-1.0/test
testexec_PROGRAMS =
installable_tests = \
- shell-test \
+ test-shell \
+ test-printf \
+ $(NULL)
+installable_manual_tests = \
$(NULL)
if DBUS_WITH_GLIB
@@ -111,66 +144,88 @@ installable_tests += \
test-syntax \
test-syslog \
$(NULL)
+installable_manual_tests += \
+ manual-authz \
+ $(NULL)
endif DBUS_WITH_GLIB
installcheck_tests =
installcheck_environment = \
+ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \
DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \
DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
TESTS_ENVIRONMENT = \
- DBUS_BLOCK_ON_ABORT=1 \
+ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \
DBUS_FATAL_WARNINGS=1 \
DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
DBUS_TEST_DATA=@abs_top_builddir@/test/data \
DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
$(NULL)
+manual_authz_SOURCES = manual-authz.c
+manual_authz_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+manual_authz_LDADD = \
+ $(testutils_shared_if_possible_libs) \
+ $(GLIB_LIBS) \
+ $(NULL)
+
test_corrupt_SOURCES = corrupt.c
-test_corrupt_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_corrupt_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_corrupt_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_loopback_SOURCES = loopback.c
-test_loopback_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_loopback_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_loopback_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_relay_SOURCES = relay.c
-test_relay_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_relay_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_relay_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_dbus_daemon_SOURCES = dbus-daemon.c
-test_dbus_daemon_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_dbus_daemon_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_dbus_daemon_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_dbus_daemon_eavesdrop_SOURCES = dbus-daemon-eavesdrop.c
-test_dbus_daemon_eavesdrop_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
-test_dbus_daemon_eavesdrop_LDFLAGS = @R_DYNAMIC_LDFLAG@
-test_dbus_daemon_eavesdrop_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_dbus_daemon_eavesdrop_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_dbus_daemon_eavesdrop_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_marshal_SOURCES = marshal.c
-test_marshal_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_marshal_LDADD = \
+ $(top_builddir)/dbus/libdbus-1.la \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_syntax_SOURCES = syntax.c
-test_syntax_LDADD = $(top_builddir)/dbus/libdbus-1.la \
- $(GLIB_LIBS)
+test_syntax_LDADD = \
+ $(top_builddir)/dbus/libdbus-1.la \
+ $(GLIB_LIBS) \
+ $(NULL)
if DBUS_ENABLE_MODULAR_TESTS
TESTS += $(installable_tests)
installcheck_tests += $(installable_tests)
if DBUS_ENABLE_INSTALLED_TESTS
- testexec_PROGRAMS += $(installable_tests)
+ testexec_PROGRAMS += $(installable_tests) $(installable_manual_tests)
else !DBUS_ENABLE_INSTALLED_TESTS
- noinst_PROGRAMS += $(installable_tests)
+ noinst_PROGRAMS += $(installable_tests) $(installable_manual_tests)
endif !DBUS_ENABLE_INSTALLED_TESTS
endif DBUS_ENABLE_MODULAR_TESTS
@@ -194,6 +249,7 @@ in_data = \
data/valid-config-files-system/debug-allow-all-pass.conf.in \
data/valid-config-files/debug-allow-all-sha1.conf.in \
data/valid-config-files/debug-allow-all.conf.in \
+ data/valid-config-files/incoming-limit.conf.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \
@@ -265,7 +321,6 @@ static_data = \
data/valid-config-files/basic.conf \
data/valid-config-files/basic.d/basic.conf \
data/valid-config-files/entities.conf \
- data/valid-config-files/incoming-limit.conf \
data/valid-config-files/many-rules.conf \
data/valid-config-files/system.d/test.conf \
data/valid-messages/array-of-array-of-uint32.message \
@@ -316,12 +371,8 @@ imported_data = \
$(NULL)
noinst_DATA = $(imported_data)
-CLEANFILES = $(noinst_DATA)
-
-data/valid-config-files/session.conf: $(top_builddir)/bus/session.conf
- $(AM_V_at)$(MKDIR_P) data/valid-config-files
- $(AM_V_GEN)cp $< $@
+CLEANFILES = $(noinst_DATA) XDG_RUNTIME_DIR
-data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
+$(imported_data): data/valid-config-files/%.conf: $(top_builddir)/bus/%.conf
$(AM_V_at)$(MKDIR_P) data/valid-config-files
$(AM_V_GEN)cp $< $@