1 include $(top_srcdir)/glib-tap.mk
3 dist_uninstalled_test_data =
6 SUBDIRS = gdbus-object-manager-example services modules
9 $(top_builddir)/gio/libgio-2.0.la \
10 $(top_builddir)/gobject/libgobject-2.0.la \
11 $(top_builddir)/gmodule/libgmodule-2.0.la \
12 $(top_builddir)/glib/libglib-2.0.la \
15 AM_CPPFLAGS = $(gio_INCLUDES) $(GLIB_DEBUG_FLAGS) -I$(top_builddir)/gio -I$(top_srcdir)/gio
16 DEFS = -DG_LOG_DOMAIN=\"GLib-GIO\" -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\"
17 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
19 # -----------------------------------------------------------------------------
20 # Test programs buildable on all platforms
24 async-close-output-stream \
25 async-splice-output-stream \
26 buffered-input-stream \
27 buffered-output-stream \
35 fileattributematcher \
47 memory-output-stream \
67 uninstalled_test_programs = \
79 uninstalled_test_extra_programs = \
83 gapplication-example-actions \
84 gapplication-example-cmdline \
85 gapplication-example-cmdline2 \
86 gapplication-example-cmdline3 \
87 gapplication-example-dbushooks \
88 gapplication-example-open \
89 gdbus-example-export \
90 gdbus-example-own-name \
92 gdbus-example-proxy-subclass \
93 gdbus-example-server \
94 gdbus-example-subtree \
95 gdbus-example-watch-name \
96 gdbus-example-watch-proxy \
97 gsubprocess-testprog \
105 test_extra_programs = \
106 gdbus-connection-flush-helper \
110 dist_uninstalled_test_data += $(addprefix schema-tests/,$(schema_tests))
112 array-default-not-in-choices.gschema.xml \
113 bad-choice.gschema.xml \
114 bad-key.gschema.xml \
115 bad-key2.gschema.xml \
116 bad-key3.gschema.xml \
117 bad-key4.gschema.xml \
118 bad-type.gschema.xml \
119 bare-alias.gschema.xml \
120 choice-alias.gschema.xml \
121 choice-bad.gschema.xml \
122 choice-badtype.gschema.xml \
123 choice-invalid-alias.gschema.xml \
124 choice-missing-value.gschema.xml \
125 choice-shadowed-alias.gschema.xml \
126 choice-upside-down.gschema.xml \
128 choices-wrong-type.gschema.xml \
129 default-in-aliases.gschema.xml \
130 default-not-in-choices.gschema.xml \
131 default-out-of-range.gschema.xml \
132 empty-key.gschema.xml \
133 enum-with-aliases.gschema.xml \
134 enum-with-bad-default.gschema.xml \
135 enum-with-chained-alias.gschema.xml \
136 enum-with-choice.gschema.xml \
137 enum-with-invalid-alias.gschema.xml \
138 enum-with-repeated-alias.gschema.xml \
139 enum-with-repeated-nick.gschema.xml \
140 enum-with-repeated-value.gschema.xml \
141 enum-with-shadow-alias.gschema.xml \
143 extend-and-shadow-indirect.gschema.xml \
144 extend-and-shadow.gschema.xml \
145 extend-missing.gschema.xml \
146 extend-nonlist.gschema.xml \
147 extend-self.gschema.xml \
148 extend-wrong-list-indirect.gschema.xml \
149 extend-wrong-list.gschema.xml \
150 extending.gschema.xml \
151 flags-aliased-default.gschema.xml \
152 flags-bad-default.gschema.xml \
153 flags-more-than-one-bit.gschema.xml \
154 flags-with-enum-attr.gschema.xml \
155 flags-with-enum-tag.gschema.xml \
156 from-docs.gschema.xml \
157 incomplete-list.gschema.xml \
158 inherit-gettext-domain.gschema.xml \
159 invalid-path.gschema.xml \
160 key-in-list-indirect.gschema.xml \
161 key-in-list.gschema.xml \
162 list-of-missing.gschema.xml \
163 missing-quotes.gschema.xml \
164 no-default.gschema.xml \
165 overflow.gschema.xml \
166 override-missing.gschema.xml \
167 override-range-error.gschema.xml \
168 override-then-key.gschema.xml \
169 override-twice.gschema.xml \
170 override-type-error.gschema.xml \
171 override.gschema.xml \
172 range-badtype.gschema.xml \
173 range-default-high.gschema.xml \
174 range-default-low.gschema.xml \
175 range-high-default.gschema.xml \
176 range-low-default.gschema.xml \
177 range-missing-max.gschema.xml \
178 range-missing-min.gschema.xml \
179 range-parse-error.gschema.xml \
180 range-wrong-type.gschema.xml \
182 wrong-category.gschema.xml \
185 test_programs += thumbnail-verification
186 dist_test_data += $(thumbnail_data_files)
187 thumbnail_data_files = $(addprefix thumbnails/,$(thumbnail_tests))
191 header-and-chunk-size.png \
193 huge-chunk-size.png \
202 test_programs += tls-certificate
203 tls_certificate_SOURCES = \
207 dist_test_data += $(cert_data_files)
208 cert_data_files = $(addprefix cert-tests/,$(cert_tests))
221 uninstalled_test_extra_programs += socket-client
222 socket_client_SOURCES = \
224 gtlsconsoleinteraction.c \
225 gtlsconsoleinteraction.h
226 EXTRA_DIST += socket-common.c
228 uninstalled_test_extra_programs += gdbus-daemon
229 nodist_gdbus_daemon_SOURCES = \
230 $(top_builddir)/gio/gdbus-daemon-generated.c
231 gdbus_daemon_SOURCES = \
233 $(top_srcdir)/gio/gdbusdaemon.c
235 # -----------------------------------------------------------------------------
236 # Test programs buildable on UNIX only
242 gdbus-peer-object-manager \
250 test_extra_programs += \
254 # Uninstalled because of the check-for-executable logic in DesktopAppInfo unable to find the installed executable
255 uninstalled_test_programs += \
260 home_desktop_files = \
261 epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop \
264 usr_desktop_files = \
267 dconf-editor.desktop \
269 evince-previewer.desktop \
271 file-roller.desktop \
272 gcr-prompter.desktop \
276 gnome-clocks.desktop \
277 gnome-contacts.desktop \
278 gnome-font-viewer.desktop \
279 gnome-music.desktop \
280 gnome-terminal.desktop \
282 kde4/dolphin.desktop \
284 kde4/konqbrowser.desktop \
285 kde4/okular.desktop \
287 nautilus-autorun-software.desktop \
288 nautilus-classic.desktop \
289 nautilus-connect-server.desktop \
295 $(addprefix desktop-files/usr/applications/,$(usr_desktop_files)) \
296 $(addprefix desktop-files/home/applications/,$(home_desktop_files))
299 appinfo-test-actions.desktop \
300 appinfo-test-gnome.desktop \
301 appinfo-test-notgnome.desktop \
302 appinfo-test.desktop \
303 appinfo-test2.desktop \
305 org.gtk.test.dbusappinfo.desktop \
306 x-content/image-dcf/DCIM/Camera/20130831_203925.jpg \
307 x-content/image-dcf/DCIM/Camera/20130831_203928.jpg \
308 x-content/unix-software/autorun.sh \
309 x-content/win32-software/autorun.exe \
312 test_extra_programs += \
317 uninstalled_test_extra_programs += \
318 gdbus-example-unix-fd-client \
321 test_programs += mimeapps
322 clean-local: clean-mimeapps
324 rm -rf xdgdatadir xdgdatahome xdgconfighome
326 uninstalled_test_programs += gsettings gschema-compile
327 gsettings_DEPENDENCIES = test.mo
328 CLEANFILES += test.mo de/LC_MESSAGES/test.mo keyfile/gsettings.store
329 gsettings_CFLAGS = $(AM_CFLAGS) -DSRCDIR=\"$(abs_srcdir)\"
331 $(AM_V_GEN) $(MSGFMT) -o test.mo $(srcdir)/de.po; \
332 $(MKDIR_P) de/LC_MESSAGES; \
333 cp -f test.mo de/LC_MESSAGES
335 dist_uninstalled_test_data += \
336 org.gtk.test.gschema.xml.orig \
337 org.gtk.schemasourcecheck.gschema.xml \
340 # Generated while running the testcase itself...
342 org.gtk.test.gschema.xml \
343 org.gtk.test.enums.xml \
346 schema-source/gschemas.compiled
348 test_programs += gdbus-connection-flush
349 gdbus_connection_flush_SOURCES = \
350 gdbus-connection-flush.c \
356 test_programs += gdbus-non-socket
357 gdbus_non_socket_SOURCES = \
366 # These three are manual-run tests because they need a session bus but don't bring one up themselves
367 uninstalled_test_extra_programs += gdbus-example-objectmanager-client
368 gdbus_example_objectmanager_client_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
370 test_extra_programs += gsubprocess-testprog
372 uninstalled_test_extra_programs += gdbus-test-fixture
373 gdbus_test_fixture_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
375 # This is peer to peer so it doesn't need a session bus (so we can run it normally)
376 test_programs += gdbus-peer
377 gdbus_peer_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
379 # This test is currently unreliable
380 test_extra_programs += gdbus-overflow
382 # -----------------------------------------------------------------------------
383 # Test programs that need to bring up a session bus (requires dbus-daemon)
386 gdbus_sessionbus_sources = gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
394 gdbus-close-pending \
396 gdbus-connection-loss \
397 gdbus-connection-slow \
399 gdbus-exit-on-close \
401 gdbus-introspection \
404 gdbus-proxy-threads \
405 gdbus-proxy-well-known-name \
407 gdbus-test-codegen-old \
413 gdbus_proxy_threads_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
414 actions_SOURCES = $(gdbus_sessionbus_sources) actions.c
415 dbus_appinfo_SOURCES = $(gdbus_sessionbus_sources) dbus-appinfo.c
416 gapplication_SOURCES = $(gdbus_sessionbus_sources) gapplication.c
417 gdbus_auth_SOURCES = $(gdbus_sessionbus_sources) gdbus-auth.c
418 gdbus_bz627724_SOURCES = $(gdbus_sessionbus_sources) gdbus-bz627724.c
419 gdbus_close_pending_SOURCES = $(gdbus_sessionbus_sources) gdbus-close-pending.c
420 gdbus_connection_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection.c
421 gdbus_connection_loss_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-loss.c
422 gdbus_connection_slow_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-slow.c
423 gdbus_error_SOURCES = $(gdbus_sessionbus_sources) gdbus-error.c
424 gdbus_exit_on_close_SOURCES = $(gdbus_sessionbus_sources) gdbus-exit-on-close.c
425 gdbus_export_SOURCES = $(gdbus_sessionbus_sources) gdbus-export.c
426 gdbus_introspection_SOURCES = $(gdbus_sessionbus_sources) gdbus-introspection.c
427 gdbus_names_SOURCES = $(gdbus_sessionbus_sources) gdbus-names.c
428 gdbus_proxy_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy.c
429 gdbus_proxy_threads_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-threads.c
430 gdbus_proxy_well_known_name_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-well-known-name.c
431 gdbus_test_codegen_SOURCES = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
432 nodist_gdbus_test_codegen_SOURCES = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
433 gdbus_test_codegen_old_SOURCES = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
434 nodist_gdbus_test_codegen_old_SOURCES = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
435 gdbus_test_codegen_old_CPPFLAGS = $(AM_CPPFLAGS) -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36
436 gdbus_threading_SOURCES = $(gdbus_sessionbus_sources) gdbus-threading.c
437 gmenumodel_SOURCES = $(gdbus_sessionbus_sources) gmenumodel.c
438 gnotification_SOURCES = $(gdbus_sessionbus_sources) gnotification.c gnotification-server.h gnotification-server.c
440 BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
441 gdbus-test-codegen.o: gdbus-test-codegen-generated.h
442 gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
443 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
444 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
445 $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
446 --interface-prefix org.project. \
447 --generate-c-code gdbus-test-codegen-generated \
448 --c-generate-object-manager \
449 --c-namespace Foo_iGen \
450 --generate-docbook gdbus-test-codegen-generated-doc \
451 --annotate "org.project.Bar" Key1 Value1 \
452 --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
453 --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \
454 --annotate "org.project.Bar::TestSignal" Key4 Value4 \
455 --annotate "org.project.Bar:ay" Key5 Value5 \
456 --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \
457 --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \
458 --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
459 $(srcdir)/test-codegen.xml \
461 gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h
462 @: # Generated as side-effect of .h
464 EXTRA_DIST += test-codegen.xml
465 CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml
467 endif # HAVE_DBUS_DAEMON
469 tls_interaction_SOURCES = tls-interaction.c gtesttlsbackend.c gtesttlsbackend.h
471 # -----------------------------------------------------------------------------
474 test_programs += win32-streams
478 no_undefined = -no-undefined
482 test_programs += gdbus-serialization
483 gdbus_serialization_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
484 gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
485 gdbus_serialization_SOURCES = \
486 gdbus-serialization.c \
491 # -----------------------------------------------------------------------------
492 # The resources test is a bit more complicated...
494 test_programs += resources
495 resources_SOURCES = resources.c
496 nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
497 resources_DEPENDENCIES = test.gresource
499 test_ltlibraries += libresourceplugin.la
500 libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
501 libresourceplugin_la_LDFLAGS = -avoid-version -module -export-dynamic $(no_undefined)
502 libresourceplugin_la_LIBADD = $(LDADD)
504 # libtool contains a bug whereby the created .la file doesn't contain the correct dlname='' in the case that
505 # you're building a library but not installing it. This is apparently because the only considered use for an
506 # uninstalled library is as a convenience library for linking (despite the fact that we give -module). The lack
507 # of dlname='' in the .la trips up libltdl and GModule as well. We can trick libtool into believing that we
508 # will install the module by giving it a bogus -rpath for the uninstalled cases.
510 # See http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html
511 if !ENABLE_INSTALLED_TESTS
512 libresourceplugin_la_LDFLAGS += -rpath /
516 glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
518 glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
521 resources.o: test_resources2.h
522 test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
523 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $<
525 test_resources2.h test_resources2.c: test3.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test3.gresource.xml)
526 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate --c-name _g_test2 --manual-register $<
528 plugin_resources.c: test4.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test4.gresource.xml)
529 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $<
531 test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test.gresource.xml)
532 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $<
534 EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
536 CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
538 BUILT_SOURCES += giotypefuncs.c
540 giotypefuncs.c: Makefile
541 $(AM_V_GEN) echo '#include <gio/gio.h>' > xgen-giosrc.c && \
542 echo "G_GNUC_BEGIN_IGNORE_DEPRECATIONS" > xgen-gio && \
543 ${CPP} $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-giosrc.c | \
544 $(GREP) -o '\bg_.*_get_type\b' | \
545 $(GREP) -v 'g_io_extension_get_type\|g_variant_get_type' | \
547 $(SED) -e 's/^/*tp++ = /' -e 's/$$/ ();/' >> xgen-gio && \
548 cp xgen-gio $@ # && rm -f xgen-gio xgen-giosrc.c
550 CLEANFILES += xgen-giosrc.c xgen-gio giotypefuncs.c
552 if ENABLE_INSTALLED_TESTS
554 $(AM_V_at) chmod a+x $(DESTDIR)$(installed_testdir)/x-content/win32-software/autorun.exe