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 \
68 uninstalled_test_programs = \
80 uninstalled_test_extra_programs = \
84 gapplication-example-actions \
85 gapplication-example-cmdline \
86 gapplication-example-cmdline2 \
87 gapplication-example-cmdline3 \
88 gapplication-example-dbushooks \
89 gapplication-example-open \
90 gdbus-example-export \
91 gdbus-example-own-name \
93 gdbus-example-proxy-subclass \
94 gdbus-example-server \
95 gdbus-example-subtree \
96 gdbus-example-watch-name \
97 gdbus-example-watch-proxy \
98 gsubprocess-testprog \
106 test_extra_programs = \
107 gdbus-connection-flush-helper \
111 dist_uninstalled_test_data += $(addprefix schema-tests/,$(schema_tests))
113 array-default-not-in-choices.gschema.xml \
114 bad-choice.gschema.xml \
115 bad-key.gschema.xml \
116 bad-key2.gschema.xml \
117 bad-key3.gschema.xml \
118 bad-key4.gschema.xml \
119 bad-type.gschema.xml \
120 bare-alias.gschema.xml \
121 choice-alias.gschema.xml \
122 choice-bad.gschema.xml \
123 choice-badtype.gschema.xml \
124 choice-invalid-alias.gschema.xml \
125 choice-missing-value.gschema.xml \
126 choice-shadowed-alias.gschema.xml \
127 choice-upside-down.gschema.xml \
129 choices-wrong-type.gschema.xml \
130 default-in-aliases.gschema.xml \
131 default-not-in-choices.gschema.xml \
132 default-out-of-range.gschema.xml \
133 empty-key.gschema.xml \
134 enum-with-aliases.gschema.xml \
135 enum-with-bad-default.gschema.xml \
136 enum-with-chained-alias.gschema.xml \
137 enum-with-choice.gschema.xml \
138 enum-with-invalid-alias.gschema.xml \
139 enum-with-repeated-alias.gschema.xml \
140 enum-with-repeated-nick.gschema.xml \
141 enum-with-repeated-value.gschema.xml \
142 enum-with-shadow-alias.gschema.xml \
144 extend-and-shadow-indirect.gschema.xml \
145 extend-and-shadow.gschema.xml \
146 extend-missing.gschema.xml \
147 extend-nonlist.gschema.xml \
148 extend-self.gschema.xml \
149 extend-wrong-list-indirect.gschema.xml \
150 extend-wrong-list.gschema.xml \
151 extending.gschema.xml \
152 flags-aliased-default.gschema.xml \
153 flags-bad-default.gschema.xml \
154 flags-more-than-one-bit.gschema.xml \
155 flags-with-enum-attr.gschema.xml \
156 flags-with-enum-tag.gschema.xml \
157 from-docs.gschema.xml \
158 incomplete-list.gschema.xml \
159 inherit-gettext-domain.gschema.xml \
160 invalid-path.gschema.xml \
161 key-in-list-indirect.gschema.xml \
162 key-in-list.gschema.xml \
163 list-of-missing.gschema.xml \
164 missing-quotes.gschema.xml \
165 no-default.gschema.xml \
166 overflow.gschema.xml \
167 override-missing.gschema.xml \
168 override-range-error.gschema.xml \
169 override-then-key.gschema.xml \
170 override-twice.gschema.xml \
171 override-type-error.gschema.xml \
172 override.gschema.xml \
173 range-badtype.gschema.xml \
174 range-default-high.gschema.xml \
175 range-default-low.gschema.xml \
176 range-high-default.gschema.xml \
177 range-low-default.gschema.xml \
178 range-missing-max.gschema.xml \
179 range-missing-min.gschema.xml \
180 range-parse-error.gschema.xml \
181 range-wrong-type.gschema.xml \
183 wrong-category.gschema.xml \
186 test_programs += thumbnail-verification
187 dist_test_data += $(thumbnail_data_files)
188 thumbnail_data_files = $(addprefix thumbnails/,$(thumbnail_tests))
192 header-and-chunk-size.png \
194 huge-chunk-size.png \
203 test_programs += tls-certificate
204 tls_certificate_SOURCES = \
208 dist_test_data += $(cert_data_files)
209 cert_data_files = $(addprefix cert-tests/,$(cert_tests))
222 uninstalled_test_extra_programs += socket-client
223 socket_client_SOURCES = \
225 gtlsconsoleinteraction.c \
226 gtlsconsoleinteraction.h
227 EXTRA_DIST += socket-common.c
229 uninstalled_test_extra_programs += gdbus-daemon
230 nodist_gdbus_daemon_SOURCES = \
231 $(top_builddir)/gio/gdbus-daemon-generated.c
232 gdbus_daemon_SOURCES = \
234 $(top_srcdir)/gio/gdbusdaemon.c
236 # -----------------------------------------------------------------------------
237 # Test programs buildable on UNIX only
243 gdbus-peer-object-manager \
251 test_extra_programs += \
255 # Uninstalled because of the check-for-executable logic in DesktopAppInfo unable to find the installed executable
256 uninstalled_test_programs += \
261 home_desktop_files = \
262 epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop \
265 usr_desktop_files = \
268 dconf-editor.desktop \
270 evince-previewer.desktop \
272 file-roller.desktop \
273 gcr-prompter.desktop \
277 gnome-clocks.desktop \
278 gnome-contacts.desktop \
279 gnome-font-viewer.desktop \
280 gnome-music.desktop \
281 gnome-terminal.desktop \
283 kde4/dolphin.desktop \
285 kde4/konqbrowser.desktop \
286 kde4/okular.desktop \
288 nautilus-autorun-software.desktop \
289 nautilus-classic.desktop \
290 nautilus-connect-server.desktop \
296 $(addprefix desktop-files/usr/applications/,$(usr_desktop_files)) \
297 $(addprefix desktop-files/home/applications/,$(home_desktop_files))
300 appinfo-test-actions.desktop \
301 appinfo-test-gnome.desktop \
302 appinfo-test-notgnome.desktop \
303 appinfo-test.desktop \
304 appinfo-test2.desktop \
306 org.gtk.test.dbusappinfo.desktop \
307 x-content/image-dcf/DCIM/Camera/20130831_203925.jpg \
308 x-content/image-dcf/DCIM/Camera/20130831_203928.jpg \
309 x-content/unix-software/autorun.sh \
310 x-content/win32-software/autorun.exe \
313 test_extra_programs += \
318 uninstalled_test_extra_programs += \
319 gdbus-example-unix-fd-client \
322 test_programs += mimeapps
323 clean-local: clean-mimeapps
325 rm -rf xdgdatadir xdgdatahome xdgconfighome
327 uninstalled_test_programs += gsettings gschema-compile
328 gsettings_DEPENDENCIES = test.mo
329 CLEANFILES += test.mo de/LC_MESSAGES/test.mo keyfile/gsettings.store
330 gsettings_CFLAGS = $(AM_CFLAGS) -DSRCDIR=\"$(abs_srcdir)\"
332 $(AM_V_GEN) $(MSGFMT) -o test.mo $(srcdir)/de.po; \
333 $(MKDIR_P) de/LC_MESSAGES; \
334 cp -f test.mo de/LC_MESSAGES
336 dist_uninstalled_test_data += \
337 org.gtk.test.gschema.xml.orig \
338 org.gtk.schemasourcecheck.gschema.xml \
341 # Generated while running the testcase itself...
343 org.gtk.test.gschema.xml \
344 org.gtk.test.enums.xml \
347 schema-source/gschemas.compiled
349 test_programs += gdbus-connection-flush
350 gdbus_connection_flush_SOURCES = \
351 gdbus-connection-flush.c \
357 test_programs += gdbus-non-socket
358 gdbus_non_socket_SOURCES = \
367 # These three are manual-run tests because they need a session bus but don't bring one up themselves
368 uninstalled_test_extra_programs += gdbus-example-objectmanager-client
369 gdbus_example_objectmanager_client_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
371 test_extra_programs += gsubprocess-testprog
373 uninstalled_test_extra_programs += gdbus-test-fixture
374 gdbus_test_fixture_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
376 # This is peer to peer so it doesn't need a session bus (so we can run it normally)
377 test_programs += gdbus-peer
378 gdbus_peer_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
380 # This test is currently unreliable
381 test_extra_programs += gdbus-overflow
383 # -----------------------------------------------------------------------------
384 # Test programs that need to bring up a session bus (requires dbus-daemon)
387 gdbus_sessionbus_sources = gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
395 gdbus-close-pending \
397 gdbus-connection-loss \
398 gdbus-connection-slow \
400 gdbus-exit-on-close \
402 gdbus-introspection \
405 gdbus-proxy-threads \
406 gdbus-proxy-well-known-name \
408 gdbus-test-codegen-old \
414 gdbus_proxy_threads_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
415 actions_SOURCES = $(gdbus_sessionbus_sources) actions.c
416 dbus_appinfo_SOURCES = $(gdbus_sessionbus_sources) dbus-appinfo.c
417 gapplication_SOURCES = $(gdbus_sessionbus_sources) gapplication.c
418 gdbus_auth_SOURCES = $(gdbus_sessionbus_sources) gdbus-auth.c
419 gdbus_bz627724_SOURCES = $(gdbus_sessionbus_sources) gdbus-bz627724.c
420 gdbus_close_pending_SOURCES = $(gdbus_sessionbus_sources) gdbus-close-pending.c
421 gdbus_connection_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection.c
422 gdbus_connection_loss_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-loss.c
423 gdbus_connection_slow_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-slow.c
424 gdbus_error_SOURCES = $(gdbus_sessionbus_sources) gdbus-error.c
425 gdbus_exit_on_close_SOURCES = $(gdbus_sessionbus_sources) gdbus-exit-on-close.c
426 gdbus_export_SOURCES = $(gdbus_sessionbus_sources) gdbus-export.c
427 gdbus_introspection_SOURCES = $(gdbus_sessionbus_sources) gdbus-introspection.c
428 gdbus_names_SOURCES = $(gdbus_sessionbus_sources) gdbus-names.c
429 gdbus_proxy_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy.c
430 gdbus_proxy_threads_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-threads.c
431 gdbus_proxy_well_known_name_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-well-known-name.c
432 gdbus_test_codegen_SOURCES = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
433 nodist_gdbus_test_codegen_SOURCES = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
434 gdbus_test_codegen_old_SOURCES = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
435 nodist_gdbus_test_codegen_old_SOURCES = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
436 gdbus_test_codegen_old_CPPFLAGS = $(AM_CPPFLAGS) -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36
437 gdbus_threading_SOURCES = $(gdbus_sessionbus_sources) gdbus-threading.c
438 gmenumodel_SOURCES = $(gdbus_sessionbus_sources) gmenumodel.c
439 gnotification_SOURCES = $(gdbus_sessionbus_sources) gnotification.c gnotification-server.h gnotification-server.c
441 BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
442 gdbus-test-codegen.o: gdbus-test-codegen-generated.h
443 gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
444 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
445 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
446 $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
447 --interface-prefix org.project. \
448 --generate-c-code gdbus-test-codegen-generated \
449 --c-generate-object-manager \
450 --c-namespace Foo_iGen \
451 --generate-docbook gdbus-test-codegen-generated-doc \
452 --annotate "org.project.Bar" Key1 Value1 \
453 --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
454 --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \
455 --annotate "org.project.Bar::TestSignal" Key4 Value4 \
456 --annotate "org.project.Bar:ay" Key5 Value5 \
457 --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \
458 --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \
459 --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
460 $(srcdir)/test-codegen.xml \
462 gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h
463 @: # Generated as side-effect of .h
465 EXTRA_DIST += test-codegen.xml
466 CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml
468 endif # HAVE_DBUS_DAEMON
470 tls_interaction_SOURCES = tls-interaction.c gtesttlsbackend.c gtesttlsbackend.h
472 # -----------------------------------------------------------------------------
475 test_programs += win32-streams
479 no_undefined = -no-undefined
483 test_programs += gdbus-serialization
484 gdbus_serialization_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
485 gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
486 gdbus_serialization_SOURCES = \
487 gdbus-serialization.c \
498 # -----------------------------------------------------------------------------
499 # The resources test is a bit more complicated...
501 test_programs += resources
502 resources_SOURCES = resources.c
503 nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
504 resources_DEPENDENCIES = test.gresource
506 test_ltlibraries += libresourceplugin.la
507 libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
508 libresourceplugin_la_LDFLAGS = -avoid-version -module -export-dynamic $(no_undefined)
509 libresourceplugin_la_LIBADD = $(LDADD)
511 # libtool contains a bug whereby the created .la file doesn't contain the correct dlname='' in the case that
512 # you're building a library but not installing it. This is apparently because the only considered use for an
513 # uninstalled library is as a convenience library for linking (despite the fact that we give -module). The lack
514 # of dlname='' in the .la trips up libltdl and GModule as well. We can trick libtool into believing that we
515 # will install the module by giving it a bogus -rpath for the uninstalled cases.
517 # See http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html
518 if !ENABLE_INSTALLED_TESTS
519 libresourceplugin_la_LDFLAGS += -rpath /
523 glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
525 glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
528 resources.o: test_resources2.h
529 test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
530 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $<
532 test_resources2.h test_resources2.c: test3.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test3.gresource.xml)
533 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate --c-name _g_test2 --manual-register $<
535 plugin_resources.c: test4.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test4.gresource.xml)
536 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $<
538 test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test.gresource.xml)
539 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $<
541 EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
543 CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
545 BUILT_SOURCES += giotypefuncs.c
547 giotypefuncs.c: Makefile
548 $(AM_V_GEN) echo '#include <gio/gio.h>' > xgen-giosrc.c && \
549 echo "G_GNUC_BEGIN_IGNORE_DEPRECATIONS" > xgen-gio && \
550 ${CPP} $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-giosrc.c | \
551 $(GREP) -o '\bg_[A-Za-z0-9_]*_get_type\b' | \
552 $(GREP) -v 'g_io_extension_get_type\|g_variant_get_type' | \
554 $(SED) -e 's/^/*tp++ = /' -e 's/$$/ ();/' >> xgen-gio && \
555 cp xgen-gio $@ # && rm -f xgen-gio xgen-giosrc.c
557 CLEANFILES += xgen-giosrc.c xgen-gio giotypefuncs.c
559 if ENABLE_INSTALLED_TESTS
562 $(AM_V_at) chmod a+x $(DESTDIR)$(installed_testdir)/x-content/win32-software/autorun.exe