5 include $(top_srcdir)/Makefile.decl
7 insttestdir = $(pkglibexecdir)/installed-tests
9 SUBDIRS = gdbus-object-manager-example services
12 -DG_LOG_DOMAIN=\"GLib-GIO\" \
15 -I$(top_builddir)/gio \
18 -DSRCDIR=\""$(srcdir)"\" \
19 -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\"
21 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
23 noinst_PROGRAMS = $(TEST_PROGS) $(SAMPLE_PROGS)
24 noinst_DATA = $(MISC_STUFF)
27 $(top_builddir)/glib/libglib-2.0.la \
28 $(top_builddir)/gthread/libgthread-2.0.la \
29 $(top_builddir)/gobject/libgobject-2.0.la \
30 $(top_builddir)/gmodule/libgmodule-2.0.la \
31 $(top_builddir)/gio/libgio-2.0.la
36 memory-output-stream \
44 buffered-input-stream \
45 buffered-output-stream \
54 async-close-output-stream \
65 fileattributematcher \
79 gdbus-connection-loss \
80 gdbus-connection-slow \
84 gdbus-proxy-well-known-name \
97 gdbus-connection-flush \
101 gdbus-peer-object-manager \
117 gdbus-example-export \
118 gdbus-example-own-name \
119 gdbus-example-watch-name \
120 gdbus-example-watch-proxy \
121 gdbus-example-server \
122 gdbus-example-subtree \
124 gdbus-example-proxy-subclass \
126 gapplication-example-open \
127 gapplication-example-cmdline \
128 gapplication-example-cmdline2 \
129 gapplication-example-cmdline3 \
130 gapplication-example-actions \
131 gapplication-example-dbushooks \
137 gdbus-connection-flush-helper \
139 noinst_PROGRAMS += $(other_progs)
158 gdbus-example-unix-fd-client \
159 gdbus-example-objectmanager-server \
160 gdbus-example-objectmanager-client \
166 TEST_PROGS += win32-streams
170 no_undefined = -no-undefined
173 actions_SOURCES = actions.c gdbus-sessionbus.c gdbus-sessionbus.h
175 unix_streams_LDADD = $(LDADD) \
176 $(top_builddir)/gthread/libgthread-2.0.la
178 win32_streams_LDADD = $(LDADD) \
179 $(top_builddir)/gthread/libgthread-2.0.la
181 resolver_LDADD = $(LDADD) \
182 $(top_builddir)/gthread/libgthread-2.0.la
184 socket_server_LDADD = $(LDADD) \
185 $(top_builddir)/gthread/libgthread-2.0.la
187 socket_client_SOURCES = socket-client.c \
188 gtlsconsoleinteraction.c \
189 gtlsconsoleinteraction.h
190 socket_client_LDADD = $(LDADD) \
191 $(top_builddir)/gthread/libgthread-2.0.la
193 echo_server_LDADD = $(LDADD) \
194 $(top_builddir)/gthread/libgthread-2.0.la
196 httpd_LDADD = $(LDADD) \
197 $(top_builddir)/gthread/libgthread-2.0.la
199 send_data_LDADD = $(LDADD) \
200 $(top_builddir)/gthread/libgthread-2.0.la
202 contexts_LDADD = $(LDADD) \
203 $(top_builddir)/gthread/libgthread-2.0.la
205 gdbus_daemon_SOURCES = gdbus-daemon.c $(top_srcdir)/gio/gdbusdaemon.c $(top_builddir)/gio/gdbus-daemon-generated.c
207 gdbus_testserver_SOURCES = gdbus-testserver.c
210 test_progs += gdbus-serialization
211 gdbus_serialization_SOURCES = gdbus-serialization.c gdbus-tests.h gdbus-tests.c
212 gdbus_serialization_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
213 gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
216 test_progs += gdbus-auth
217 gdbus_auth_SOURCES = gdbus-auth.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
218 gdbus_auth_LDADD = $(LDADD)
220 gdbus_bz627724_SOURCES = gdbus-bz627724.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
222 gdbus_close_pending_SOURCES = gdbus-close-pending.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
225 gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
226 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
227 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
228 $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
229 --interface-prefix org.project. \
230 --generate-c-code gdbus-test-codegen-generated \
231 --c-generate-object-manager \
232 --c-namespace Foo_iGen \
233 --generate-docbook gdbus-test-codegen-generated-doc \
234 --annotate "org.project.Bar" Key1 Value1 \
235 --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
236 --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \
237 --annotate "org.project.Bar::TestSignal" Key4 Value4 \
238 --annotate "org.project.Bar:ay" Key5 Value5 \
239 --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \
240 --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \
241 --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
242 $(srcdir)/test-codegen.xml \
245 BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
247 gdbus_test_codegen_SOURCES = gdbus-test-codegen.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
248 gdbus_test_codegen_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
252 gdbus_connection_SOURCES = gdbus-connection.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
254 gdbus_connection_flush_SOURCES = \
255 gdbus-connection-flush.c \
262 gdbus_connection_loss_SOURCES = gdbus-connection-loss.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
264 gdbus_connection_slow_SOURCES = gdbus-connection-slow.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
266 gdbus_names_SOURCES = gdbus-names.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
268 gdbus_proxy_SOURCES = gdbus-proxy.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
270 gdbus_proxy_threads_SOURCES = gdbus-proxy-threads.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
272 gdbus_proxy_well_known_name_SOURCES = gdbus-proxy-well-known-name.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
274 gdbus_introspection_SOURCES = gdbus-introspection.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
276 gdbus_threading_SOURCES = gdbus-threading.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
278 gdbus_export_SOURCES = gdbus-export.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
280 gdbus_error_SOURCES = gdbus-error.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
282 gdbus_non_socket_SOURCES = \
292 gdbus_exit_on_close_SOURCES = gdbus-exit-on-close.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
294 resources_SOURCES = resources.c test_resources.c test_resources2.c test_resources2.h
295 resources_DEPENDENCIES = test.gresource
297 gapplication_SOURCES = gapplication.c gdbus-sessionbus.h gdbus-sessionbus.c gdbus-tests.h gdbus-tests.c
299 gmenumodel_SOURCES = gmenumodel.c gdbus-sessionbus.h gdbus-sessionbus.c
301 TEST_PROGS += $(test_progs)
303 TESTS_ENVIRONMENT = \
304 GLIB_MKENUMS=../../gobject/glib-mkenums \
305 GLIB_COMPILE_SCHEMAS=../glib-compile-schemas
308 array-default-not-in-choices.gschema.xml \
309 bad-choice.gschema.xml \
310 bad-key.gschema.xml \
311 bad-key2.gschema.xml \
312 bad-key3.gschema.xml \
313 bad-key4.gschema.xml \
314 bad-type.gschema.xml \
315 bare-alias.gschema.xml \
316 choice-alias.gschema.xml \
317 choice-bad.gschema.xml \
318 choice-badtype.gschema.xml \
319 choice-invalid-alias.gschema.xml \
320 choice-missing-value.gschema.xml \
321 choice-shadowed-alias.gschema.xml \
322 choice-upside-down.gschema.xml \
324 choices-wrong-type.gschema.xml \
325 default-in-aliases.gschema.xml \
326 default-not-in-choices.gschema.xml \
327 default-out-of-range.gschema.xml \
328 empty-key.gschema.xml \
329 enum-with-aliases.gschema.xml \
330 enum-with-bad-default.gschema.xml \
331 enum-with-chained-alias.gschema.xml \
332 enum-with-choice.gschema.xml \
333 enum-with-invalid-alias.gschema.xml \
334 enum-with-repeated-alias.gschema.xml \
335 enum-with-repeated-nick.gschema.xml \
336 enum-with-repeated-value.gschema.xml \
337 enum-with-shadow-alias.gschema.xml \
339 flags-aliased-default.gschema.xml \
340 flags-bad-default.gschema.xml \
341 flags-more-than-one-bit.gschema.xml \
342 flags-with-enum-attr.gschema.xml \
343 flags-with-enum-tag.gschema.xml \
344 extend-and-shadow-indirect.gschema.xml \
345 extend-and-shadow.gschema.xml \
346 extend-missing.gschema.xml \
347 extend-nonlist.gschema.xml \
348 extend-self.gschema.xml \
349 extend-wrong-list-indirect.gschema.xml \
350 extend-wrong-list.gschema.xml \
351 extending.gschema.xml \
352 from-docs.gschema.xml \
353 incomplete-list.gschema.xml \
354 inherit-gettext-domain.gschema.xml \
355 invalid-path.gschema.xml \
356 key-in-list-indirect.gschema.xml \
357 key-in-list.gschema.xml \
358 list-of-missing.gschema.xml \
359 missing-quotes.gschema.xml \
360 no-default.gschema.xml \
361 overflow.gschema.xml \
362 override-missing.gschema.xml \
363 override-range-error.gschema.xml \
364 override-then-key.gschema.xml \
365 override-twice.gschema.xml \
366 override-type-error.gschema.xml \
367 override.gschema.xml \
368 range-badtype.gschema.xml \
369 range-default-high.gschema.xml \
370 range-default-low.gschema.xml \
371 range-high-default.gschema.xml \
372 range-low-default.gschema.xml \
373 range-missing-max.gschema.xml \
374 range-missing-min.gschema.xml \
375 range-parse-error.gschema.xml \
376 range-wrong-type.gschema.xml \
378 wrong-category.gschema.xml \
381 schema_test_files = $(addprefix schema-tests/,$(schema_tests))
383 proxy_LDADD = $(LDADD) \
384 $(top_builddir)/gthread/libgthread-2.0.la
386 tls_certificate_SOURCES = tls-certificate.c gtesttlsbackend.c gtesttlsbackend.h
400 cert_test_files = $(addprefix cert-tests/,$(cert_tests))
402 # -----------------------------------------------------------------------------
405 gdbus_example_objectmanager_server_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/gio/tests/gdbus-object-manager-example
406 gdbus_example_objectmanager_server_LDADD = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
408 gdbus_example_objectmanager_client_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/gio/tests/gdbus-object-manager-example
409 gdbus_example_objectmanager_client_LDADD = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
411 gdbus_peer_SOURCES = gdbus-peer.c gdbus-tests.h gdbus-tests.c
412 gdbus_peer_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/gio/tests/gdbus-object-manager-example
413 gdbus_peer_LDADD = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
415 gdbus_test_fixture_SOURCES = gdbus-test-fixture.c
416 gdbus_test_fixture_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/gio/tests/gdbus-object-manager-example
417 gdbus_test_fixture_LDADD = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
421 # -----------------------------------------------------------------------------
423 desktop_test_files = \
424 appinfo-test.desktop \
425 appinfo-test2.desktop \
426 appinfo-test-gnome.desktop \
427 appinfo-test-notgnome.desktop \
432 org.gtk.test.gschema \
433 org.gtk.test.gschema.xml \
435 $(schema_test_files) \
440 test2.gresource.xml \
442 test3.gresource.xml \
444 test4.gresource.xml \
445 $(desktop_test_files) \
448 MISC_STUFF = test.mo test.gresource
451 $(MSGFMT) -o test.mo $(srcdir)/de.po; \
452 $(MKDIR_P) de/LC_MESSAGES; \
453 cp -f test.mo de/LC_MESSAGES
456 glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
458 glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
461 BUILT_SOURCES += test_resources.c test_resources2.c test_resources2.h
462 test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
463 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $<
465 test_resources2.h test_resources2.c: test3.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test3.gresource.xml)
466 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate --c-name _g_test2 --manual-register $<
468 plugin_resources.c: test4.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test4.gresource.xml)
469 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $<
471 test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test.gresource.xml)
472 $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $<
474 if BUILDOPT_INSTALL_TESTS
475 insttest_LTLIBRARIES = libresourceplugin.la
477 noinst_LTLIBRARIES = libresourceplugin.la
480 libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
481 libresourceplugin_la_LDFLAGS = -avoid-version -module $(no_undefined) -rpath $(insttestdir)
482 libresourceplugin_la_LIBADD = $(LDADD)
484 CLEANFILES = gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml test_resources2.[ch] plugin_resources.c
487 applications/mimeinfo.cache \
488 org.gtk.test.enums.xml \
489 de/LC_MESSAGES/test.mo \
495 schema-source/gschemas.compiled
498 rm -rf xdgdatahome xdgdatadir
506 org.gtk.test.gschema.xml \
507 org.gtk.schemasourcecheck.gschema.xml \
510 EXTRA_DIST += $(test_files)
512 if BUILDOPT_INSTALL_TESTS
513 insttest_PROGRAMS = $(test_progs) $(other_progs)
515 schematestdir = $(insttestdir)/schema-tests
516 schematest_DATA = $(schema_test_files)
518 certtestdir = $(insttestdir)/cert-tests
519 certtest_DATA = $(cert_test_files)
521 testdatadir = $(insttestdir)
522 testdata_DATA = $(test_files)
524 testmetadir = $(datadir)/installed-tests/$(PACKAGE)
525 xfail_tests = desktop-app-info.test
526 developer_only_tests = gsettings.test
527 testmeta_DATA = $(filter-out $(xfail_tests) $(developer_only_tests),$(test_progs:=.test))
530 $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
531 echo 'Type=session' >> $@.tmp; \
532 echo 'Exec=env G_TEST_DATA=$(pkglibexecdir)/installed-tests $(pkglibexecdir)/installed-tests/$<' >> $@.tmp; \
535 %.desktop.insttest: %.desktop
536 sed -e s,Exec=./appinfo-test,Exec=$(insttestdir)/appinfo-test, < $< >$@.tmp && mv $@.tmp $@
538 installed_desktop_test_files = $(desktop_test_files:.desktop=.desktop.insttest)
539 install-data-local: $(installed_desktop_test_files)
540 for x in $(desktop_test_files); do \
541 install -m 0644 $${x}.insttest $(DESTDIR)$(testdatadir)/$$x; \
543 install -d -m 0755 $(DESTDIR)$(testdatadir)/schema-tests