2016-08-12 10:50:53 +02:00
|
|
|
## the "name-test" subdir in fact contains a bunch of tests now that need a temporary bus
|
2007-06-18 19:32:51 +00:00
|
|
|
## to be running to do stuff with. The directory should be renamed.
|
2008-05-30 16:53:35 -04:00
|
|
|
## We want to build the current directory first to pick up the testutils lib
|
2016-08-12 10:50:53 +02:00
|
|
|
SUBDIRS= . name-test
|
2006-07-14 16:20:12 +00:00
|
|
|
DIST_SUBDIRS=name-test
|
2003-09-04 00:21:36 +00:00
|
|
|
|
2015-03-02 12:36:16 +00:00
|
|
|
CLEANFILES =
|
|
|
|
|
EXTRA_DIST =
|
|
|
|
|
|
2011-06-15 14:22:42 +01:00
|
|
|
AM_CPPFLAGS = \
|
2016-08-12 10:50:53 +02:00
|
|
|
$(CODE_COVERAGE_CPPFLAGS) \
|
2011-06-15 14:22:42 +01:00
|
|
|
-I$(top_srcdir) \
|
2015-02-20 16:14:08 +00:00
|
|
|
$(DBUS_STATIC_BUILD_CPPFLAGS) \
|
2014-08-20 15:43:23 -07:00
|
|
|
-DDBUS_COMPILATION \
|
2016-11-21 20:46:17 +00:00
|
|
|
$(APPARMOR_CFLAGS) \
|
2011-06-15 14:22:42 +01:00
|
|
|
$(GLIB_CFLAGS) \
|
2016-08-16 18:27:43 +01:00
|
|
|
$(GIO_UNIX_CFLAGS) \
|
2011-06-15 14:22:42 +01:00
|
|
|
$(NULL)
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2011-06-15 11:32:29 +01:00
|
|
|
# improve backtraces from test stuff
|
|
|
|
|
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
|
|
|
|
|
|
2016-08-12 10:50:53 +02:00
|
|
|
AM_CFLAGS = \
|
|
|
|
|
$(CODE_COVERAGE_CFLAGS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2015-02-20 15:07:23 +00:00
|
|
|
noinst_LTLIBRARIES = libdbus-testutils.la
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
|
2015-01-26 19:02:59 +00:00
|
|
|
libdbus_testutils_la_SOURCES = \
|
|
|
|
|
test-utils.c \
|
|
|
|
|
test-utils.h \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
if DBUS_WITH_GLIB
|
|
|
|
|
libdbus_testutils_la_SOURCES += \
|
|
|
|
|
test-utils-glib.c \
|
|
|
|
|
test-utils-glib.h \
|
|
|
|
|
$(NULL)
|
|
|
|
|
endif
|
|
|
|
|
|
2015-02-20 15:07:23 +00:00
|
|
|
libdbus_testutils_la_LIBADD = \
|
2014-08-20 15:43:23 -07:00
|
|
|
$(top_builddir)/dbus/libdbus-1.la \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(top_builddir)/dbus/libdbus-internal.la \
|
2016-08-12 10:50:53 +02:00
|
|
|
$(CODE_COVERAGE_LDFLAGS) \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(NULL)
|
2003-09-04 00:21:36 +00:00
|
|
|
|
2015-03-02 12:36:16 +00:00
|
|
|
TEST_EXTENSIONS = .sh
|
|
|
|
|
|
2015-03-04 10:37:49 +00:00
|
|
|
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh
|
2015-03-02 12:36:16 +00:00
|
|
|
LOG_COMPILER = $(srcdir)/glib-tap-test.sh
|
|
|
|
|
SH_LOG_DRIVER = $(LOG_DRIVER)
|
|
|
|
|
SH_LOG_COMPILER = $(SHELL)
|
|
|
|
|
EXTRA_DIST += glib-tap-test.sh
|
2015-08-19 22:04:30 +01:00
|
|
|
EXTRA_DIST += tap-test.sh.in
|
2015-03-02 12:36:16 +00:00
|
|
|
|
|
|
|
|
TESTS =
|
|
|
|
|
|
2013-06-28 16:06:41 +08:00
|
|
|
if DBUS_ENABLE_EMBEDDED_TESTS
|
2005-01-15 Havoc Pennington <hp@redhat.com>
* Land the new message args API and type system.
This patch is huge, but the public API change is not
really large. The set of D-BUS types has changed somewhat,
and the arg "getters" are more geared toward language bindings;
they don't make a copy, etc.
There are also some known issues. See these emails for details
on this huge patch:
http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
* dbus/dbus-marshal-*: all the new stuff
* dbus/dbus-message.c: basically rewritten
* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
freed blocks to be all non-nul bytes so using freed memory is less
likely to work right
* dbus/dbus-internals.c (_dbus_test_oom_handling): add
DBUS_FAIL_MALLOC=N environment variable, so you can do
DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
thorough.
* qt/message.cpp: port to the new message args API
(operator<<): use str.utf8() rather than str.unicode()
(pretty sure this is right from the Qt docs?)
* glib/dbus-gvalue.c: port to the new message args API
* bus/dispatch.c, bus/driver.c: port to the new message args API
* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
"locked" flag to TRUE and align_offset to 0; I guess we never
looked at these anyhow, but seems cleaner.
* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
move allocation padding macro to this header; use it to implement
(_DBUS_STRING_STATIC): ability to declare a static string.
* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
change to return TRUE if the interface is not set.
* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
to dbus-marshal-validate.[hc]
* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
dbus-internals.c
* dbus/Makefile.am: cut over from dbus-marshal.[hc]
to dbus-marshal-*.[hc]
* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
function here from dbus-marshal.c
2005-01-15 07:15:38 +00:00
|
|
|
## break-loader removed for now
|
2011-11-09 17:19:19 +00:00
|
|
|
## these binaries are used in tests but are not themselves tests
|
2011-06-06 15:01:52 +01:00
|
|
|
TEST_BINARIES = \
|
2014-01-11 10:07:21 +01:00
|
|
|
test-spawn \
|
2011-06-06 15:01:52 +01:00
|
|
|
test-exit \
|
|
|
|
|
test-names \
|
|
|
|
|
test-segfault \
|
|
|
|
|
test-service \
|
|
|
|
|
test-shell-service \
|
|
|
|
|
test-sleep-forever \
|
|
|
|
|
$(NULL)
|
2005-07-14 20:44:15 +00:00
|
|
|
|
2011-06-13 11:08:28 +01:00
|
|
|
## 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,
|
2015-03-02 12:36:16 +00:00
|
|
|
## since they depend on stuff from this directory. We wrap them in a
|
|
|
|
|
## simple shell script to get TAP output.
|
|
|
|
|
|
|
|
|
|
wrap_bus_tests = test-bus.sh
|
|
|
|
|
wrap_dbus_tests = test-dbus.sh
|
2011-06-13 11:08:28 +01:00
|
|
|
|
2011-06-15 12:43:15 +01:00
|
|
|
if DBUS_UNIX
|
2015-03-02 12:36:16 +00:00
|
|
|
wrap_bus_tests += test-bus-launch-helper.sh
|
|
|
|
|
wrap_bus_tests += test-bus-system.sh
|
2011-06-15 12:43:15 +01:00
|
|
|
endif
|
|
|
|
|
|
2015-03-02 12:36:16 +00:00
|
|
|
TESTS += $(wrap_bus_tests) $(wrap_dbus_tests)
|
|
|
|
|
CLEANFILES += $(wrap_bus_tests) $(wrap_dbus_tests)
|
|
|
|
|
|
|
|
|
|
$(wrap_bus_tests): test-bus%.sh: ../bus/test-bus%$(EXEEXT) tap-test.sh.in Makefile
|
|
|
|
|
sed -e 's![@]RUN[@]!$<!' \
|
|
|
|
|
< $(srcdir)/tap-test.sh.in > $@
|
|
|
|
|
|
|
|
|
|
$(wrap_dbus_tests): test-dbus%.sh: ../dbus/test-dbus%$(EXEEXT) tap-test.sh.in Makefile
|
|
|
|
|
sed -e 's![@]RUN[@]!$<!' \
|
|
|
|
|
< $(srcdir)/tap-test.sh.in > $@
|
|
|
|
|
|
2013-06-28 16:06:41 +08:00
|
|
|
else !DBUS_ENABLE_EMBEDDED_TESTS
|
2011-06-06 15:01:52 +01:00
|
|
|
|
2003-01-18 14:41:37 +00:00
|
|
|
TEST_BINARIES=
|
2011-06-06 15:01:52 +01:00
|
|
|
|
2013-06-28 16:06:41 +08:00
|
|
|
endif !DBUS_ENABLE_EMBEDDED_TESTS
|
2003-01-15 18:30:12 +00:00
|
|
|
|
2011-02-02 16:51:30 +00:00
|
|
|
noinst_PROGRAMS= $(TEST_BINARIES)
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2015-02-20 15:07:23 +00:00
|
|
|
test_service_LDADD = libdbus-testutils.la
|
|
|
|
|
test_names_LDADD = libdbus-testutils.la
|
2011-06-15 11:41:27 +01:00
|
|
|
## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
|
2015-02-20 15:07:23 +00:00
|
|
|
test_shell_service_LDADD = libdbus-testutils.la
|
2014-01-10 02:17:22 +01:00
|
|
|
test_shell_SOURCES = shell-test.c
|
2015-02-20 15:07:23 +00:00
|
|
|
test_shell_LDADD = libdbus-testutils.la
|
2014-01-11 10:07:21 +01:00
|
|
|
test_spawn_SOURCES = spawn-test.c
|
|
|
|
|
test_spawn_LDADD = $(top_builddir)/dbus/libdbus-internal.la
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2013-06-12 13:56:39 +01:00
|
|
|
test_printf_SOURCES = internals/printf.c
|
|
|
|
|
test_printf_LDADD = $(top_builddir)/dbus/libdbus-internal.la
|
|
|
|
|
|
2011-08-04 17:16:59 +01:00
|
|
|
test_refs_SOURCES = internals/refs.c
|
2015-02-20 15:07:23 +00:00
|
|
|
test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
|
2011-08-04 17:16:59 +01:00
|
|
|
|
2011-08-23 16:14:21 +01:00
|
|
|
test_syslog_SOURCES = internals/syslog.c
|
2015-02-20 15:07:23 +00:00
|
|
|
test_syslog_LDADD = libdbus-testutils.la $(GLIB_LIBS)
|
2011-08-23 16:14:21 +01:00
|
|
|
|
2015-11-17 14:30:54 +01:00
|
|
|
manual_backtrace_SOURCES = manual-backtrace.c
|
|
|
|
|
manual_backtrace_LDADD = $(top_builddir)/dbus/libdbus-1.la
|
|
|
|
|
|
2014-09-08 13:15:55 +00:00
|
|
|
manual_dir_iter_SOURCES = manual-dir-iter.c
|
|
|
|
|
manual_dir_iter_LDADD = $(top_builddir)/dbus/libdbus-internal.la
|
|
|
|
|
|
2015-02-16 11:43:57 +00:00
|
|
|
manual_paths_SOURCES = manual-paths.c
|
|
|
|
|
manual_paths_LDADD = $(top_builddir)/dbus/libdbus-internal.la
|
|
|
|
|
|
2015-01-28 22:44:16 +01:00
|
|
|
manual_tcp_SOURCES = manual-tcp.c
|
|
|
|
|
manual_tcp_LDADD = $(top_builddir)/dbus/libdbus-internal.la
|
|
|
|
|
|
2015-03-02 12:36:16 +00:00
|
|
|
EXTRA_DIST += dbus-test-runner
|
2003-04-03 00:01:15 +00:00
|
|
|
|
2015-01-26 15:47:22 +00:00
|
|
|
testexecdir = $(libexecdir)/installed-tests/dbus
|
|
|
|
|
testmetadir = $(datadir)/installed-tests/dbus
|
2011-06-08 17:39:41 +01:00
|
|
|
|
2017-02-21 14:57:37 +00:00
|
|
|
nobase_dist_testexec_SCRIPTS =
|
|
|
|
|
nobase_testexec_PROGRAMS =
|
|
|
|
|
nobase_testmeta_DATA =
|
2011-06-08 17:39:41 +01:00
|
|
|
|
2016-11-21 20:46:17 +00:00
|
|
|
installable_helpers = \
|
|
|
|
|
$(NULL)
|
2011-06-08 17:39:41 +01:00
|
|
|
installable_tests = \
|
2014-01-10 02:17:22 +01:00
|
|
|
test-shell \
|
2013-06-12 13:56:39 +01:00
|
|
|
test-printf \
|
2011-11-09 17:18:36 +00:00
|
|
|
$(NULL)
|
2013-08-23 03:10:15 +02:00
|
|
|
installable_manual_tests = \
|
2015-11-17 14:30:54 +01:00
|
|
|
manual-backtrace \
|
2014-09-08 13:15:55 +00:00
|
|
|
manual-dir-iter \
|
2015-11-17 14:30:54 +01:00
|
|
|
manual-tcp \
|
|
|
|
|
$(NULL)
|
2016-07-20 12:00:34 +01:00
|
|
|
dist_installable_test_scripts = \
|
|
|
|
|
$(NULL)
|
2016-11-21 20:46:17 +00:00
|
|
|
dist_installed_test_scripts = \
|
|
|
|
|
$(NULL)
|
2011-11-09 17:18:36 +00:00
|
|
|
|
2015-02-16 11:43:57 +00:00
|
|
|
if DBUS_WIN
|
|
|
|
|
installable_manual_tests += manual-paths
|
|
|
|
|
endif
|
|
|
|
|
|
2011-11-09 17:18:36 +00:00
|
|
|
if DBUS_WITH_GLIB
|
|
|
|
|
installable_tests += \
|
2011-04-15 13:32:48 +01:00
|
|
|
test-corrupt \
|
2011-06-08 18:15:05 +01:00
|
|
|
test-dbus-daemon \
|
2011-07-13 18:05:32 +01:00
|
|
|
test-dbus-daemon-eavesdrop \
|
2015-02-04 19:45:23 +00:00
|
|
|
test-fdpass \
|
2015-02-02 20:02:56 +00:00
|
|
|
test-monitor \
|
2011-02-22 16:32:14 +00:00
|
|
|
test-loopback \
|
2011-06-09 18:47:04 +01:00
|
|
|
test-marshal \
|
2011-08-04 17:16:59 +01:00
|
|
|
test-refs \
|
2011-06-08 17:39:41 +01:00
|
|
|
test-relay \
|
2012-02-24 12:44:14 +00:00
|
|
|
test-syntax \
|
2011-08-23 16:14:21 +01:00
|
|
|
test-syslog \
|
2015-01-26 19:10:11 +00:00
|
|
|
test-uid-permissions \
|
2011-06-08 17:39:41 +01:00
|
|
|
$(NULL)
|
2015-10-19 15:18:02 +01:00
|
|
|
|
|
|
|
|
if DBUS_UNIX
|
2016-11-21 20:46:17 +00:00
|
|
|
# These binaries are used in tests but are not themselves tests
|
|
|
|
|
installable_helpers += \
|
|
|
|
|
test-apparmor-activation \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2015-10-19 15:18:02 +01:00
|
|
|
installable_tests += \
|
|
|
|
|
test-sd-activation \
|
|
|
|
|
$(NULL)
|
2016-07-20 12:00:34 +01:00
|
|
|
|
2016-07-20 13:12:45 +01:00
|
|
|
dist_installable_test_scripts += \
|
|
|
|
|
test-dbus-daemon-fork.sh \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2016-11-21 20:46:17 +00:00
|
|
|
# Only runnable when installed, not from the source tree
|
|
|
|
|
dist_installed_test_scripts += \
|
2017-02-21 14:57:37 +00:00
|
|
|
integration/transient-services.sh \
|
2016-11-21 20:46:17 +00:00
|
|
|
test-apparmor-activation.sh \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2016-07-20 12:00:34 +01:00
|
|
|
# Testing dbus-launch relies on special code in that binary.
|
|
|
|
|
if DBUS_ENABLE_EMBEDDED_TESTS
|
|
|
|
|
dist_installable_test_scripts += \
|
|
|
|
|
test-dbus-launch-eval.sh \
|
2016-11-09 18:44:21 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
if DBUS_ENABLE_X11_AUTOLAUNCH
|
|
|
|
|
dist_installable_test_scripts += \
|
2016-08-12 10:58:13 +01:00
|
|
|
test-dbus-launch-x11.sh \
|
2016-07-20 12:00:34 +01:00
|
|
|
$(NULL)
|
2016-11-09 18:44:21 +00:00
|
|
|
endif DBUS_ENABLE_X11_AUTOLAUNCH
|
2016-07-20 12:00:34 +01:00
|
|
|
endif DBUS_ENABLE_EMBEDDED_TESTS
|
|
|
|
|
|
2015-10-19 15:18:02 +01:00
|
|
|
endif DBUS_UNIX
|
|
|
|
|
|
2013-08-23 02:57:27 +02:00
|
|
|
installable_manual_tests += \
|
|
|
|
|
manual-authz \
|
|
|
|
|
$(NULL)
|
2011-11-09 17:18:36 +00:00
|
|
|
endif DBUS_WITH_GLIB
|
2011-06-08 17:39:41 +01:00
|
|
|
|
2016-07-20 12:00:34 +01:00
|
|
|
installable_test_meta = \
|
|
|
|
|
$(dist_installable_test_scripts:=.test) \
|
2016-11-21 20:46:17 +00:00
|
|
|
$(dist_installed_test_scripts:=.test) \
|
2016-07-20 12:00:34 +01:00
|
|
|
$(installable_tests:=.test) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
installable_test_meta_with_config = \
|
|
|
|
|
$(dist_installable_test_scripts:=_with_config.test) \
|
2016-11-21 20:46:17 +00:00
|
|
|
$(dist_installed_test_scripts:=_with_config.test) \
|
2016-07-20 12:00:34 +01:00
|
|
|
$(installable_tests:=_with_config.test) \
|
|
|
|
|
$(NULL)
|
2015-01-26 15:47:22 +00:00
|
|
|
|
2011-03-11 13:11:30 +00:00
|
|
|
installcheck_tests =
|
|
|
|
|
installcheck_environment = \
|
2017-02-15 11:43:51 +00:00
|
|
|
export XDG_DATA_HOME=@abs_top_builddir@/test/XDG_DATA_HOME; \
|
|
|
|
|
export XDG_DATA_DIRS=@abs_top_builddir@/test/XDG_DATA_DIRS:$(DESTDIR)$(datadir); \
|
2015-04-01 13:07:19 +01:00
|
|
|
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
|
|
|
|
|
export DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT); \
|
2016-02-08 20:09:58 +00:00
|
|
|
export DBUS_TEST_DBUS_LAUNCH=$(DESTDIR)$(bindir)/dbus-launch$(EXEEXT); \
|
2016-08-12 10:58:13 +01:00
|
|
|
export DBUS_TEST_DBUS_MONITOR=$(DESTDIR)$(bindir)/dbus-monitor$(EXEEXT); \
|
2016-07-20 12:00:34 +01:00
|
|
|
export DBUS_TEST_DBUS_SEND=$(DESTDIR)$(bindir)/dbus-send$(EXEEXT); \
|
2015-04-01 13:07:19 +01:00
|
|
|
export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
|
2015-05-27 11:42:44 +01:00
|
|
|
export DBUS_TEST_DATADIR=$(DESTDIR)$(datadir); \
|
2015-04-01 13:07:19 +01:00
|
|
|
${NULL}
|
2011-03-11 13:11:30 +00:00
|
|
|
|
2017-02-17 17:15:34 +00:00
|
|
|
# Tests in bus/config-parser.c rely on these specific values for XDG_* and
|
|
|
|
|
# DBUS_TEST_BUILDDIR.
|
2015-03-02 11:46:13 +00:00
|
|
|
AM_TESTS_ENVIRONMENT = \
|
2017-02-15 11:43:51 +00:00
|
|
|
export XDG_DATA_HOME=@abs_top_builddir@/test/XDG_DATA_HOME; \
|
2017-02-17 17:15:34 +00:00
|
|
|
export XDG_DATA_DIRS=@abs_top_builddir@/test/XDG_DATA_DIRS:@abs_top_builddir@/test/XDG_DATA_DIRS2; \
|
2015-04-01 13:07:19 +01:00
|
|
|
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
|
|
|
|
|
export DBUS_FATAL_WARNINGS=1; \
|
2017-02-17 17:15:34 +00:00
|
|
|
export DBUS_TEST_BUILDDIR=@abs_builddir@; \
|
|
|
|
|
export DBUS_TEST_SRCDIR=@abs_srcdir@; \
|
2015-04-01 13:07:19 +01:00
|
|
|
export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \
|
2016-02-08 20:09:58 +00:00
|
|
|
export DBUS_TEST_DBUS_LAUNCH=@abs_top_builddir@/tools/dbus-launch$(EXEEXT); \
|
2016-08-12 10:58:13 +01:00
|
|
|
export DBUS_TEST_DBUS_MONITOR=@abs_top_builddir@/tools/dbus-monitor$(EXEEXT); \
|
2016-07-20 12:00:34 +01:00
|
|
|
export DBUS_TEST_DBUS_SEND=@abs_top_builddir@/tools/dbus-send$(EXEEXT); \
|
2015-04-01 13:07:19 +01:00
|
|
|
export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
|
|
|
|
|
export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
|
2011-06-13 11:08:28 +01:00
|
|
|
$(NULL)
|
2011-03-11 12:45:08 +00:00
|
|
|
|
2013-08-23 02:57:27 +02:00
|
|
|
manual_authz_SOURCES = manual-authz.c
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
manual_authz_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2013-08-23 02:57:27 +02:00
|
|
|
$(GLIB_LIBS) \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(NULL)
|
2013-08-23 02:57:27 +02:00
|
|
|
|
2016-11-21 20:46:17 +00:00
|
|
|
if DBUS_UNIX
|
|
|
|
|
test_apparmor_activation_CPPFLAGS = \
|
|
|
|
|
$(AM_CPPFLAGS) \
|
|
|
|
|
-DDBUS_TEST_APPARMOR_ACTIVATION \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_apparmor_activation_SOURCES = \
|
|
|
|
|
sd-activation.c \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_apparmor_activation_LDADD = \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(APPARMOR_LIBS) \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
endif
|
|
|
|
|
|
2011-04-15 13:32:48 +01:00
|
|
|
test_corrupt_SOURCES = corrupt.c
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
test_corrupt_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2011-04-15 13:32:48 +01:00
|
|
|
$(GLIB_LIBS) \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(NULL)
|
2011-04-15 13:32:48 +01:00
|
|
|
|
2011-02-22 13:04:18 +00:00
|
|
|
test_loopback_SOURCES = loopback.c
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
test_loopback_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2011-02-22 13:04:18 +00:00
|
|
|
$(GLIB_LIBS) \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(NULL)
|
2011-02-22 13:04:18 +00:00
|
|
|
|
2011-02-22 16:32:14 +00:00
|
|
|
test_relay_SOURCES = relay.c
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
test_relay_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2011-02-22 16:32:14 +00:00
|
|
|
$(GLIB_LIBS) \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(NULL)
|
2011-02-22 16:32:14 +00:00
|
|
|
|
2011-03-11 13:13:17 +00:00
|
|
|
test_dbus_daemon_SOURCES = dbus-daemon.c
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
test_dbus_daemon_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2011-06-09 18:47:04 +01:00
|
|
|
$(GLIB_LIBS) \
|
2016-08-16 18:27:43 +01:00
|
|
|
$(GIO_UNIX_LIBS) \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(NULL)
|
2011-06-09 18:47:04 +01:00
|
|
|
|
2011-07-13 18:05:32 +01:00
|
|
|
test_dbus_daemon_eavesdrop_SOURCES = dbus-daemon-eavesdrop.c
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
test_dbus_daemon_eavesdrop_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2011-07-13 18:05:32 +01:00
|
|
|
$(GLIB_LIBS) \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(NULL)
|
2011-07-13 18:05:32 +01:00
|
|
|
|
2015-10-19 15:18:02 +01:00
|
|
|
if DBUS_UNIX
|
2015-01-26 20:10:39 +00:00
|
|
|
test_sd_activation_SOURCES = \
|
|
|
|
|
sd-activation.c \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_sd_activation_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2015-01-26 20:10:39 +00:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
2015-10-19 15:18:02 +01:00
|
|
|
endif
|
2015-01-26 20:10:39 +00:00
|
|
|
|
2011-06-09 18:47:04 +01:00
|
|
|
test_marshal_SOURCES = marshal.c
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
test_marshal_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2011-03-11 13:13:17 +00:00
|
|
|
$(GLIB_LIBS) \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(NULL)
|
2011-03-11 13:13:17 +00:00
|
|
|
|
2015-02-02 20:02:56 +00:00
|
|
|
test_monitor_SOURCES = \
|
|
|
|
|
monitor.c \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_monitor_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2015-02-02 20:02:56 +00:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2012-02-24 12:44:14 +00:00
|
|
|
test_syntax_SOURCES = syntax.c
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
test_syntax_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
Tests: allow dbus-glib to be replaced with use of libdbus-internal
We only use dbus-glib for its main loop; within dbus, DBusLoop is
available as an alternative, although it isn't thread-safe and
isn't public API.
For tests that otherwise only use libdbus public API, it's desirable to
be able to avoid DBusLoop, so we can run them against an installed
libdbus as an integration test. However, if we don't have dbus-glib,
we're going to have to use an in-tree main loop, which might as well
be DBusLoop.
The major disadvantage of using dbus-glib is that it isn't safe to
link both dbus-1 and dbus-internal at the same time. This is awkward
for a future test case that wants to use _dbus_getsid() in dbus-daemon.c,
but only on Windows (fd.o #54445). If we use the same API wrapper around
both dbus-glib and DBusLoop, we can compile that test against dbus-glib
or against DBusLoop, depending on the platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-02 16:32:31 +01:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
2012-02-24 12:44:14 +00:00
|
|
|
|
2015-01-26 19:10:11 +00:00
|
|
|
test_uid_permissions_SOURCES = \
|
|
|
|
|
uid-permissions.c \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_uid_permissions_LDADD = \
|
2015-02-20 21:16:20 +00:00
|
|
|
libdbus-testutils.la \
|
2015-01-26 19:10:11 +00:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2015-02-04 19:45:23 +00:00
|
|
|
test_fdpass_SOURCES = \
|
|
|
|
|
fdpass.c \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_fdpass_LDADD = \
|
2015-02-20 15:07:23 +00:00
|
|
|
libdbus-testutils.la \
|
2015-02-04 19:45:23 +00:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2016-07-20 12:00:34 +01:00
|
|
|
TESTS += $(dist_installable_test_scripts)
|
|
|
|
|
installcheck_tests += $(dist_installable_test_scripts)
|
|
|
|
|
|
2011-02-22 13:04:18 +00:00
|
|
|
if DBUS_ENABLE_MODULAR_TESTS
|
2011-06-08 17:39:41 +01:00
|
|
|
TESTS += $(installable_tests)
|
|
|
|
|
installcheck_tests += $(installable_tests)
|
|
|
|
|
|
|
|
|
|
if DBUS_ENABLE_INSTALLED_TESTS
|
2017-02-21 14:57:37 +00:00
|
|
|
nobase_testexec_PROGRAMS += $(installable_helpers)
|
|
|
|
|
nobase_testexec_PROGRAMS += $(installable_manual_tests)
|
|
|
|
|
nobase_testexec_PROGRAMS += $(installable_tests)
|
|
|
|
|
nobase_dist_testexec_SCRIPTS += $(dist_installed_test_scripts)
|
|
|
|
|
nobase_dist_testexec_SCRIPTS += $(dist_installable_test_scripts)
|
|
|
|
|
|
|
|
|
|
nobase_testmeta_DATA += $(installable_test_meta)
|
|
|
|
|
nobase_testmeta_DATA += $(installable_test_meta_with_config)
|
2011-06-08 17:39:41 +01:00
|
|
|
else !DBUS_ENABLE_INSTALLED_TESTS
|
2013-08-23 02:57:27 +02:00
|
|
|
noinst_PROGRAMS += $(installable_tests) $(installable_manual_tests)
|
2011-06-08 17:39:41 +01:00
|
|
|
endif !DBUS_ENABLE_INSTALLED_TESTS
|
|
|
|
|
|
2011-02-22 13:04:18 +00:00
|
|
|
endif DBUS_ENABLE_MODULAR_TESTS
|
|
|
|
|
|
2011-06-08 18:47:14 +01:00
|
|
|
# If we're installing the tests into a DESTDIR we can't run them
|
|
|
|
|
# again using the installed copy, because we don't know how to
|
|
|
|
|
# do a portable equivalent of setting LD_LIBRARY_PATH.
|
2011-03-11 13:11:30 +00:00
|
|
|
installcheck-local:
|
|
|
|
|
$(MAKE) check-TESTS TESTS='$$(installcheck_tests)' \
|
2015-03-02 11:46:13 +00:00
|
|
|
AM_TESTS_ENVIRONMENT='$$(installcheck_environment)'
|
2011-06-08 17:39:41 +01:00
|
|
|
if DBUS_ENABLE_INSTALLED_TESTS
|
2015-04-01 13:07:19 +01:00
|
|
|
test -n "$(DESTDIR)" || { \
|
2011-06-08 17:39:41 +01:00
|
|
|
$(installcheck_environment) \
|
|
|
|
|
$(srcdir)/dbus-test-runner \
|
|
|
|
|
$(testexecdir) \
|
2015-11-27 12:46:52 +00:00
|
|
|
$(installable_tests); }
|
2011-06-08 17:39:41 +01:00
|
|
|
endif DBUS_ENABLE_INSTALLED_TESTS
|
2011-03-11 13:11:30 +00:00
|
|
|
|
2011-09-26 11:20:41 +01:00
|
|
|
in_data = \
|
2016-11-21 20:46:17 +00:00
|
|
|
data/dbus-installed-tests.aaprofile.in \
|
|
|
|
|
data/systemd-activation/com.example.ReceiveDeniedByAppArmorLabel.service.in \
|
|
|
|
|
data/systemd-activation/com.example.SendDeniedByAppArmorLabel.service.in \
|
2016-11-21 21:18:15 +00:00
|
|
|
data/systemd-activation/com.example.SendDeniedByNonexistentAppArmorLabel.service.in \
|
|
|
|
|
data/systemd-activation/com.example.SystemdActivatable3.service.in \
|
2011-09-26 11:20:41 +01:00
|
|
|
data/valid-config-files-system/debug-allow-all-fail.conf.in \
|
|
|
|
|
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 \
|
2014-10-29 14:10:48 +00:00
|
|
|
data/valid-config-files/finite-timeout.conf.in \
|
2015-02-02 20:02:56 +00:00
|
|
|
data/valid-config-files/forbidding.conf.in \
|
2013-10-10 16:59:11 +01:00
|
|
|
data/valid-config-files/incoming-limit.conf.in \
|
2016-07-01 12:30:22 +01:00
|
|
|
data/valid-config-files/max-completed-connections.conf.in \
|
|
|
|
|
data/valid-config-files/max-connections-per-user.conf.in \
|
2016-07-01 13:07:49 +01:00
|
|
|
data/valid-config-files/max-match-rules-per-connection.conf.in \
|
2016-07-01 13:17:23 +01:00
|
|
|
data/valid-config-files/max-names-per-connection.conf.in \
|
2016-07-01 13:02:04 +01:00
|
|
|
data/valid-config-files/max-replies-per-connection.conf.in \
|
2015-01-26 19:10:11 +00:00
|
|
|
data/valid-config-files/multi-user.conf.in \
|
2016-08-16 18:27:43 +01:00
|
|
|
data/valid-config-files/pending-fd-timeout.conf.in \
|
2015-01-26 20:10:39 +00:00
|
|
|
data/valid-config-files/systemd-activation.conf.in \
|
2011-09-26 11:20:41 +01:00
|
|
|
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 \
|
|
|
|
|
data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service.in \
|
|
|
|
|
data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \
|
|
|
|
|
data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \
|
|
|
|
|
data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \
|
|
|
|
|
data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in \
|
|
|
|
|
data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service.in \
|
|
|
|
|
data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service.in \
|
|
|
|
|
data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \
|
|
|
|
|
data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \
|
|
|
|
|
data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
EXTRA_DIST += $(in_data)
|
|
|
|
|
|
|
|
|
|
static_data = \
|
|
|
|
|
name-test/tmp-session-like-system.conf \
|
|
|
|
|
data/auth/anonymous-client-successful.auth-script \
|
|
|
|
|
data/auth/anonymous-server-successful.auth-script \
|
|
|
|
|
data/auth/cancel.auth-script \
|
|
|
|
|
data/auth/client-out-of-mechanisms.auth-script \
|
|
|
|
|
data/auth/external-failed.auth-script \
|
|
|
|
|
data/auth/external-root.auth-script \
|
|
|
|
|
data/auth/external-silly.auth-script \
|
|
|
|
|
data/auth/external-successful.auth-script \
|
|
|
|
|
data/auth/extra-bytes.auth-script \
|
|
|
|
|
data/auth/fail-after-n-attempts.auth-script \
|
|
|
|
|
data/auth/fallback.auth-script \
|
|
|
|
|
data/auth/invalid-command-client.auth-script \
|
|
|
|
|
data/auth/invalid-command.auth-script \
|
|
|
|
|
data/auth/invalid-hex-encoding.auth-script \
|
|
|
|
|
data/auth/mechanisms.auth-script \
|
|
|
|
|
data/equiv-config-files/basic/basic-1.conf \
|
|
|
|
|
data/equiv-config-files/basic/basic-2.conf \
|
|
|
|
|
data/equiv-config-files/basic/basic.d/basic.conf \
|
|
|
|
|
data/equiv-config-files/entities/basic.d/basic.conf \
|
|
|
|
|
data/equiv-config-files/entities/entities-1.conf \
|
|
|
|
|
data/equiv-config-files/entities/entities-2.conf \
|
|
|
|
|
data/incomplete-messages/missing-body.message \
|
|
|
|
|
data/invalid-config-files/badselinux-1.conf \
|
|
|
|
|
data/invalid-config-files/badselinux-2.conf \
|
|
|
|
|
data/invalid-config-files/circular-1.conf \
|
|
|
|
|
data/invalid-config-files/circular-2.conf \
|
|
|
|
|
data/invalid-config-files/circular-3.conf \
|
|
|
|
|
data/invalid-config-files/not-well-formed.conf \
|
|
|
|
|
data/invalid-config-files/truncated-file.conf \
|
|
|
|
|
data/invalid-messages/array-of-nil.message \
|
|
|
|
|
data/invalid-messages/array-with-mixed-types.message \
|
|
|
|
|
data/invalid-messages/bad-boolean-array.message \
|
|
|
|
|
data/invalid-messages/bad-boolean.message \
|
|
|
|
|
data/invalid-messages/bad-endian.message \
|
|
|
|
|
data/invalid-messages/bad-header-field-alignment.message \
|
|
|
|
|
data/invalid-messages/boolean-has-no-value.message-raw \
|
|
|
|
|
data/invalid-messages/local-namespace.message \
|
|
|
|
|
data/invalid-messages/no-dot-in-name.message \
|
|
|
|
|
data/invalid-messages/not-nul-header-padding.message \
|
|
|
|
|
data/invalid-messages/overlong-name.message \
|
|
|
|
|
data/invalid-messages/too-little-header-padding.message \
|
|
|
|
|
data/invalid-messages/too-much-header-padding-by-far.message \
|
|
|
|
|
data/invalid-messages/too-much-header-padding.message \
|
|
|
|
|
data/invalid-messages/too-short-dict.message \
|
|
|
|
|
data/sha-1/Readme.txt \
|
|
|
|
|
data/sha-1/bit-hashes.sha1 \
|
|
|
|
|
data/sha-1/bit-messages.sha1 \
|
|
|
|
|
data/sha-1/byte-hashes.sha1 \
|
|
|
|
|
data/sha-1/byte-messages.sha1 \
|
2015-10-16 17:33:36 +01:00
|
|
|
data/systemd-activation/com.example.ReceiveDenied.service \
|
|
|
|
|
data/systemd-activation/com.example.SendDenied.service \
|
2016-11-21 20:46:17 +00:00
|
|
|
data/systemd-activation/com.example.SendDeniedByAppArmorName.service \
|
2015-01-26 20:10:39 +00:00
|
|
|
data/systemd-activation/com.example.SystemdActivatable1.service \
|
|
|
|
|
data/systemd-activation/com.example.SystemdActivatable2.service \
|
|
|
|
|
data/systemd-activation/org.freedesktop.systemd1.service \
|
2011-09-26 11:20:41 +01:00
|
|
|
data/valid-config-files/basic.conf \
|
|
|
|
|
data/valid-config-files/basic.d/basic.conf \
|
|
|
|
|
data/valid-config-files/entities.conf \
|
2015-02-05 18:30:36 +00:00
|
|
|
data/valid-config-files/listen-unix-runtime.conf \
|
2011-09-26 11:20:41 +01:00
|
|
|
data/valid-config-files/many-rules.conf \
|
2017-02-17 18:12:54 +00:00
|
|
|
data/valid-config-files/standard-session-dirs.conf \
|
2015-11-03 00:23:56 +01:00
|
|
|
data/valid-config-files-system/system.d/test.conf \
|
2011-09-26 11:20:41 +01:00
|
|
|
data/valid-messages/array-of-array-of-uint32.message \
|
|
|
|
|
data/valid-messages/dict-simple.message \
|
|
|
|
|
data/valid-messages/dict.message \
|
|
|
|
|
data/valid-messages/emptiness.message \
|
|
|
|
|
data/valid-messages/lots-of-arguments.message \
|
|
|
|
|
data/valid-messages/no-padding.message \
|
|
|
|
|
data/valid-messages/opposite-endian.message \
|
|
|
|
|
data/valid-messages/recursive-types.message \
|
|
|
|
|
data/valid-messages/simplest-manual.message \
|
|
|
|
|
data/valid-messages/simplest.message \
|
|
|
|
|
data/valid-messages/standard-acquire-service.message \
|
|
|
|
|
data/valid-messages/standard-hello.message \
|
|
|
|
|
data/valid-messages/standard-list-services.message \
|
|
|
|
|
data/valid-messages/standard-service-exists.message \
|
|
|
|
|
data/valid-messages/unknown-header-field.message \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
EXTRA_DIST += $(static_data)
|
|
|
|
|
|
|
|
|
|
## copy tests to builddir so that generated tests and static tests
|
2003-04-03 00:01:15 +00:00
|
|
|
## are all in one place.
|
2015-01-26 18:55:08 +00:00
|
|
|
all-local: copy-config-local uninstalled-config-local
|
2017-02-13 20:58:51 +00:00
|
|
|
$(AM_V_at)$(MKDIR_P) -m700 XDG_RUNTIME_DIR
|
2015-01-26 18:55:08 +00:00
|
|
|
|
|
|
|
|
copy-config-local:
|
2012-04-25 19:04:07 +01:00
|
|
|
$(AM_V_at)$(MKDIR_P) data/valid-config-files/session.d
|
2015-01-26 18:55:08 +00:00
|
|
|
$(AM_V_GEN)set -e; \
|
2011-09-26 11:20:41 +01:00
|
|
|
if test $(srcdir) = . || test $(srcdir) -ef .; then \
|
|
|
|
|
echo '-- No need to copy test data as srcdir = builddir'; \
|
|
|
|
|
else \
|
|
|
|
|
for F in $(static_data); do \
|
2015-01-26 18:55:08 +00:00
|
|
|
$(MKDIR_P) "$${F%/*}"; \
|
|
|
|
|
rm -f "$$F"; \
|
|
|
|
|
cp $(srcdir)/"$$F" "$$F"; \
|
2011-09-26 11:20:41 +01:00
|
|
|
done; \
|
|
|
|
|
fi
|
|
|
|
|
|
2015-01-26 18:55:08 +00:00
|
|
|
uninstalled-config-local:
|
|
|
|
|
$(AM_V_GEN)set -e; \
|
|
|
|
|
for F in $(in_data); do \
|
|
|
|
|
$(MKDIR_P) "$${F%/*}"; \
|
|
|
|
|
sed \
|
|
|
|
|
-e 's,[@]DBUS_TEST_DATA[@],@abs_builddir@/data,' \
|
|
|
|
|
-e 's,[@]DBUS_TEST_EXEC[@],@abs_builddir@,' \
|
|
|
|
|
-e 's,[@]EXEEXT[@],$(EXEEXT),' \
|
|
|
|
|
-e 's,[@]TEST_LAUNCH_HELPER_BINARY[@],@abs_top_builddir@/bus/dbus-daemon-launch-helper-test$(EXEEXT),' \
|
|
|
|
|
-e 's,[@]TEST_LISTEN[@],$(TEST_LISTEN),' \
|
|
|
|
|
< $(srcdir)/"$$F" > "$${F%.in}"; \
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
installable-config-local:
|
|
|
|
|
if DBUS_ENABLE_INSTALLED_TESTS
|
|
|
|
|
$(AM_V_GEN)set -e; \
|
|
|
|
|
for F in $(in_data); do \
|
|
|
|
|
$(MKDIR_P) "installable/$${F%/*}"; \
|
|
|
|
|
sed \
|
|
|
|
|
-e 's,[@]DBUS_TEST_DATA[@],$(testexecdir)/data,' \
|
|
|
|
|
-e 's,[@]DBUS_TEST_EXEC[@],$(testexecdir),' \
|
|
|
|
|
-e 's,[@]EXEEXT[@],$(EXEEXT),' \
|
|
|
|
|
-e 's,[@]TEST_LAUNCH_HELPER_BINARY[@],/bin/false,' \
|
|
|
|
|
-e 's,[@]TEST_LISTEN[@],$(TEST_LISTEN),' \
|
|
|
|
|
< $(srcdir)/"$$F" > "installable/$${F%.in}"; \
|
|
|
|
|
done
|
|
|
|
|
else
|
|
|
|
|
@:
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
install-data-local: install-config-local
|
|
|
|
|
@:
|
|
|
|
|
|
|
|
|
|
install-config-local: installable-config-local
|
|
|
|
|
if DBUS_ENABLE_INSTALLED_TESTS
|
2015-01-26 15:47:22 +00:00
|
|
|
$(AM_V_GEN)set -e; \
|
2015-01-26 18:55:08 +00:00
|
|
|
for F in $(static_data); do \
|
2015-01-26 15:47:22 +00:00
|
|
|
install -d "$(DESTDIR)$(testexecdir)/$${F%/*}"; \
|
|
|
|
|
install -m644 "$(srcdir)/$$F" "$(DESTDIR)$(testexecdir)/$$F"; \
|
|
|
|
|
done; \
|
2015-01-26 18:55:08 +00:00
|
|
|
for F in $(in_data); do \
|
2015-01-26 15:47:22 +00:00
|
|
|
install -d "$(DESTDIR)$(testexecdir)/$${F%/*}"; \
|
|
|
|
|
install -m644 "installable/$${F%.in}" "$(DESTDIR)$(testexecdir)/$${F%.in}"; \
|
2015-01-26 18:55:08 +00:00
|
|
|
done
|
2015-02-25 15:39:04 +00:00
|
|
|
ln -nfs $(datadir)/dbus-1/session.conf $(DESTDIR)$(testexecdir)/data/valid-config-files/session.conf
|
2015-11-03 00:23:56 +01:00
|
|
|
ln -nfs $(datadir)/dbus-1/system.conf $(DESTDIR)$(testexecdir)/data/valid-config-files-system/system.conf
|
2015-01-26 18:55:08 +00:00
|
|
|
else
|
|
|
|
|
@:
|
|
|
|
|
endif
|
|
|
|
|
|
2011-09-26 11:20:41 +01:00
|
|
|
## this doesn't clean most copied test data files when srcdir=builddir
|
2003-04-03 00:01:15 +00:00
|
|
|
clean-local:
|
2011-09-26 11:20:41 +01:00
|
|
|
$(AM_V_at)if test $(srcdir) = . || test $(srcdir) -ef .; then \
|
|
|
|
|
echo '-- No need to clean test data as srcdir = builddir'; \
|
|
|
|
|
else \
|
|
|
|
|
rm -f $(static_data); \
|
2015-01-26 18:55:08 +00:00
|
|
|
for F in $(in_data); do \
|
|
|
|
|
rm -f "$${F%.in}"; \
|
|
|
|
|
done; \
|
2003-04-03 00:01:15 +00:00
|
|
|
fi
|
2017-02-15 16:55:53 +00:00
|
|
|
rm -fr ./XDG_RUNTIME_DIR ./installable
|
2011-09-26 11:20:41 +01:00
|
|
|
|
|
|
|
|
imported_data = \
|
|
|
|
|
data/valid-config-files/session.conf \
|
2015-11-03 00:23:56 +01:00
|
|
|
data/valid-config-files-system/system.conf \
|
2011-09-26 11:20:41 +01:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
noinst_DATA = $(imported_data)
|
2015-03-02 12:36:16 +00:00
|
|
|
CLEANFILES += \
|
2015-01-26 18:55:08 +00:00
|
|
|
$(noinst_DATA) \
|
|
|
|
|
$(NULL)
|
2011-09-26 11:20:41 +01:00
|
|
|
|
2015-11-03 00:23:56 +01:00
|
|
|
data/valid-config-files/session.conf: $(top_builddir)/bus/session.conf
|
2012-04-25 19:04:07 +01:00
|
|
|
$(AM_V_at)$(MKDIR_P) data/valid-config-files
|
|
|
|
|
$(AM_V_GEN)cp $< $@
|
2015-01-26 15:47:22 +00:00
|
|
|
|
2015-11-03 00:23:56 +01:00
|
|
|
data/valid-config-files-system/system.conf: $(top_builddir)/bus/system.conf
|
|
|
|
|
$(AM_V_at)$(MKDIR_P) data/valid-config-files-system
|
|
|
|
|
$(AM_V_GEN)cp $< $@
|
|
|
|
|
|
2015-02-05 12:48:57 +00:00
|
|
|
$(installable_test_meta): %.test: %$(EXEEXT) Makefile
|
2017-02-21 14:57:37 +00:00
|
|
|
$(AM_V_at)$(MKDIR_P) $(dir $@)
|
2015-01-26 15:47:22 +00:00
|
|
|
$(AM_V_GEN) ( \
|
|
|
|
|
echo '[Test]'; \
|
|
|
|
|
echo 'Type=session'; \
|
2015-02-26 17:53:46 +00:00
|
|
|
echo 'Output=TAP'; \
|
2015-02-26 17:55:45 +00:00
|
|
|
echo 'Exec=env $(testexecdir)/$* --tap'; \
|
2015-01-26 15:47:22 +00:00
|
|
|
) > $@.tmp && mv $@.tmp $@
|
|
|
|
|
|
2015-02-05 12:48:57 +00:00
|
|
|
$(installable_test_meta_with_config): %_with_config.test: %$(EXEEXT) Makefile
|
2017-02-21 14:57:37 +00:00
|
|
|
$(AM_V_at)$(MKDIR_P) $(dir $@)
|
2015-01-26 15:47:22 +00:00
|
|
|
$(AM_V_GEN) ( \
|
|
|
|
|
echo '[Test]'; \
|
|
|
|
|
echo 'Type=session'; \
|
2015-02-26 17:53:46 +00:00
|
|
|
echo 'Output=TAP'; \
|
2016-11-21 20:46:17 +00:00
|
|
|
echo 'Exec=env DBUS_TEST_EXEC=$(testexecdir) DBUS_TEST_DATA=$(testexecdir)/data $(testexecdir)/$* --tap'; \
|
2015-01-26 15:47:22 +00:00
|
|
|
) > $@.tmp && mv $@.tmp $@
|
2016-08-12 10:50:53 +02:00
|
|
|
|
|
|
|
|
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
|
|
|
|
|
@CODE_COVERAGE_RULES@
|