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 \
66 uninstalled_test_programs = \
78 uninstalled_test_extra_programs = \
82 gapplication-example-actions \
83 gapplication-example-cmdline \
84 gapplication-example-cmdline2 \
85 gapplication-example-cmdline3 \
86 gapplication-example-dbushooks \
87 gapplication-example-open \
88 gdbus-example-export \
89 gdbus-example-own-name \
91 gdbus-example-proxy-subclass \
92 gdbus-example-server \
93 gdbus-example-subtree \
94 gdbus-example-watch-name \
95 gdbus-example-watch-proxy \
96 gsubprocess-testprog \
104 test_extra_programs = \
105 gdbus-connection-flush-helper \
109 dist_uninstalled_test_data += $(addprefix schema-tests/,$(schema_tests))
111 array-default-not-in-choices.gschema.xml \
112 bad-choice.gschema.xml \
113 bad-key.gschema.xml \
114 bad-key2.gschema.xml \
115 bad-key3.gschema.xml \
116 bad-key4.gschema.xml \
117 bad-type.gschema.xml \
118 bare-alias.gschema.xml \
119 choice-alias.gschema.xml \
120 choice-bad.gschema.xml \
121 choice-badtype.gschema.xml \
122 choice-invalid-alias.gschema.xml \
123 choice-missing-value.gschema.xml \
124 choice-shadowed-alias.gschema.xml \
125 choice-upside-down.gschema.xml \
127 choices-wrong-type.gschema.xml \
128 default-in-aliases.gschema.xml \
129 default-not-in-choices.gschema.xml \
130 default-out-of-range.gschema.xml \
131 empty-key.gschema.xml \
132 enum-with-aliases.gschema.xml \
133 enum-with-bad-default.gschema.xml \
134 enum-with-chained-alias.gschema.xml \
135 enum-with-choice.gschema.xml \
136 enum-with-invalid-alias.gschema.xml \
137 enum-with-repeated-alias.gschema.xml \
138 enum-with-repeated-nick.gschema.xml \
139 enum-with-repeated-value.gschema.xml \
140 enum-with-shadow-alias.gschema.xml \
142 extend-and-shadow-indirect.gschema.xml \
143 extend-and-shadow.gschema.xml \
144 extend-missing.gschema.xml \
145 extend-nonlist.gschema.xml \
146 extend-self.gschema.xml \
147 extend-wrong-list-indirect.gschema.xml \
148 extend-wrong-list.gschema.xml \
149 extending.gschema.xml \
150 flags-aliased-default.gschema.xml \
151 flags-bad-default.gschema.xml \
152 flags-more-than-one-bit.gschema.xml \
153 flags-with-enum-attr.gschema.xml \
154 flags-with-enum-tag.gschema.xml \
155 from-docs.gschema.xml \
156 incomplete-list.gschema.xml \
157 inherit-gettext-domain.gschema.xml \
158 invalid-path.gschema.xml \
159 key-in-list-indirect.gschema.xml \
160 key-in-list.gschema.xml \
161 list-of-missing.gschema.xml \
162 missing-quotes.gschema.xml \
163 no-default.gschema.xml \
164 overflow.gschema.xml \
165 override-missing.gschema.xml \
166 override-range-error.gschema.xml \
167 override-then-key.gschema.xml \
168 override-twice.gschema.xml \
169 override-type-error.gschema.xml \
170 override.gschema.xml \
171 range-badtype.gschema.xml \
172 range-default-high.gschema.xml \
173 range-default-low.gschema.xml \
174 range-high-default.gschema.xml \
175 range-low-default.gschema.xml \
176 range-missing-max.gschema.xml \
177 range-missing-min.gschema.xml \
178 range-parse-error.gschema.xml \
179 range-wrong-type.gschema.xml \
181 wrong-category.gschema.xml \
184 test_programs += thumbnail-verification
185 dist_test_data += $(thumbnail_data_files)
186 thumbnail_data_files = $(addprefix thumbnails/,$(thumbnail_tests))
190 header-and-chunk-size.png \
192 huge-chunk-size.png \
201 test_programs += tls-certificate
202 tls_certificate_SOURCES = \
206 dist_test_data += $(cert_data_files)
207 cert_data_files = $(addprefix cert-tests/,$(cert_tests))
220 uninstalled_test_extra_programs += socket-client
221 socket_client_SOURCES = \
223 gtlsconsoleinteraction.c \
224 gtlsconsoleinteraction.h
225 EXTRA_DIST += socket-common.c
227 uninstalled_test_extra_programs += gdbus-daemon
228 nodist_gdbus_daemon_SOURCES = \
229 $(top_builddir)/gio/gdbus-daemon-generated.c
230 gdbus_daemon_SOURCES = \
232 $(top_srcdir)/gio/gdbusdaemon.c
234 # -----------------------------------------------------------------------------
235 # Test programs buildable on UNIX only
241 gdbus-peer-object-manager \
248 test_extra_programs += \
252 # Uninstalled because of the check-for-executable logic in DesktopAppInfo unable to find the installed executable
253 uninstalled_test_programs += \
258 home_desktop_files = \
259 epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop \
262 usr_desktop_files = \
265 dconf-editor.desktop \
267 evince-previewer.desktop \
269 file-roller.desktop \
270 gcr-prompter.desktop \
274 gnome-clocks.desktop \
275 gnome-contacts.desktop \
276 gnome-font-viewer.desktop \
277 gnome-music.desktop \
278 gnome-terminal.desktop \
280 kde4/dolphin.desktop \
282 kde4/konqbrowser.desktop \
283 kde4/okular.desktop \
285 nautilus-autorun-software.desktop \
286 nautilus-classic.desktop \
287 nautilus-connect-server.desktop \
293 $(addprefix desktop-files/usr/applications/,$(usr_desktop_files)) \
294 $(addprefix desktop-files/home/applications/,$(home_desktop_files))
297 appinfo-test-actions.desktop \
298 appinfo-test-gnome.desktop \
299 appinfo-test-notgnome.desktop \
300 appinfo-test.desktop \
301 appinfo-test2.desktop \
303 org.gtk.test.dbusappinfo.desktop \
304 x-content/image-dcf/DCIM/Camera/20130831_203925.jpg \
305 x-content/image-dcf/DCIM/Camera/20130831_203928.jpg \
306 x-content/unix-software/autorun.sh \
307 x-content/win32-software/autorun.exe \
310 test_extra_programs += \
315 uninstalled_test_extra_programs += \
316 gdbus-example-unix-fd-client \
319 test_programs += mimeapps
320 clean-local: clean-mimeapps
322 rm -rf xdgdatadir xdgdatahome
324 uninstalled_test_programs += gsettings gschema-compile
325 gsettings_DEPENDENCIES = test.mo
326 CLEANFILES += test.mo de/LC_MESSAGES/test.mo keyfile/gsettings.store
327 gsettings_CFLAGS = $(AM_CFLAGS) -DSRCDIR=\"$(abs_srcdir)\"
329 $(AM_V_GEN) $(MSGFMT) -o test.mo $(srcdir)/de.po; \
330 $(MKDIR_P) de/LC_MESSAGES; \
331 cp -f test.mo de/LC_MESSAGES
333 dist_uninstalled_test_data += \
334 org.gtk.test.gschema.xml.orig \
335 org.gtk.schemasourcecheck.gschema.xml \
338 # Generated while running the testcase itself...
340 org.gtk.test.gschema.xml \
341 org.gtk.test.enums.xml \
344 schema-source/gschemas.compiled
346 test_programs += gdbus-connection-flush
347 gdbus_connection_flush_SOURCES = \
348 gdbus-connection-flush.c \
354 test_programs += gdbus-non-socket
355 gdbus_non_socket_SOURCES = \
364 # These three are manual-run tests because they need a session bus but don't bring one up themselves
365 uninstalled_test_extra_programs += gdbus-example-objectmanager-client
366 gdbus_example_objectmanager_client_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
368 test_extra_programs += gsubprocess-testprog
370 uninstalled_test_extra_programs += gdbus-test-fixture
371 gdbus_test_fixture_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
373 # This is peer to peer so it doesn't need a session bus (so we can run it normally)
374 test_programs += gdbus-peer
375 gdbus_peer_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
377 # This test is currently unreliable
378 test_extra_programs += gdbus-overflow
380 # -----------------------------------------------------------------------------
381 # Test programs that need to bring up a session bus (requires dbus-daemon)
384 gdbus_sessionbus_sources = gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
392 gdbus-close-pending \
394 gdbus-connection-loss \
395 gdbus-connection-slow \
397 gdbus-exit-on-close \
399 gdbus-introspection \
402 gdbus-proxy-threads \
403 gdbus-proxy-well-known-name \
405 gdbus-test-codegen-old \
411 gdbus_proxy_threads_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
412 actions_SOURCES = $(gdbus_sessionbus_sources) actions.c
413 dbus_appinfo_SOURCES = $(gdbus_sessionbus_sources) dbus-appinfo.c
414 gapplication_SOURCES = $(gdbus_sessionbus_sources) gapplication.c
415 gdbus_auth_SOURCES = $(gdbus_sessionbus_sources) gdbus-auth.c
416 gdbus_bz627724_SOURCES = $(gdbus_sessionbus_sources) gdbus-bz627724.c
417 gdbus_close_pending_SOURCES = $(gdbus_sessionbus_sources) gdbus-close-pending.c
418 gdbus_connection_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection.c
419 gdbus_connection_loss_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-loss.c
420 gdbus_connection_slow_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-slow.c
421 gdbus_error_SOURCES = $(gdbus_sessionbus_sources) gdbus-error.c
422 gdbus_exit_on_close_SOURCES = $(gdbus_sessionbus_sources) gdbus-exit-on-close.c
423 gdbus_export_SOURCES = $(gdbus_sessionbus_sources) gdbus-export.c
424 gdbus_introspection_SOURCES = $(gdbus_sessionbus_sources) gdbus-introspection.c
425 gdbus_names_SOURCES = $(gdbus_sessionbus_sources) gdbus-names.c
426 gdbus_proxy_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy.c
427 gdbus_proxy_threads_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-threads.c
428 gdbus_proxy_well_known_name_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-well-known-name.c
429 gdbus_test_codegen_SOURCES = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
430 nodist_gdbus_test_codegen_SOURCES = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
431 gdbus_test_codegen_old_SOURCES = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
432 nodist_gdbus_test_codegen_old_SOURCES = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
433 gdbus_test_codegen_old_CPPFLAGS = $(AM_CPPFLAGS) -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36
434 gdbus_threading_SOURCES = $(gdbus_sessionbus_sources) gdbus-threading.c
435 gmenumodel_SOURCES = $(gdbus_sessionbus_sources) gmenumodel.c
436 gnotification_SOURCES = $(gdbus_sessionbus_sources) gnotification.c gnotification-server.h gnotification-server.c
438 gdbus-test-codegen.o: gdbus-test-codegen-generated.h
439 gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
440 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
441 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
442 $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
443 --interface-prefix org.project. \
444 --generate-c-code gdbus-test-codegen-generated \
445 --c-generate-object-manager \
446 --c-namespace Foo_iGen \
447 --generate-docbook gdbus-test-codegen-generated-doc \
448 --annotate "org.project.Bar" Key1 Value1 \
449 --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
450 --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \
451 --annotate "org.project.Bar::TestSignal" Key4 Value4 \
452 --annotate "org.project.Bar:ay" Key5 Value5 \
453 --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \
454 --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \
455 --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
456 $(srcdir)/test-codegen.xml \
459 EXTRA_DIST += test-codegen.xml
460 CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml
462 endif # HAVE_DBUS_DAEMON
464 tls_interaction_SOURCES = tls-interaction.c gtesttlsbackend.c gtesttlsbackend.h
466 # -----------------------------------------------------------------------------
469 test_programs += win32-streams
473 no_undefined = -no-undefined
477 test_programs += gdbus-serialization
478 gdbus_serialization_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
479 gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
480 gdbus_serialization_SOURCES = \
481 gdbus-serialization.c \
486 # -----------------------------------------------------------------------------
487 # The resources test is a bit more complicated...
489 test_programs += resources
490 resources_SOURCES = resources.c
491 nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
492 resources_DEPENDENCIES = test.gresource
494 test_ltlibraries += libresourceplugin.la
495 libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
496 libresourceplugin_la_LDFLAGS = -avoid-version -module -export-dynamic $(no_undefined)
497 libresourceplugin_la_LIBADD = $(LDADD)
499 # libtool contains a bug whereby the created .la file doesn't contain the correct dlname='' in the case that
500 # you're building a library but not installing it. This is apparently because the only considered use for an
501 # uninstalled library is as a convenience library for linking (despite the fact that we give -module). The lack
502 # of dlname='' in the .la trips up libltdl and GModule as well. We can trick libtool into believing that we
503 # will install the module by giving it a bogus -rpath for the uninstalled cases.
505 # See http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html
506 if !ENABLE_INSTALLED_TESTS
507 libresourceplugin_la_LDFLAGS += -rpath /
511 glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
513 glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
516 resources.o: test_resources2.h
517 test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
518 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $<
520 test_resources2.h test_resources2.c: test3.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test3.gresource.xml)
521 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate --c-name _g_test2 --manual-register $<
523 plugin_resources.c: test4.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test4.gresource.xml)
524 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $<
526 test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test.gresource.xml)
527 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $<
529 EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
531 CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
533 BUILT_SOURCES += giotypefuncs.c
535 giotypefuncs.c: Makefile
536 $(AM_V_GEN) echo '#include <gio/gio.h>' > xgen-giosrc.c && \
537 echo "G_GNUC_BEGIN_IGNORE_DEPRECATIONS" > xgen-gio && \
538 ${CPP} $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-giosrc.c | \
539 $(GREP) -o '\bg_.*_get_type\b' | \
540 $(GREP) -v 'g_io_extension_get_type\|g_variant_get_type' | \
542 $(SED) -e 's/^/*tp++ = /' -e 's/$$/ ();/' >> xgen-gio && \
543 cp xgen-gio $@ # && rm -f xgen-gio xgen-giosrc.c
545 CLEANFILES += xgen-giosrc.c xgen-gio giotypefuncs.c
547 if ENABLE_INSTALLED_TESTS
549 $(AM_V_at) chmod a+x $(DESTDIR)$(installed_testdir)/x-content/win32-software/autorun.exe