mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-23 04:58:08 +02:00
* test/glib/test-dbus-glib.c: * test/glib/test-service-glib.c: * test/glib/test-service-glib.xml: Update tests for new error setting bits, also add async tests (patch from Ross Burton). * test/glib/Makefile.am (test_service_glib_LDADD): Add DBUS_GLIB_THREADS_LIBS. * glib/dbus-gproxy.c (get_name_owner) (dbus_g_pending_call_end_valist): Ditto. * glib/dbus-gobject.c (error_metadata): New mapping from GError domain (GQuark) to DBusGErrorInfo. (gerror_domaincode_to_dbus_error_name): Attempt to look up error quark in error_metadata. Take message interface as default error message interface. (gerror_to_dbus_error_message): Pass message interface. (dbus_set_g_error): Resurrected. (dbus_g_error_info_free): New function. (dbus_g_object_type_install_info): Use g_type_class_ref instead of _peek to actually create the object class if it hasn't been created yet. (dbus_g_error_domain_register): New function. * glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error. * glib/dbus-gparser.c (validate_signature): Ditto. * dbus/dbus-glib.h (dbus_g_error_set): Delete. (dbus_g_error_domain_register): Prototype. * glib/dbus-glib.c (dbus_g_error_set): Delete. Update tests.
80 lines
2.6 KiB
Makefile
80 lines
2.6 KiB
Makefile
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) -DDBUS_COMPILATION
|
|
|
|
## 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=$(ABSOLUTE_TOP_BUILDDIR)
|
|
TESTS=run-test.sh
|
|
else
|
|
TESTS=
|
|
endif
|
|
|
|
EXTRA_DIST=run-test.sh test-service-glib.xml
|
|
|
|
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 test-service-glib $(THREAD_APPS)
|
|
|
|
test_dbus_glib_SOURCES= \
|
|
my-object-marshal.c \
|
|
test-dbus-glib.c
|
|
|
|
test_dbus_glib_LDADD= $(DBUS_GLIB_TOOL_LIBS) $(top_builddir)/glib/libdbus-glib-1.la $(top_builddir)/glib/libdbus-gtool.la
|
|
|
|
BUILT_SOURCES = test-service-glib-glue.h test-service-glib-bindings.h my-object-marshal.c my-object-marshal.h
|
|
|
|
test_service_glib_SOURCES= \
|
|
my-object-marshal.c \
|
|
test-service-glib.c
|
|
|
|
test-service-glib-glue.h: test-service-glib.xml $(top_builddir)/glib/dbus-binding-tool
|
|
$(top_builddir)/glib/dbus-binding-tool --prefix=my_object --mode=glib-server --output=test-service-glib-glue.h $(srcdir)/test-service-glib.xml
|
|
|
|
test-service-glib-bindings.h: test-service-glib.xml $(top_builddir)/glib/dbus-binding-tool
|
|
$(top_builddir)/glib/dbus-binding-tool --prefix=my_object --mode=glib-client --output=test-service-glib-bindings.h $(srcdir)/test-service-glib.xml
|
|
|
|
my-object-marshal.c: Makefile my-object-marshal.list
|
|
@GLIB_GENMARSHAL@ --prefix=my_object_marshal $(srcdir)/my-object-marshal.list --header --body > my-object-marshal.c
|
|
|
|
my-object-marshal.h: Makefile my-object-marshal.list
|
|
@GLIB_GENMARSHAL@ --prefix=my_object_marshal $(srcdir)/my-object-marshal.list --header > my-object-marshal.h
|
|
|
|
|
|
CLEANFILES = $(BUILT_SOURCES)
|
|
|
|
test_service_glib_LDADD= $(top_builddir)/glib/libdbus-glib-1.la $(DBUS_GLIB_THREADS_LIBS)
|
|
|
|
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
|