1 include $(top_srcdir)/glib.mk
2 dist_uninstalled_test_data =
5 SUBDIRS = gdbus-object-manager-example services
8 $(top_builddir)/glib/libglib-2.0.la \
9 $(top_builddir)/gobject/libgobject-2.0.la \
10 $(top_builddir)/gmodule/libgmodule-2.0.la \
11 $(top_builddir)/gio/libgio-2.0.la
12 AM_CPPFLAGS = $(gio_INCLUDES) $(GLIB_DEBUG_FLAGS) -I$(top_builddir)/gio -I$(top_srcdir)/gio
13 DEFS = -DG_LOG_DOMAIN=\"GLib-GIO\" -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\"
14 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
16 # -----------------------------------------------------------------------------
17 # Test programs buildable on all platforms
20 async-close-output-stream \
21 buffered-input-stream \
22 buffered-output-stream \
29 fileattributematcher \
39 memory-output-stream \
58 uninstalled_test_programs = \
70 uninstalled_test_extra_programs = \
73 gapplication-example-actions \
74 gapplication-example-cmdline \
75 gapplication-example-cmdline2 \
76 gapplication-example-cmdline3 \
77 gapplication-example-dbushooks \
78 gapplication-example-open \
79 gdbus-example-export \
80 gdbus-example-own-name \
82 gdbus-example-proxy-subclass \
83 gdbus-example-server \
84 gdbus-example-subtree \
85 gdbus-example-watch-name \
86 gdbus-example-watch-proxy \
94 test_extra_programs = \
95 gdbus-connection-flush-helper \
99 dist_uninstalled_test_data += $(addprefix schema-tests/,$(schema_tests))
101 array-default-not-in-choices.gschema.xml \
102 bad-choice.gschema.xml \
103 bad-key.gschema.xml \
104 bad-key2.gschema.xml \
105 bad-key3.gschema.xml \
106 bad-key4.gschema.xml \
107 bad-type.gschema.xml \
108 bare-alias.gschema.xml \
109 choice-alias.gschema.xml \
110 choice-bad.gschema.xml \
111 choice-badtype.gschema.xml \
112 choice-invalid-alias.gschema.xml \
113 choice-missing-value.gschema.xml \
114 choice-shadowed-alias.gschema.xml \
115 choice-upside-down.gschema.xml \
117 choices-wrong-type.gschema.xml \
118 default-in-aliases.gschema.xml \
119 default-not-in-choices.gschema.xml \
120 default-out-of-range.gschema.xml \
121 empty-key.gschema.xml \
122 enum-with-aliases.gschema.xml \
123 enum-with-bad-default.gschema.xml \
124 enum-with-chained-alias.gschema.xml \
125 enum-with-choice.gschema.xml \
126 enum-with-invalid-alias.gschema.xml \
127 enum-with-repeated-alias.gschema.xml \
128 enum-with-repeated-nick.gschema.xml \
129 enum-with-repeated-value.gschema.xml \
130 enum-with-shadow-alias.gschema.xml \
132 extend-and-shadow-indirect.gschema.xml \
133 extend-and-shadow.gschema.xml \
134 extend-missing.gschema.xml \
135 extend-nonlist.gschema.xml \
136 extend-self.gschema.xml \
137 extend-wrong-list-indirect.gschema.xml \
138 extend-wrong-list.gschema.xml \
139 extending.gschema.xml \
140 flags-aliased-default.gschema.xml \
141 flags-bad-default.gschema.xml \
142 flags-more-than-one-bit.gschema.xml \
143 flags-with-enum-attr.gschema.xml \
144 flags-with-enum-tag.gschema.xml \
145 from-docs.gschema.xml \
146 incomplete-list.gschema.xml \
147 inherit-gettext-domain.gschema.xml \
148 invalid-path.gschema.xml \
149 key-in-list-indirect.gschema.xml \
150 key-in-list.gschema.xml \
151 list-of-missing.gschema.xml \
152 missing-quotes.gschema.xml \
153 no-default.gschema.xml \
154 overflow.gschema.xml \
155 override-missing.gschema.xml \
156 override-range-error.gschema.xml \
157 override-then-key.gschema.xml \
158 override-twice.gschema.xml \
159 override-type-error.gschema.xml \
160 override.gschema.xml \
161 range-badtype.gschema.xml \
162 range-default-high.gschema.xml \
163 range-default-low.gschema.xml \
164 range-high-default.gschema.xml \
165 range-low-default.gschema.xml \
166 range-missing-max.gschema.xml \
167 range-missing-min.gschema.xml \
168 range-parse-error.gschema.xml \
169 range-wrong-type.gschema.xml \
171 wrong-category.gschema.xml \
174 test_programs += tls-certificate
175 tls_certificate_SOURCES = \
179 dist_test_data += $(cert_data_files)
180 cert_data_files = $(addprefix cert-tests/,$(cert_tests))
193 uninstalled_test_extra_programs += socket-client
194 socket_client_SOURCES = \
196 gtlsconsoleinteraction.c \
197 gtlsconsoleinteraction.h
198 EXTRA_DIST += socket-common.c
200 uninstalled_test_extra_programs += gdbus-daemon
201 nodist_gdbus_daemon_SOURCES = \
202 $(top_builddir)/gio/gdbus-daemon-generated.c
203 gdbus_daemon_SOURCES = \
205 $(top_srcdir)/gio/gdbusdaemon.c
207 # -----------------------------------------------------------------------------
208 # Test programs buildable on UNIX only
215 gdbus-peer-object-manager \
222 # Uninstalled because of the check-for-executable logic in DesktopAppInfo unable to find the installed executable
223 uninstalled_test_programs += \
229 appinfo-test-actions.desktop \
230 appinfo-test-gnome.desktop \
231 appinfo-test-notgnome.desktop \
232 appinfo-test.desktop \
233 appinfo-test2.desktop \
235 org.gtk.test.dbusappinfo.desktop \
238 test_extra_programs += \
242 uninstalled_test_extra_programs += \
243 gdbus-example-unix-fd-client \
246 test_programs += mimeapps
247 clean-local: clean-mimeapps
249 rm -rf xdgdatadir xdgdatahome
251 uninstalled_test_programs += gsettings gschema-compile
252 gsettings_DEPENDENCIES = test.mo
253 CLEANFILES += test.mo de/LC_MESSAGES/test.mo
254 gsettings_CFLAGS = $(AM_CFLAGS) -DSRCDIR=\"$(abs_srcdir)\"
256 $(AM_V_GEN) $(MSGFMT) -o test.mo $(srcdir)/de.po; \
257 $(MKDIR_P) de/LC_MESSAGES; \
258 cp -f test.mo de/LC_MESSAGES
260 dist_uninstalled_test_data += \
261 org.gtk.test.gschema.xml \
262 org.gtk.schemasourcecheck.gschema.xml \
265 # Generated while running the testcase itself...
267 org.gtk.test.enums.xml \
270 schema-source/gschemas.compiled
272 test_programs += gdbus-connection-flush
273 gdbus_connection_flush_SOURCES = \
274 gdbus-connection-flush.c \
280 test_programs += gdbus-non-socket
281 gdbus_non_socket_SOURCES = \
290 # These three are manual-run tests because they need a session bus but don't bring one up themselves
291 uninstalled_test_extra_programs += gdbus-example-objectmanager-client
292 gdbus_example_objectmanager_client_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
294 uninstalled_test_extra_programs += gdbus-example-objectmanager-server
295 gdbus_example_objectmanager_server_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
297 uninstalled_test_extra_programs += gdbus-test-fixture
298 gdbus_test_fixture_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
300 # This is peer to peer so it doesn't need a session bus (so we can run it normally)
301 test_programs += gdbus-peer
302 gdbus_peer_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
304 # This test is currently unreliable
305 test_extra_programs += gdbus-overflow
307 # -----------------------------------------------------------------------------
308 # Test programs that need to bring up a session bus (requires dbus-daemon)
311 gdbus_sessionbus_sources = gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
319 gdbus-close-pending \
321 gdbus-connection-loss \
322 gdbus-connection-slow \
324 gdbus-exit-on-close \
326 gdbus-introspection \
329 gdbus-proxy-threads \
330 gdbus-proxy-well-known-name \
336 gdbus_proxy_threads_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
337 actions_SOURCES = $(gdbus_sessionbus_sources) actions.c
338 dbus_appinfo_SOURCES = $(gdbus_sessionbus_sources) dbus-appinfo.c
339 gapplication_SOURCES = $(gdbus_sessionbus_sources) gapplication.c
340 gdbus_auth_SOURCES = $(gdbus_sessionbus_sources) gdbus-auth.c
341 gdbus_bz627724_SOURCES = $(gdbus_sessionbus_sources) gdbus-bz627724.c
342 gdbus_close_pending_SOURCES = $(gdbus_sessionbus_sources) gdbus-close-pending.c
343 gdbus_connection_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection.c
344 gdbus_connection_loss_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-loss.c
345 gdbus_connection_slow_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-slow.c
346 gdbus_error_SOURCES = $(gdbus_sessionbus_sources) gdbus-error.c
347 gdbus_exit_on_close_SOURCES = $(gdbus_sessionbus_sources) gdbus-exit-on-close.c
348 gdbus_export_SOURCES = $(gdbus_sessionbus_sources) gdbus-export.c
349 gdbus_introspection_SOURCES = $(gdbus_sessionbus_sources) gdbus-introspection.c
350 gdbus_names_SOURCES = $(gdbus_sessionbus_sources) gdbus-names.c
351 gdbus_proxy_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy.c
352 gdbus_proxy_threads_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-threads.c
353 gdbus_proxy_well_known_name_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-well-known-name.c
354 gdbus_test_codegen_SOURCES = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
355 gdbus_threading_SOURCES = $(gdbus_sessionbus_sources) gdbus-threading.c
356 gmenumodel_SOURCES = $(gdbus_sessionbus_sources) gmenumodel.c
357 nodist_gdbus_test_codegen_SOURCES = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
359 gdbus-test-codegen.o: gdbus-test-codegen-generated.h
360 gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
361 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
362 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
363 $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
364 --interface-prefix org.project. \
365 --generate-c-code gdbus-test-codegen-generated \
366 --c-generate-object-manager \
367 --c-namespace Foo_iGen \
368 --generate-docbook gdbus-test-codegen-generated-doc \
369 --annotate "org.project.Bar" Key1 Value1 \
370 --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
371 --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \
372 --annotate "org.project.Bar::TestSignal" Key4 Value4 \
373 --annotate "org.project.Bar:ay" Key5 Value5 \
374 --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \
375 --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \
376 --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
377 $(srcdir)/test-codegen.xml \
380 EXTRA_DIST += test-codegen.xml
381 CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml
383 endif # HAVE_DBUS_DAEMON
385 # -----------------------------------------------------------------------------
388 test_programs += win32-streams
392 no_undefined = -no-undefined
396 test_programs += gdbus-serialization
397 gdbus_serialization_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
398 gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
399 gdbus_serialization_SOURCES = \
400 gdbus-serialization.c \
405 # -----------------------------------------------------------------------------
406 # The resources test is a bit more complicated...
408 test_programs += resources
409 resources_SOURCES = resources.c
410 nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
411 resources_DEPENDENCIES = test.gresource
413 test_ltlibraries += libresourceplugin.la
414 libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
415 libresourceplugin_la_LDFLAGS = -avoid-version -module -export-dynamic $(no_undefined)
416 libresourceplugin_la_LIBADD = $(LDADD)
418 # libtool contains a bug whereby the created .la file doesn't contain the correct dlname='' in the case that
419 # you're building a library but not installing it. This is apparently because the only considered use for an
420 # uninstalled library is as a convenience library for linking (despite the fact that we give -module). The lack
421 # of dlname='' in the .la trips up libltdl and GModule as well. We can trick libtool into believing that we
422 # will install the module by giving it a bogus -rpath for the uninstalled cases.
424 # See http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html
425 if !ENABLE_INSTALLED_TESTS
426 libresourceplugin_la_LDFLAGS += -rpath /
430 glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
432 glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
435 resources.o: test_resources2.h
436 test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
437 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $<
439 test_resources2.h test_resources2.c: test3.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test3.gresource.xml)
440 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate --c-name _g_test2 --manual-register $<
442 plugin_resources.c: test4.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test4.gresource.xml)
443 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $<
445 test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test.gresource.xml)
446 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $<
448 EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
450 CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource