summaryrefslogtreecommitdiff
path: root/test/Makefile.am
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2022-03-02 13:17:10 +0100
committerRalf Habacker <ralf.habacker@freenet.de>2022-05-01 19:52:48 +0200
commit5f1bc83d36ab228f8d1cabb87379cf405545c62a (patch)
tree27360e703cac672780ae76fe7b64c860ef1adf08 /test/Makefile.am
parent72a7758e38be9b7b373155e39ee72b5ab1db9567 (diff)
downloaddbus-5f1bc83d36ab228f8d1cabb87379cf405545c62a.tar.gz
Add unit tests for platform-specific mutex implementation.
The tests are enabled with the embedded tests; the required low-level functions from the dbus library are decorated with DBUS_EMBEDDED_TESTS_EXPORT to indicate the appropriate usage. On Windows, all tests are run; on unix-like operating systems, individual tests are disabled: - the tests on #NULL pointers of type DBus[C|R]Mutex, since they point to a data structure and would cause a segment violation when accessed. - the multiple lock test for type DBusCMutex, since it would block the current thread. Since the whole point of "rmutex" is to be able to lock multiple times, the "rmutex double lock" test is enabled on unix-like operating systems too. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'test/Makefile.am')
-rw-r--r--test/Makefile.am7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index d013dd87..e89d8ad4 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -85,6 +85,7 @@ TEST_BINARIES += test-spawn
endif
uninstallable_test_programs += \
+ test-platform-mutex \
test-bus \
test-bus-dispatch \
test-bus-dispatch-sha1 \
@@ -256,6 +257,12 @@ test_misc_internals_SOURCES = \
$(NULL)
test_misc_internals_LDADD = libdbus-testutils.la
+test_platform_mutex_SOURCES = test-platform-mutex.c
+test_platform_mutex_LDADD = \
+ $(top_builddir)/dbus/libdbus-internal.la \
+ libdbus-testutils.la \
+ $(NULL)
+
EXTRA_DIST += dbus-test-runner
testexecdir = $(libexecdir)/installed-tests/dbus