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) \
|
2018-07-11 19:47:34 +01:00
|
|
|
$(VALGRIND_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) \
|
2018-08-29 20:06:00 +01:00
|
|
|
$(SANITIZE_CFLAGS) \
|
2016-08-12 10:50:53 +02:00
|
|
|
$(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 = \
|
2018-12-03 16:04:56 +00:00
|
|
|
disable-crash-handling.c \
|
|
|
|
|
disable-crash-handling.h \
|
2015-01-26 19:02:59 +00:00
|
|
|
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 = \
|
2019-01-21 17:51:07 +00:00
|
|
|
$(CODE_COVERAGE_LIBS) \
|
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 \
|
|
|
|
|
$(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 =
|
2018-09-28 15:53:40 +01:00
|
|
|
noinst_PROGRAMS =
|
2015-03-02 12:36:16 +00:00
|
|
|
|
2013-06-28 16:06:41 +08:00
|
|
|
if DBUS_ENABLE_EMBEDDED_TESTS
|
2018-09-28 15:53:40 +01:00
|
|
|
|
|
|
|
|
uninstallable_test_programs =
|
|
|
|
|
|
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 = \
|
|
|
|
|
test-exit \
|
|
|
|
|
test-names \
|
2018-12-11 11:52:38 +00:00
|
|
|
test-privserver \
|
2011-06-06 15:01:52 +01:00
|
|
|
test-segfault \
|
|
|
|
|
test-shell-service \
|
|
|
|
|
$(NULL)
|
2005-07-14 20:44:15 +00:00
|
|
|
|
2018-09-28 15:53:40 +01:00
|
|
|
if !DBUS_WINCE
|
2019-03-23 22:18:11 +02:00
|
|
|
if ENABLE_TRADITIONAL_ACTIVATION
|
2018-09-28 15:53:40 +01:00
|
|
|
uninstallable_test_programs += test-spawn-oom
|
2019-03-23 22:18:11 +02:00
|
|
|
endif ENABLE_TRADITIONAL_ACTIVATION
|
|
|
|
|
endif !DBUS_WINCE
|
|
|
|
|
|
|
|
|
|
if ENABLE_TRADITIONAL_ACTIVATION
|
|
|
|
|
TEST_BINARIES += test-spawn
|
2018-09-28 15:53:40 +01:00
|
|
|
endif
|
|
|
|
|
|
2018-09-03 16:57:10 -07:00
|
|
|
uninstallable_test_programs += \
|
2022-03-02 13:17:10 +01:00
|
|
|
test-platform-mutex \
|
2018-09-03 16:57:10 -07:00
|
|
|
test-bus \
|
|
|
|
|
test-bus-dispatch-sha1 \
|
2018-11-15 15:48:26 +00:00
|
|
|
test-marshal-recursive \
|
|
|
|
|
test-message-internals \
|
2018-09-03 16:57:10 -07:00
|
|
|
$(NULL)
|
2011-06-13 11:08:28 +01:00
|
|
|
|
test/bus: Break up dispatch test into three separate tests
This is really three separate test-cases: one for traditional
activation as a direct child process of the dbus-daemon, and two for
traditional activation (successful and failing) via the setuid
dbus-daemon-launch-helper on Unix.
The ones where activation succeeds extremely slow, as a result of the
instrumentation for simulating malloc() failures combined with a large
number of memory operations, particularly when using AddressSanitizer.
Splitting up "OOM" tests like these has a disproportionately good impact
on the time they take, because the simulated malloc() failure
instrumentation repeats the entire test making the first malloc() fail,
then making the second malloc() fail, and so on. For allocation failures
in the second half of the test, this means we repeat the first half of
the test with no malloc() failures a very large number of times, which
is not a good use of time, because we already tested it successfully.
Even when not using the "OOM" instrumentation, splitting up these tests
lets them run in parallel, which is also a major time saving.
Needless to say, this speeds up testing considerably. On my modern but
unexceptional x86 laptop, in a typical debug build with Meson, the old
dispatch test took just over 21 minutes, which drops to about 40 seconds
each for the new normal-activation and helper-activation tests (and for
most of that time, they're running in parallel, so the wall-clock time
taken for the whole test suite is somewhere around a minute).
In a debug build with Meson, gcc and AddressSanitizer, the old dispatch
test takes longer than my patience will allow, and the new separate
tests take about 5-6 minutes each. Reduce their timeout accordingly, but
not as far as the default for slow tests (5 minutes) to allow some
headroom for AddressSanitizer or slower systems.
The failed-helper-activation test is almost instantaneous, and no longer
needs to be marked as slow.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-15 15:41:14 +01:00
|
|
|
if ENABLE_TRADITIONAL_ACTIVATION
|
|
|
|
|
uninstallable_test_programs += test-normal-activation
|
|
|
|
|
endif
|
|
|
|
|
|
2011-06-15 12:43:15 +01:00
|
|
|
if DBUS_UNIX
|
2019-03-23 22:18:11 +02:00
|
|
|
if ENABLE_TRADITIONAL_ACTIVATION
|
2018-10-03 18:49:56 +01:00
|
|
|
uninstallable_test_programs += test-bus-launch-helper-oom
|
|
|
|
|
uninstallable_test_programs += test-bus-system
|
test/bus: Break up dispatch test into three separate tests
This is really three separate test-cases: one for traditional
activation as a direct child process of the dbus-daemon, and two for
traditional activation (successful and failing) via the setuid
dbus-daemon-launch-helper on Unix.
The ones where activation succeeds extremely slow, as a result of the
instrumentation for simulating malloc() failures combined with a large
number of memory operations, particularly when using AddressSanitizer.
Splitting up "OOM" tests like these has a disproportionately good impact
on the time they take, because the simulated malloc() failure
instrumentation repeats the entire test making the first malloc() fail,
then making the second malloc() fail, and so on. For allocation failures
in the second half of the test, this means we repeat the first half of
the test with no malloc() failures a very large number of times, which
is not a good use of time, because we already tested it successfully.
Even when not using the "OOM" instrumentation, splitting up these tests
lets them run in parallel, which is also a major time saving.
Needless to say, this speeds up testing considerably. On my modern but
unexceptional x86 laptop, in a typical debug build with Meson, the old
dispatch test took just over 21 minutes, which drops to about 40 seconds
each for the new normal-activation and helper-activation tests (and for
most of that time, they're running in parallel, so the wall-clock time
taken for the whole test suite is somewhere around a minute).
In a debug build with Meson, gcc and AddressSanitizer, the old dispatch
test takes longer than my patience will allow, and the new separate
tests take about 5-6 minutes each. Reduce their timeout accordingly, but
not as far as the default for slow tests (5 minutes) to allow some
headroom for AddressSanitizer or slower systems.
The failed-helper-activation test is almost instantaneous, and no longer
needs to be marked as slow.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-15 15:41:14 +01:00
|
|
|
uninstallable_test_programs += test-failed-helper-activation
|
|
|
|
|
uninstallable_test_programs += test-helper-activation
|
2018-10-03 19:01:42 +01:00
|
|
|
# this is used by the tests but is not, itself, a test
|
|
|
|
|
TEST_BINARIES += dbus-daemon-launch-helper-for-tests
|
2019-03-23 22:18:11 +02:00
|
|
|
endif ENABLE_TRADITIONAL_ACTIVATION
|
|
|
|
|
endif DBUS_UNIX
|
2011-06-15 12:43:15 +01:00
|
|
|
|
2018-09-28 15:53:40 +01:00
|
|
|
noinst_PROGRAMS += $(uninstallable_test_programs)
|
|
|
|
|
TESTS += $(uninstallable_test_programs)
|
|
|
|
|
|
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
|
|
|
|
2020-04-16 14:18:49 +01:00
|
|
|
test_atomic_SOURCES = internals/atomic.c
|
|
|
|
|
test_atomic_LDADD = libdbus-testutils.la
|
|
|
|
|
|
2018-09-28 15:53:40 +01:00
|
|
|
noinst_PROGRAMS += $(TEST_BINARIES)
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2018-08-29 20:06:00 +01:00
|
|
|
# This helper is meant to crash, so if we're compiling the rest with
|
|
|
|
|
# AddressSanitizer, we need to stop it from catching the SIGSEGV and
|
|
|
|
|
# turning it into _exit(1); so don't give it SANITIZE_CFLAGS.
|
|
|
|
|
# CODE_COVERAGE_CFLAGS are fairly pointless here, too.
|
|
|
|
|
test_segfault_CFLAGS =
|
|
|
|
|
|
2015-02-20 15:07:23 +00:00
|
|
|
test_service_LDADD = libdbus-testutils.la
|
|
|
|
|
test_names_LDADD = libdbus-testutils.la
|
2018-12-11 11:52:38 +00:00
|
|
|
test_privserver_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
|
2019-03-23 22:18:11 +02:00
|
|
|
|
|
|
|
|
if ENABLE_TRADITIONAL_ACTIVATION
|
2014-01-11 10:07:21 +01:00
|
|
|
test_spawn_SOURCES = spawn-test.c
|
|
|
|
|
test_spawn_LDADD = $(top_builddir)/dbus/libdbus-internal.la
|
2018-09-28 15:53:40 +01:00
|
|
|
test_spawn_oom_SOURCES = internals/spawn-oom.c
|
2018-11-15 14:08:03 +00:00
|
|
|
test_spawn_oom_LDADD = libdbus-testutils.la
|
2019-03-23 22:18:11 +02:00
|
|
|
endif
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2018-11-20 12:48:51 +00:00
|
|
|
test_assertions_SOURCES = internals/assertions.c
|
|
|
|
|
test_assertions_LDADD = libdbus-testutils.la $(GLIB_LIBS)
|
|
|
|
|
|
2013-06-12 13:56:39 +01:00
|
|
|
test_printf_SOURCES = internals/printf.c
|
2022-04-01 15:57:07 +01:00
|
|
|
test_printf_LDADD = libdbus-testutils.la
|
2013-06-12 13:56:39 +01:00
|
|
|
|
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
|
|
|
|
2018-12-03 16:04:56 +00:00
|
|
|
# We have to compile a separate copy of disable-crash-handling.c for
|
|
|
|
|
# test-segfault rather than using libdbus-testutils.la, because
|
|
|
|
|
# otherwise it would fail to link when using the AddressSanitizer.
|
|
|
|
|
test_segfault_SOURCES = \
|
|
|
|
|
disable-crash-handling.c \
|
|
|
|
|
disable-crash-handling.h \
|
|
|
|
|
test-segfault.c \
|
|
|
|
|
$(NULL)
|
2019-01-21 17:51:07 +00:00
|
|
|
# Deliberately not adding CODE_COVERAGE_LIBS here because we really
|
|
|
|
|
# don't care about coverage for the test program that segfaults!
|
2018-11-20 12:48:40 +00:00
|
|
|
|
2017-11-21 13:36:10 +00:00
|
|
|
test_server_oom_SOURCES = internals/server-oom.c
|
|
|
|
|
test_server_oom_LDADD = libdbus-testutils.la $(GLIB_LIBS)
|
|
|
|
|
|
2018-10-31 15:21:12 +00:00
|
|
|
test_sysdeps_SOURCES = internals/sysdeps.c
|
|
|
|
|
test_sysdeps_LDADD = libdbus-testutils.la $(GLIB_LIBS)
|
|
|
|
|
|
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
|
|
|
|
2017-06-20 11:56:07 +01:00
|
|
|
test_variant_SOURCES = internals/variant.c
|
|
|
|
|
test_variant_LDADD = libdbus-testutils.la $(GLIB_LIBS)
|
|
|
|
|
|
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
|
2020-04-16 14:21:36 +01:00
|
|
|
manual_paths_LDADD = libdbus-testutils.la
|
2015-02-16 11:43:57 +00:00
|
|
|
|
2015-01-28 22:44:16 +01:00
|
|
|
manual_tcp_SOURCES = manual-tcp.c
|
|
|
|
|
manual_tcp_LDADD = $(top_builddir)/dbus/libdbus-internal.la
|
|
|
|
|
|
2018-10-03 18:49:56 +01:00
|
|
|
test_bus_launch_helper_oom_SOURCES = bus/launch-helper-oom.c
|
2018-11-15 14:08:03 +00:00
|
|
|
test_bus_launch_helper_oom_LDADD = \
|
|
|
|
|
$(top_builddir)/bus/liblaunch-helper-internal.la \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(NULL)
|
2018-10-03 18:49:56 +01:00
|
|
|
|
2018-10-03 19:01:42 +01:00
|
|
|
dbus_daemon_launch_helper_for_tests_SOURCES = bus/launch-helper-for-tests.c
|
2019-01-21 18:45:38 +00:00
|
|
|
dbus_daemon_launch_helper_for_tests_LDADD = \
|
|
|
|
|
$(CODE_COVERAGE_LIBS) \
|
|
|
|
|
$(top_builddir)/bus/liblaunch-helper-internal.la \
|
|
|
|
|
$(NULL)
|
2018-10-03 19:01:42 +01:00
|
|
|
|
2018-10-03 18:49:56 +01:00
|
|
|
test_bus_system_SOURCES = bus/system.c
|
2018-11-15 14:08:03 +00:00
|
|
|
test_bus_system_LDADD = \
|
|
|
|
|
$(top_builddir)/bus/liblaunch-helper-internal.la \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(NULL)
|
2018-10-03 18:49:56 +01:00
|
|
|
|
2022-07-15 15:27:24 +01:00
|
|
|
test_bus_SOURCES = bus/main.c bus/common.c bus/common.h
|
2018-11-15 14:08:03 +00:00
|
|
|
test_bus_LDADD = \
|
|
|
|
|
$(top_builddir)/bus/libdbus-daemon-internal.la \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(NULL)
|
2018-10-03 18:49:56 +01:00
|
|
|
|
2022-07-15 15:27:24 +01:00
|
|
|
test_bus_dispatch_sha1_SOURCES = bus/dispatch-sha1.c bus/common.c bus/common.h
|
2018-11-15 14:08:03 +00:00
|
|
|
test_bus_dispatch_sha1_LDADD = \
|
|
|
|
|
$(top_builddir)/bus/libdbus-daemon-internal.la \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(NULL)
|
2018-09-03 16:57:10 -07:00
|
|
|
|
2018-11-15 15:48:26 +00:00
|
|
|
test_hash_SOURCES = internals/hash.c
|
|
|
|
|
test_hash_LDADD = libdbus-testutils.la
|
|
|
|
|
|
test/bus: Break up dispatch test into three separate tests
This is really three separate test-cases: one for traditional
activation as a direct child process of the dbus-daemon, and two for
traditional activation (successful and failing) via the setuid
dbus-daemon-launch-helper on Unix.
The ones where activation succeeds extremely slow, as a result of the
instrumentation for simulating malloc() failures combined with a large
number of memory operations, particularly when using AddressSanitizer.
Splitting up "OOM" tests like these has a disproportionately good impact
on the time they take, because the simulated malloc() failure
instrumentation repeats the entire test making the first malloc() fail,
then making the second malloc() fail, and so on. For allocation failures
in the second half of the test, this means we repeat the first half of
the test with no malloc() failures a very large number of times, which
is not a good use of time, because we already tested it successfully.
Even when not using the "OOM" instrumentation, splitting up these tests
lets them run in parallel, which is also a major time saving.
Needless to say, this speeds up testing considerably. On my modern but
unexceptional x86 laptop, in a typical debug build with Meson, the old
dispatch test took just over 21 minutes, which drops to about 40 seconds
each for the new normal-activation and helper-activation tests (and for
most of that time, they're running in parallel, so the wall-clock time
taken for the whole test suite is somewhere around a minute).
In a debug build with Meson, gcc and AddressSanitizer, the old dispatch
test takes longer than my patience will allow, and the new separate
tests take about 5-6 minutes each. Reduce their timeout accordingly, but
not as far as the default for slow tests (5 minutes) to allow some
headroom for AddressSanitizer or slower systems.
The failed-helper-activation test is almost instantaneous, and no longer
needs to be marked as slow.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-15 15:41:14 +01:00
|
|
|
test_failed_helper_activation_SOURCES = \
|
|
|
|
|
bus/failed-helper-activation.c \
|
|
|
|
|
bus/common.c \
|
|
|
|
|
bus/common.h \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_failed_helper_activation_LDADD = \
|
|
|
|
|
$(top_builddir)/bus/libdbus-daemon-internal.la \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
test_helper_activation_SOURCES = \
|
|
|
|
|
bus/helper-activation.c \
|
|
|
|
|
bus/common.c \
|
|
|
|
|
bus/common.h \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_helper_activation_LDADD = \
|
|
|
|
|
$(top_builddir)/bus/libdbus-daemon-internal.la \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2018-09-28 16:36:49 +01:00
|
|
|
test_marshal_recursive_SOURCES = \
|
|
|
|
|
internals/dbus-marshal-recursive-util.c \
|
|
|
|
|
internals/dbus-marshal-recursive-util.h \
|
|
|
|
|
internals/marshal-recursive.c \
|
|
|
|
|
$(NULL)
|
2018-11-15 15:48:26 +00:00
|
|
|
test_marshal_recursive_LDADD = libdbus-testutils.la
|
|
|
|
|
|
2018-09-28 16:32:03 +01:00
|
|
|
test_message_internals_SOURCES = \
|
2018-09-28 16:36:49 +01:00
|
|
|
internals/dbus-marshal-recursive-util.c \
|
|
|
|
|
internals/dbus-marshal-recursive-util.h \
|
2018-09-28 16:32:03 +01:00
|
|
|
internals/dbus-message-factory.c \
|
|
|
|
|
internals/dbus-message-factory.h \
|
|
|
|
|
internals/dbus-message-util.c \
|
|
|
|
|
internals/dbus-message-util.h \
|
|
|
|
|
internals/message-internals.c \
|
|
|
|
|
$(NULL)
|
2018-11-15 15:48:26 +00:00
|
|
|
test_message_internals_LDADD = libdbus-testutils.la
|
|
|
|
|
|
2018-09-28 16:27:42 +01:00
|
|
|
test_misc_internals_SOURCES = \
|
2019-07-03 10:47:21 +01:00
|
|
|
internals/address.c \
|
2018-09-28 16:27:42 +01:00
|
|
|
internals/dbus-auth-script.c \
|
|
|
|
|
internals/dbus-auth-script.h \
|
|
|
|
|
internals/dbus-auth-util.c \
|
|
|
|
|
internals/dbus-credentials-util.c \
|
2018-09-28 16:36:49 +01:00
|
|
|
internals/dbus-marshal-byteswap-util.c \
|
|
|
|
|
internals/dbus-marshal-recursive-util.c \
|
|
|
|
|
internals/dbus-marshal-recursive-util.h \
|
|
|
|
|
internals/dbus-marshal-validate-util.c \
|
2018-09-28 16:45:50 +01:00
|
|
|
internals/dbus-string-util.c \
|
2018-09-28 16:46:41 +01:00
|
|
|
internals/dbus-sysdeps-util.c \
|
2019-07-03 10:58:06 +01:00
|
|
|
internals/mempool.c \
|
2018-09-28 16:27:42 +01:00
|
|
|
internals/misc-internals.c \
|
|
|
|
|
internals/misc-internals.h \
|
2019-07-03 09:58:04 +01:00
|
|
|
internals/sha.c \
|
2018-09-28 16:27:42 +01:00
|
|
|
$(NULL)
|
2018-11-15 14:08:03 +00:00
|
|
|
test_misc_internals_LDADD = libdbus-testutils.la
|
2018-10-03 19:15:38 +01:00
|
|
|
|
test/bus: Break up dispatch test into three separate tests
This is really three separate test-cases: one for traditional
activation as a direct child process of the dbus-daemon, and two for
traditional activation (successful and failing) via the setuid
dbus-daemon-launch-helper on Unix.
The ones where activation succeeds extremely slow, as a result of the
instrumentation for simulating malloc() failures combined with a large
number of memory operations, particularly when using AddressSanitizer.
Splitting up "OOM" tests like these has a disproportionately good impact
on the time they take, because the simulated malloc() failure
instrumentation repeats the entire test making the first malloc() fail,
then making the second malloc() fail, and so on. For allocation failures
in the second half of the test, this means we repeat the first half of
the test with no malloc() failures a very large number of times, which
is not a good use of time, because we already tested it successfully.
Even when not using the "OOM" instrumentation, splitting up these tests
lets them run in parallel, which is also a major time saving.
Needless to say, this speeds up testing considerably. On my modern but
unexceptional x86 laptop, in a typical debug build with Meson, the old
dispatch test took just over 21 minutes, which drops to about 40 seconds
each for the new normal-activation and helper-activation tests (and for
most of that time, they're running in parallel, so the wall-clock time
taken for the whole test suite is somewhere around a minute).
In a debug build with Meson, gcc and AddressSanitizer, the old dispatch
test takes longer than my patience will allow, and the new separate
tests take about 5-6 minutes each. Reduce their timeout accordingly, but
not as far as the default for slow tests (5 minutes) to allow some
headroom for AddressSanitizer or slower systems.
The failed-helper-activation test is almost instantaneous, and no longer
needs to be marked as slow.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-15 15:41:14 +01:00
|
|
|
test_normal_activation_SOURCES = \
|
|
|
|
|
bus/normal-activation.c \
|
|
|
|
|
bus/common.c \
|
|
|
|
|
bus/common.h \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_normal_activation_LDADD = \
|
|
|
|
|
$(top_builddir)/bus/libdbus-daemon-internal.la \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2022-03-02 13:17:10 +01:00
|
|
|
test_platform_mutex_SOURCES = test-platform-mutex.c
|
|
|
|
|
test_platform_mutex_LDADD = \
|
|
|
|
|
$(top_builddir)/dbus/libdbus-internal.la \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
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 = \
|
Translate Python-based tests to C
This simplifies bootstrapping: now you don't have to build dbus,
build dbus-python (with GLib), and use dbus-python to test dbus.
It also avoids test failures when using facilities like
AddressSanitizer. When libdbus is built with AddressSanitizer, but the
system copies of Python and dbus-python were not, dbus-python will exit
the Python interpreter on load, because libasan wasn't already
initialized. The simplest way to avoid this is to not use Python:
the scripts are not *that* hard to translate into C.
Both of these tests happen to be conditionally compiled for Unix only.
test_activation_forking() relies on code in TestSuiteForkingEchoService
that calls fork(), which can only work on Unix; meanwhile,
test_system_signals() tests the system bus configuration, which is
only relevant to Unix because we don't support using dbus-daemon as
a privilege boundary on Windows (and in any case D-Bus is not a Windows
OS feature, so the system bus cannot be used to communicate with OS
services like it can on most Linux systems).
This is also a partial solution to
<https://gitlab.freedesktop.org/dbus/dbus/issues/135>, by reducing the
size of name-test/.
For this to work, we need to build the test-service helper executable
even if embedded tests are disabled.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-16 18:53:11 +00:00
|
|
|
test-service \
|
2018-10-25 16:42:21 +01:00
|
|
|
test-sleep-forever \
|
2016-11-21 20:46:17 +00:00
|
|
|
$(NULL)
|
2011-06-08 17:39:41 +01:00
|
|
|
installable_tests = \
|
2020-04-16 14:18:49 +01:00
|
|
|
test-atomic \
|
|
|
|
|
test-hash \
|
2014-01-10 02:17:22 +01:00
|
|
|
test-shell \
|
2020-04-16 14:18:49 +01:00
|
|
|
test-misc-internals \
|
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 += \
|
2018-11-20 12:48:51 +00:00
|
|
|
test-assertions \
|
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 \
|
2018-10-18 13:45:12 +01:00
|
|
|
test-desktop-file \
|
2015-02-04 19:45:23 +00:00
|
|
|
test-fdpass \
|
2017-11-27 15:51:15 +00:00
|
|
|
test-header-fields \
|
2017-07-04 14:23:42 +01:00
|
|
|
test-message \
|
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 \
|
2017-11-21 13:36:10 +00:00
|
|
|
test-server-oom \
|
2012-02-24 12:44:14 +00:00
|
|
|
test-syntax \
|
2018-10-31 15:21:12 +00:00
|
|
|
test-sysdeps \
|
2011-08-23 16:14:21 +01:00
|
|
|
test-syslog \
|
2015-01-26 19:10:11 +00:00
|
|
|
test-uid-permissions \
|
2017-06-20 11:56:07 +01:00
|
|
|
test-variant \
|
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 += \
|
2017-06-20 17:37:33 +01:00
|
|
|
test-containers \
|
2015-10-19 15:18:02 +01:00
|
|
|
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 \
|
2018-02-01 19:47:00 +00:00
|
|
|
manual-test-thread-blocking \
|
2013-08-23 02:57:27 +02:00
|
|
|
$(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; \
|
2017-07-05 15:32:40 +01:00
|
|
|
export DBUS_SESSION_BUS_ADDRESS=do-not-use-real-session:; \
|
2015-04-01 13:07:19 +01:00
|
|
|
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); \
|
2017-06-08 17:04:24 +01:00
|
|
|
export DBUS_TEST_DBUS_UUIDGEN=$(DESTDIR)$(bindir)/dbus-uuidgen$(EXEEXT); \
|
2017-04-15 21:06:23 +01:00
|
|
|
export DBUS_TEST_EXEC=@abs_top_builddir@/test; \
|
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); \
|
2017-06-02 12:22:59 +01:00
|
|
|
export DBUS_TEST_UNINSTALLED=1; \
|
userdb: Respect $HOME for the home directory of our own uid
This lets cooperating processes with the same value of $HOME
interoperate for DBUS_COOKIE_SHA1 by reading and writing $HOME, even
if their $HOME differs from the uid's "official" home directory
according to getpwuid(). Out of paranoia, we only do this if the uid
and the euid are equal, since if they were unequal the correct thing
to do would be ambiguous.
In particular, Debian autobuilders run as a user whose "official"
home directory in /etc/passwd is "/nonexistent", as a mechanism to
detect non-deterministic build processes that rely on the contents of
the home directory. Until now, this meant we couldn't run dbus'
build-time tests, because every test that used DBUS_COOKIE_SHA1 would
fail in this environment.
In the tests, set HOME as well as DBUS_TEST_HOMEDIR. We keep
DBUS_TEST_HOMEDIR too, because Windows doesn't use HOME, only HOMEDRIVE
and HOMEPATH.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101960
Bug-Debian: https://bugs.debian.org/630152
Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2017-07-28 08:38:20 +01:00
|
|
|
export HOME=@abs_top_builddir@/dbus; \
|
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-07-05 15:32:40 +01:00
|
|
|
export DBUS_SESSION_BUS_ADDRESS=do-not-use-real-session:; \
|
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); \
|
2017-06-08 17:04:24 +01:00
|
|
|
export DBUS_TEST_DBUS_UUIDGEN=@abs_top_builddir@/tools/dbus-uuidgen$(EXEEXT); \
|
2015-04-01 13:07:19 +01:00
|
|
|
export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
|
2017-04-15 21:06:23 +01:00
|
|
|
export DBUS_TEST_EXEC=@abs_top_builddir@/test; \
|
2015-04-01 13:07:19 +01:00
|
|
|
export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
|
2017-06-02 12:22:59 +01:00
|
|
|
export DBUS_TEST_UNINSTALLED=1; \
|
2022-09-12 13:24:28 +01:00
|
|
|
export G_TEST_BUILDDIR=@abs_builddir@; \
|
|
|
|
|
export G_TEST_SRCDIR=@abs_srcdir@; \
|
userdb: Respect $HOME for the home directory of our own uid
This lets cooperating processes with the same value of $HOME
interoperate for DBUS_COOKIE_SHA1 by reading and writing $HOME, even
if their $HOME differs from the uid's "official" home directory
according to getpwuid(). Out of paranoia, we only do this if the uid
and the euid are equal, since if they were unequal the correct thing
to do would be ambiguous.
In particular, Debian autobuilders run as a user whose "official"
home directory in /etc/passwd is "/nonexistent", as a mechanism to
detect non-deterministic build processes that rely on the contents of
the home directory. Until now, this meant we couldn't run dbus'
build-time tests, because every test that used DBUS_COOKIE_SHA1 would
fail in this environment.
In the tests, set HOME as well as DBUS_TEST_HOMEDIR. We keep
DBUS_TEST_HOMEDIR too, because Windows doesn't use HOME, only HOMEDRIVE
and HOMEPATH.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101960
Bug-Debian: https://bugs.debian.org/630152
Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2017-07-28 08:38:20 +01:00
|
|
|
export HOME=@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
|
|
|
|
|
|
2017-06-20 17:37:33 +01:00
|
|
|
test_containers_SOURCES = containers.c
|
|
|
|
|
test_containers_LDADD = \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
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
|
|
|
|
2018-10-18 13:45:12 +01:00
|
|
|
test_desktop_file_SOURCES = \
|
|
|
|
|
internals/desktop-file.c \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_desktop_file_LDADD = \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(top_builddir)/dbus/libdbus-internal.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2017-11-27 15:51:15 +00:00
|
|
|
test_header_fields_SOURCES = \
|
|
|
|
|
header-fields.c \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_header_fields_LDADD = \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(top_builddir)/dbus/libdbus-internal.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
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
|
|
|
|
2017-07-04 14:23:42 +01:00
|
|
|
test_message_SOURCES = \
|
|
|
|
|
message.c \
|
|
|
|
|
$(NULL)
|
|
|
|
|
test_message_LDADD = \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(top_builddir)/dbus/libdbus-internal.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
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
|
|
|
|
2018-02-01 19:47:00 +00:00
|
|
|
manual_test_thread_blocking_SOURCES = thread-blocking.c
|
|
|
|
|
manual_test_thread_blocking_LDADD = \
|
|
|
|
|
libdbus-testutils.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
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
|
2018-10-31 15:09:24 +00:00
|
|
|
noinst_PROGRAMS += $(installable_helpers)
|
|
|
|
|
noinst_PROGRAMS += $(installable_manual_tests)
|
|
|
|
|
noinst_PROGRAMS += $(installable_tests)
|
2011-06-08 17:39:41 +01:00
|
|
|
endif !DBUS_ENABLE_INSTALLED_TESTS
|
|
|
|
|
|
2018-10-31 15:09:24 +00:00
|
|
|
else !DBUS_ENABLE_MODULAR_TESTS
|
|
|
|
|
|
|
|
|
|
if DBUS_ENABLE_EMBEDDED_TESTS
|
|
|
|
|
noinst_PROGRAMS += $(installable_helpers)
|
|
|
|
|
endif DBUS_ENABLE_EMBEDDED_TESTS
|
|
|
|
|
|
|
|
|
|
endif !DBUS_ENABLE_MODULAR_TESTS
|
2011-02-22 13:04:18 +00:00
|
|
|
|
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 \
|
2018-02-20 11:45:39 +00:00
|
|
|
data/valid-config-files/as-another-user.conf.in \
|
2017-07-19 19:43:09 +01:00
|
|
|
data/valid-config-files/count-fds.conf.in \
|
2011-09-26 11:20:41 +01:00
|
|
|
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 \
|
2017-06-23 16:24:22 +01:00
|
|
|
data/valid-config-files/limit-containers.conf.in \
|
2022-07-08 17:41:49 +04:00
|
|
|
data/valid-config-files/listen-autolaunch-win.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 \
|
2017-06-23 16:24:22 +01:00
|
|
|
data/valid-config-files/max-containers.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 \
|
2019-04-25 09:35:59 +02:00
|
|
|
data/valid-config-files/send-destination-prefix-rules.conf.in \
|
2015-01-26 20:10:39 +00:00
|
|
|
data/valid-config-files/systemd-activation.conf.in \
|
2011-10-31 15:53:25 +01:00
|
|
|
data/valid-config-files/tmp-session.conf.in \
|
|
|
|
|
data/valid-config-files-system/tmp-session-like-system.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 = \
|
|
|
|
|
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 \
|
2019-05-30 12:58:28 +01:00
|
|
|
data/auth/cookie-sha1-username.auth-script \
|
|
|
|
|
data/auth/cookie-sha1.auth-script \
|
2018-01-12 16:50:20 +00:00
|
|
|
data/auth/external-auto.auth-script \
|
2011-09-26 11:20:41 +01:00
|
|
|
data/auth/external-failed.auth-script \
|
|
|
|
|
data/auth/external-root.auth-script \
|
|
|
|
|
data/auth/external-silly.auth-script \
|
|
|
|
|
data/auth/external-successful.auth-script \
|
2018-01-12 16:52:58 +00:00
|
|
|
data/auth/external-username.auth-script \
|
2011-09-26 11:20:41 +01:00
|
|
|
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 \
|
2018-08-17 17:02:45 +01:00
|
|
|
data/invalid-config-files/apparmor-bad-attribute.conf \
|
|
|
|
|
data/invalid-config-files/apparmor-bad-mode.conf \
|
|
|
|
|
data/invalid-config-files/bad-attribute.conf \
|
|
|
|
|
data/invalid-config-files/bad-attribute-2.conf \
|
|
|
|
|
data/invalid-config-files/bad-element.conf \
|
|
|
|
|
data/invalid-config-files/bad-limit.conf \
|
2011-09-26 11:20:41 +01:00
|
|
|
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 \
|
2018-08-17 17:02:45 +01:00
|
|
|
data/invalid-config-files/double-attribute.conf \
|
2017-09-25 13:37:57 +01:00
|
|
|
data/invalid-config-files/impossible-send.conf \
|
2018-08-17 17:02:45 +01:00
|
|
|
data/invalid-config-files/limit-no-name.conf \
|
|
|
|
|
data/invalid-config-files/ludicrous-limit.conf \
|
|
|
|
|
data/invalid-config-files/negative-limit.conf \
|
|
|
|
|
data/invalid-config-files/non-numeric-limit.conf \
|
2011-09-26 11:20:41 +01:00
|
|
|
data/invalid-config-files/not-well-formed.conf \
|
2018-08-17 17:02:45 +01:00
|
|
|
data/invalid-config-files/policy-bad-at-console.conf \
|
|
|
|
|
data/invalid-config-files/policy-bad-attribute.conf \
|
|
|
|
|
data/invalid-config-files/policy-bad-context.conf \
|
|
|
|
|
data/invalid-config-files/policy-bad-rule-attribute.conf \
|
|
|
|
|
data/invalid-config-files/policy-contradiction.conf \
|
|
|
|
|
data/invalid-config-files/policy-member-no-path.conf \
|
|
|
|
|
data/invalid-config-files/policy-mixed.conf \
|
|
|
|
|
data/invalid-config-files/policy-no-attributes.conf \
|
|
|
|
|
data/invalid-config-files/policy-no-rule-attribute.conf \
|
2011-09-26 11:20:41 +01:00
|
|
|
data/invalid-config-files/truncated-file.conf \
|
2017-07-19 14:41:35 +01:00
|
|
|
data/invalid-config-files/send-and-receive.conf \
|
2018-08-17 17:02:45 +01:00
|
|
|
data/invalid-config-files/unknown-limit.conf \
|
2011-09-26 11:20:41 +01:00
|
|
|
data/invalid-messages/boolean-has-no-value.message-raw \
|
2022-09-12 13:28:29 +01:00
|
|
|
data/invalid-messages/fixed-array-not-divisible.message-raw \
|
|
|
|
|
data/invalid-messages/fixed-array-not-divisible.message-raw.hex \
|
|
|
|
|
data/invalid-messages/issue418.message-raw \
|
|
|
|
|
data/invalid-messages/issue418.message-raw.hex \
|
|
|
|
|
data/invalid-messages/mis-nested-sig.message-raw \
|
|
|
|
|
data/invalid-messages/mis-nested-sig.message-raw.hex \
|
|
|
|
|
data/invalid-messages/truncated-variant-sig.message-raw \
|
|
|
|
|
data/invalid-messages/truncated-variant-sig.message-raw.hex \
|
|
|
|
|
data/invalid-messages/zero-length-variant-sig.message-raw \
|
|
|
|
|
data/invalid-messages/zero-length-variant-sig.message-raw.hex \
|
2011-09-26 11:20:41 +01:00
|
|
|
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 \
|
2019-04-25 15:04:53 +02:00
|
|
|
data/systemd-activation/com.example.SendPrefixDenied.service \
|
|
|
|
|
data/systemd-activation/com.example.SendPrefixDenied.internal.service \
|
|
|
|
|
data/systemd-activation/com.example.SendPrefixDenied.SendPrefixAllowed.internal.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 \
|
2017-10-23 13:32:22 +01:00
|
|
|
data/valid-config-files/check-own-rules.conf \
|
2011-09-26 11:20:41 +01:00
|
|
|
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 \
|
2018-08-17 17:02:45 +01:00
|
|
|
data/valid-config-files/minimal.conf \
|
2017-02-17 18:12:54 +00:00
|
|
|
data/valid-config-files/standard-session-dirs.conf \
|
2017-10-23 13:32:22 +01:00
|
|
|
data/valid-config-files-system/many-rules.conf \
|
2015-11-03 00:23:56 +01:00
|
|
|
data/valid-config-files-system/system.d/test.conf \
|
2022-09-30 14:01:05 +01:00
|
|
|
data/valid-messages/byteswap-fd-index.message-raw \
|
|
|
|
|
data/valid-messages/byteswap-fd-index.message-raw.hex \
|
2022-09-30 14:00:08 +01:00
|
|
|
data/valid-messages/minimal.message-raw \
|
|
|
|
|
data/valid-messages/minimal.message-raw.hex \
|
2011-09-26 11:20:41 +01:00
|
|
|
$(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.
|
2019-04-17 16:32:01 +01:00
|
|
|
## Note that we can't create the XDG_RUNTIME_DIR with permissions 0700
|
|
|
|
|
## on MSYS2, which rejects attempts to change permissions, hence "|| true".
|
2015-01-26 18:55:08 +00:00
|
|
|
all-local: copy-config-local uninstalled-config-local
|
2019-04-17 16:32:01 +01:00
|
|
|
$(AM_V_at)$(MKDIR_P) XDG_RUNTIME_DIR
|
|
|
|
|
$(AM_V_at)chmod 0700 XDG_RUNTIME_DIR || true
|
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 \
|
2011-10-31 15:53:25 +01:00
|
|
|
-e 's,[@]DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL[@],$(DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL),' \
|
|
|
|
|
-e 's,[@]DBUS_SESSION_BUS_LISTEN_ADDRESS[@],$(DBUS_SESSION_BUS_LISTEN_ADDRESS),' \
|
2015-01-26 18:55:08 +00:00
|
|
|
-e 's,[@]DBUS_TEST_DATA[@],@abs_builddir@/data,' \
|
|
|
|
|
-e 's,[@]DBUS_TEST_EXEC[@],@abs_builddir@,' \
|
2018-02-20 11:45:39 +00:00
|
|
|
-e 's,[@]DBUS_USER[@],$(DBUS_USER),' \
|
2015-01-26 18:55:08 +00:00
|
|
|
-e 's,[@]EXEEXT[@],$(EXEEXT),' \
|
2018-10-03 19:01:42 +01:00
|
|
|
-e 's,[@]TEST_LAUNCH_HELPER_BINARY[@],@abs_top_builddir@/test/dbus-daemon-launch-helper-for-tests$(EXEEXT),' \
|
2015-01-26 18:55:08 +00:00
|
|
|
-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 \
|
2011-10-31 15:53:25 +01:00
|
|
|
-e 's,[@]DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL[@],$(DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL),' \
|
|
|
|
|
-e 's,[@]DBUS_SESSION_BUS_LISTEN_ADDRESS[@],$(DBUS_SESSION_BUS_LISTEN_ADDRESS),' \
|
2015-01-26 18:55:08 +00:00
|
|
|
-e 's,[@]DBUS_TEST_DATA[@],$(testexecdir)/data,' \
|
|
|
|
|
-e 's,[@]DBUS_TEST_EXEC[@],$(testexecdir),' \
|
2018-02-20 11:45:39 +00:00
|
|
|
-e 's,[@]DBUS_USER[@],$(DBUS_USER),' \
|
2015-01-26 18:55:08 +00:00
|
|
|
-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
|
|
|
|
2022-06-24 12:49:32 +01:00
|
|
|
EXTRA_DIST += data/copy_data_for_tests.py
|
|
|
|
|
EXTRA_DIST += data/installable/meson.build
|
|
|
|
|
EXTRA_DIST += data/meson.build
|
|
|
|
|
EXTRA_DIST += meson.build
|
|
|
|
|
EXTRA_DIST += meta_template.test.in
|
2022-06-23 19:44:27 +01:00
|
|
|
EXTRA_DIST += mkdir-m700.py
|
2022-06-24 12:49:32 +01:00
|
|
|
|
2016-08-12 10:50:53 +02:00
|
|
|
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
|
2019-01-21 17:51:07 +00:00
|
|
|
include $(top_srcdir)/aminclude_static.am
|