mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-26 12:18:12 +02:00
Added test code that 1) starts an actual bus daemon and 2) uses DBusGProxy; fixed bugs that were revealed by the test. Lots more testing possible, but this is the basic framework. * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove empty proxy lists from the proxy list hash * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a couple of return_if_fail checks * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0 to allocate, so everything is cleared to NULL as it should be. * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass source as data to dbus_connection_set_timeout_functions() as the timeout functions expected * test/glib/run-test.sh: add a little script to start up a message bus and run tests using it * tools/dbus-launch.1: updates * tools/dbus-launch.c (main): add --config-file option * tools/dbus-launch.c (main): remove confusing else if (runprog) that could never be reached. * dbus/dbus-message.c (dbus_message_new_method_return) (dbus_message_new_error, dbus_message_new_signal): set the no-reply-expected flag on all these. Redundant, but may as well be consistent.
56 lines
No EOL
1.3 KiB
Makefile
56 lines
No EOL
1.3 KiB
Makefile
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) -I$(top_srcdir)/glib
|
|
|
|
## note that TESTS has special meaning (stuff to use in make check)
|
|
## so if adding tests not to be run in make check, don't add them to
|
|
## TESTS
|
|
if DBUS_BUILD_TESTS
|
|
TESTS_ENVIRONMENT=DBUS_TOP_BUILDDIR=$(top_builddir) DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
|
|
TESTS=run-test.sh
|
|
else
|
|
TESTS=
|
|
endif
|
|
|
|
EXTRA_DIST=run-test.sh
|
|
|
|
if DBUS_BUILD_TESTS
|
|
|
|
if HAVE_GLIB_THREADS
|
|
THREAD_APPS=test-thread-server test-thread-client test-profile
|
|
|
|
test_thread_server_SOURCES= \
|
|
test-thread-server.c \
|
|
test-thread.h
|
|
|
|
test_thread_server_LDADD= $(DBUS_GLIB_THREADS_LIBS) $(top_builddir)/glib/libdbus-glib-1.la
|
|
|
|
test_thread_client_SOURCES= \
|
|
test-thread-client.c \
|
|
test-thread.h
|
|
|
|
test_thread_client_LDADD= $(DBUS_GLIB_THREADS_LIBS) $(top_builddir)/glib/libdbus-glib-1.la
|
|
endif
|
|
|
|
## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
|
|
## build even when not doing "make check"
|
|
noinst_PROGRAMS= test-dbus-glib $(THREAD_APPS)
|
|
|
|
test_dbus_glib_SOURCES= \
|
|
test-dbus-glib.c
|
|
|
|
test_dbus_glib_LDADD= $(top_builddir)/glib/libdbus-glib-1.la
|
|
|
|
else
|
|
### not building tests
|
|
|
|
if HAVE_GLIB_THREADS
|
|
noinst_PROGRAMS=test-profile
|
|
endif
|
|
|
|
endif
|
|
|
|
if HAVE_GLIB_THREADS
|
|
test_profile_SOURCES= \
|
|
test-profile.c
|
|
|
|
test_profile_LDADD= $(DBUS_GLIB_THREADS_LIBS) $(top_builddir)/glib/libdbus-glib-1.la
|
|
endif |