summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-05-30 00:07:32 -0400
committerRyan Lortie <desrt@desrt.ca>2013-05-31 23:12:15 -0400
commitf9eb9eed10b7123ef000e49be1290755b2d6ae8f (patch)
treedffb3fdb91e25915ca5f67d9af508b541b1d720c /gio
parent210b1f8b4230b881d1c2e4a9e7dac571c967e091 (diff)
downloadglib-f9eb9eed10b7123ef000e49be1290755b2d6ae8f.tar.gz
Rework the build system for a new tests approach
Perform a substantial cleanup of the build system with respect to building and installing testcases. First, Makefile.decl has been renamed glib.mk and substantially expanded. We intend to add more stuff here in the future, like canned rules for mkenums, marshallers, resources, etc. By default, tests are no longer compiled as part of 'make'. They will be built when 'make check' is run. The old behaviour can be obtained with --enable-always-build-tests. --disable-modular-tests is gone (because tests are no longer built by default). There is no longer any way to cause 'make check' to be a no-op, but that's not very useful anyway. A new glibtests.m4 file is introduced. Along with glib.mk, this provides for consistent handling of --enable-installed-tests and --enable-always-build-tests (mentioned above). Port our various test-installing Makefiles to the new framework. This patch substantially improves the situation in the toplevel tests/ directory. Things are now somewhat under control there. There were some tests being built that weren't even being run and we run those now. The long-running GObject performance tests in this directory have been removed from 'make check' because they take too long. As an experiment, 'make check' now runs the testcases on win32 builds, by default. We can't run them under gtester (since it uses a pipe to communicate with the subprocess) so just toss them in TESTS. Most of them are passing on win32. Things are not quite done here, but this patch is already a substantial improvement. More to come.
Diffstat (limited to 'gio')
-rw-r--r--gio/Makefile.am20
-rw-r--r--gio/fam/Makefile.am4
-rw-r--r--gio/fen/Makefile.am6
-rw-r--r--gio/gdbus-2.0/codegen/Makefile.am4
-rw-r--r--gio/glib-compile-schemas.c4
-rw-r--r--gio/inotify/Makefile.am6
-rw-r--r--gio/kqueue/Makefile.am6
-rw-r--r--gio/tests/Makefile.am726
-rw-r--r--gio/tests/appinfo.c6
-rw-r--r--gio/tests/file.c2
-rw-r--r--gio/tests/gdbus-example-objectmanager-client.c2
-rw-r--r--gio/tests/gdbus-example-objectmanager-server.c2
-rw-r--r--gio/tests/gdbus-object-manager-example/Makefile.am37
-rw-r--r--gio/tests/gdbus-peer.c2
-rw-r--r--gio/tests/gdbus-test-fixture.c2
-rw-r--r--gio/tests/gschema-compile.c6
-rw-r--r--gio/tests/gsettings.c61
-rw-r--r--gio/win32/Makefile.am6
-rw-r--r--gio/xdgmime/Makefile.am4
19 files changed, 391 insertions, 515 deletions
diff --git a/gio/Makefile.am b/gio/Makefile.am
index ff662638f..1e7b6b717 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -1,6 +1,4 @@
-include $(top_srcdir)/Makefile.decl
-
-NULL =
+include $(top_srcdir)/glib.mk
SUBDIRS = gdbus-2.0/codegen
@@ -10,7 +8,7 @@ endif
if OS_WIN32_AND_DLL_COMPILATION
if MS_LIB_AVAILABLE
-noinst_DATA = gio-2.0.lib
+noinst_DATA += gio-2.0.lib
install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
@@ -233,7 +231,7 @@ platform_libadd += win32/libgiowin32.la
platform_deps += win32/libgiowin32.la
endif
-SUBDIRS += .
+SUBDIRS += . tests
if HAVE_FAM
SUBDIRS += fam
@@ -327,10 +325,6 @@ giowin32include_HEADERS = \
endif
-if BUILD_MODULAR_TESTS
-SUBDIRS += tests
-endif
-
libgio_2_0_la_SOURCES = \
gappinfo.c \
gasynchelper.c \
@@ -622,7 +616,7 @@ gioinclude_HEADERS = \
gioenumtypes.h
# these sources (also mentioned above) are generated.
-BUILT_SOURCES = \
+BUILT_SOURCES += \
gconstructor_as_data.h \
gioenumtypes.h \
gioenumtypes.c \
@@ -642,17 +636,17 @@ EXTRA_DIST += \
gnetworking.h.win32 \
$(NULL)
-BUILT_EXTRA_DIST = \
+BUILT_EXTRA_DIST += \
gio.rc
# This is read by gobject-introspection/misc/ and gtk-doc
gio-public-headers.txt: Makefile
$(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
-CLEANFILES = gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
+CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
-DISTCLEANFILES = \
+DISTCLEANFILES += \
gioenumtypes.h \
gioenumtypes.c
diff --git a/gio/fam/Makefile.am b/gio/fam/Makefile.am
index 429d7f424..67e0d6766 100644
--- a/gio/fam/Makefile.am
+++ b/gio/fam/Makefile.am
@@ -1,6 +1,4 @@
-include $(top_srcdir)/Makefile.decl
-
-NULL =
+include $(top_srcdir)/glib.mk
module_flags = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload|query)'
diff --git a/gio/fen/Makefile.am b/gio/fen/Makefile.am
index 0a22a6456..2b5eb50d0 100644
--- a/gio/fen/Makefile.am
+++ b/gio/fen/Makefile.am
@@ -1,8 +1,6 @@
-include $(top_srcdir)/Makefile.decl
+include $(top_srcdir)/glib.mk
-NULL =
-
-noinst_LTLIBRARIES = libfen.la
+noinst_LTLIBRARIES += libfen.la
libfen_la_SOURCES = \
fen-dump.c \
diff --git a/gio/gdbus-2.0/codegen/Makefile.am b/gio/gdbus-2.0/codegen/Makefile.am
index 1afdaf08b..b3fb2c292 100644
--- a/gio/gdbus-2.0/codegen/Makefile.am
+++ b/gio/gdbus-2.0/codegen/Makefile.am
@@ -1,8 +1,6 @@
-include $(top_srcdir)/Makefile.decl
+include $(top_srcdir)/glib.mk
-NULL =
bin_SCRIPTS =
-CLEANFILES =
codegendir = $(datadir)/glib-2.0/codegen
codegen_PYTHON = \
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index b80c08ade..d414d1c35 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -1126,7 +1126,7 @@ parse_state_start_schema (ParseState *state,
{
g_set_error (error, G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT,
- _("<schema id='%s'> extends not-yet-existing "
+ _("<schema id='%s'> extends not yet existing "
"schema '%s'"), id, extends_name);
return;
}
@@ -1142,7 +1142,7 @@ parse_state_start_schema (ParseState *state,
{
g_set_error (error, G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT,
- _("<schema id='%s'> is list of not-yet-existing "
+ _("<schema id='%s'> is list of not yet existing "
"schema '%s'"), id, list_of);
return;
}
diff --git a/gio/inotify/Makefile.am b/gio/inotify/Makefile.am
index b51a0a903..283868553 100644
--- a/gio/inotify/Makefile.am
+++ b/gio/inotify/Makefile.am
@@ -1,8 +1,6 @@
-include $(top_srcdir)/Makefile.decl
+include $(top_srcdir)/glib.mk
-NULL =
-
-noinst_LTLIBRARIES = libinotify.la
+noinst_LTLIBRARIES += libinotify.la
libinotify_la_SOURCES = \
inotify-kernel.c \
diff --git a/gio/kqueue/Makefile.am b/gio/kqueue/Makefile.am
index 652c43ed6..77f4cb2aa 100644
--- a/gio/kqueue/Makefile.am
+++ b/gio/kqueue/Makefile.am
@@ -1,8 +1,6 @@
-include $(top_srcdir)/Makefile.decl
+include $(top_srcdir)/glib.mk
-NULL =
-
-noinst_LTLIBRARIES = libkqueue.la
+noinst_LTLIBRARIES += libkqueue.la
libkqueue_la_SOURCES = \
gkqueuefilemonitor.c \
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index f9d5d8021..14982515e 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -1,311 +1,101 @@
-
-NULL =
-BUILT_SOURCES =
-
-include $(top_srcdir)/Makefile.decl
-
-insttestdir = $(pkglibexecdir)/installed-tests
+include $(top_srcdir)/glib.mk
+dist_uninstalled_test_data =
+test_ltlibraries =
SUBDIRS = gdbus-object-manager-example services
-AM_CPPFLAGS = \
- -DG_LOG_DOMAIN=\"GLib-GIO\" \
- $(gio_INCLUDES) \
- $(GLIB_DEBUG_FLAGS) \
- -I$(top_builddir)/gio \
- -I$(top_srcdir)/gio \
- $(DBUS1_CFLAGS) \
- -DSRCDIR=\""$(srcdir)"\" \
- -DBUILDDIR=\""$(abs_builddir)"\" \
- -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\"
-
-AM_CFLAGS = $(GLIB_WARN_CFLAGS)
-
-noinst_PROGRAMS = $(TEST_PROGS) $(SAMPLE_PROGS)
-noinst_DATA = $(MISC_STUFF)
-
-LDADD = \
- $(top_builddir)/glib/libglib-2.0.la \
- $(top_builddir)/gthread/libgthread-2.0.la \
+LDADD = \
+ $(top_builddir)/glib/libglib-2.0.la \
$(top_builddir)/gobject/libgobject-2.0.la \
$(top_builddir)/gmodule/libgmodule-2.0.la \
$(top_builddir)/gio/libgio-2.0.la
+AM_CPPFLAGS = $(gio_INCLUDES) $(GLIB_DEBUG_FLAGS) -I$(top_builddir)/gio -I$(top_srcdir)/gio
+DEFS = -DG_LOG_DOMAIN=\"GLib-GIO\" -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\"
+AM_CFLAGS = $(GLIB_WARN_CFLAGS)
-test_progs = \
- io-stream \
- memory-input-stream \
- memory-output-stream \
- readwrite \
- g-file \
- g-file-info \
- converter-stream \
- data-input-stream \
- data-output-stream \
- g-icon \
- buffered-input-stream \
- buffered-output-stream \
- sleepy-stream \
- filter-streams \
- volumemonitor \
- simple-async-result \
- srvtarget \
- contexts \
- gsettings \
- gschema-compile \
- async-close-output-stream \
- gdbus-addresses \
- network-address \
- gdbus-message \
- socket \
- pollable \
- tls-certificate \
- tls-interaction \
- cancellable \
- vfs \
- network-monitor \
- fileattributematcher \
- resources \
- proxy-test \
- simple-proxy \
- inet-address \
- permission \
- task \
- credentials \
- $(NULL)
-
-if HAVE_DBUS_DAEMON
-test_progs += \
- actions \
- gdbus-connection \
- gdbus-connection-loss \
- gdbus-connection-slow \
- gdbus-names \
- gdbus-proxy \
- gdbus-proxy-threads \
- gdbus-proxy-well-known-name \
- gdbus-introspection \
- gdbus-threading \
- gdbus-export \
- gdbus-error \
- gdbus-bz627724 \
- gmenumodel \
- $(NULL)
-endif
-
-if OS_UNIX
-test_progs += \
- gdbus-close-pending \
- gdbus-connection-flush \
- gdbus-peer \
- gdbus-overflow \
- gdbus-exit-on-close \
- gdbus-non-socket \
- gdbus-peer-object-manager \
- appinfo \
- contenttype \
- mimeapps \
- file \
- $(NULL)
-endif
-
-SAMPLE_PROGS = \
- resolver \
- socket-server \
- socket-client \
- echo-server \
- httpd \
- send-data \
- filter-cat \
- gdbus-example-export \
- gdbus-example-own-name \
- gdbus-example-watch-name \
- gdbus-example-watch-proxy \
- gdbus-example-server \
- gdbus-example-subtree \
- gdbus-example-peer \
- gdbus-example-proxy-subclass \
- proxy \
- gapplication-example-open \
- gapplication-example-cmdline \
- gapplication-example-cmdline2 \
- gapplication-example-cmdline3 \
- gapplication-example-actions \
- gapplication-example-dbushooks \
- gdbus-daemon \
- $(NULL)
-
-other_progs = \
- gdbus-testserver \
- gdbus-connection-flush-helper \
+# -----------------------------------------------------------------------------
+# Test programs buildable on all platforms
+
+test_programs = \
+ io-stream \
+ memory-input-stream \
+ memory-output-stream \
+ readwrite \
+ g-file \
+ g-file-info \
+ converter-stream \
+ data-input-stream \
+ data-output-stream \
+ g-icon \
+ buffered-input-stream \
+ buffered-output-stream \
+ sleepy-stream \
+ filter-streams \
+ volumemonitor \
+ simple-async-result \
+ srvtarget \
+ contexts \
+ async-close-output-stream \
+ gdbus-addresses \
+ network-address \
+ gdbus-message \
+ socket \
+ pollable \
+ tls-interaction \
+ cancellable \
+ vfs \
+ network-monitor \
+ fileattributematcher \
+ proxy-test \
+ simple-proxy \
+ inet-address \
+ permission \
+ task \
+ credentials \
$(NULL)
-noinst_PROGRAMS += $(other_progs)
-if OS_UNIX
-test_progs += \
- live-g-file \
- desktop-app-info \
- unix-fd \
- unix-streams \
- gapplication \
- basic-application \
- gdbus-test-codegen \
- socket-address \
+uninstalled_test_programs = \
$(NULL)
-other_progs += \
- appinfo-test \
+dist_test_data = \
+ contexts.c \
+ g-icon.c \
$(NULL)
-SAMPLE_PROGS += \
- gdbus-example-unix-fd-client \
- gdbus-example-objectmanager-server \
- gdbus-example-objectmanager-client \
- gdbus-test-fixture \
+test_data = \
+ test.gresource \
$(NULL)
-endif
-
-if OS_WIN32
-TEST_PROGS += win32-streams
-endif
-
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
-actions_SOURCES = actions.c gdbus-sessionbus.c gdbus-sessionbus.h
-
-unix_streams_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-win32_streams_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-resolver_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-socket_server_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-socket_client_SOURCES = socket-client.c \
- gtlsconsoleinteraction.c \
- gtlsconsoleinteraction.h
-socket_client_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-echo_server_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-httpd_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-send_data_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-contexts_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-gdbus_daemon_SOURCES = gdbus-daemon.c $(top_srcdir)/gio/gdbusdaemon.c $(top_builddir)/gio/gdbus-daemon-generated.c
-
-gdbus_testserver_SOURCES = gdbus-testserver.c
-
-if HAVE_DBUS1
-test_progs += gdbus-serialization
-gdbus_serialization_SOURCES = gdbus-serialization.c gdbus-tests.h gdbus-tests.c
-gdbus_serialization_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
-gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
-endif
-test_progs += gdbus-auth
-gdbus_auth_SOURCES = gdbus-auth.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-gdbus_auth_LDADD = $(LDADD)
-
-gdbus_bz627724_SOURCES = gdbus-bz627724.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_close_pending_SOURCES = gdbus-close-pending.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-if OS_UNIX
-gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
- --interface-prefix org.project. \
- --generate-c-code gdbus-test-codegen-generated \
- --c-generate-object-manager \
- --c-namespace Foo_iGen \
- --generate-docbook gdbus-test-codegen-generated-doc \
- --annotate "org.project.Bar" Key1 Value1 \
- --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
- --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \
- --annotate "org.project.Bar::TestSignal" Key4 Value4 \
- --annotate "org.project.Bar:ay" Key5 Value5 \
- --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \
- --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \
- --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
- $(srcdir)/test-codegen.xml \
- $(NULL)
-
-BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
-
-gdbus_test_codegen_SOURCES = gdbus-test-codegen.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-gdbus_test_codegen_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
-
-endif # OS_UNIX
-
-gdbus_connection_SOURCES = gdbus-connection.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_connection_flush_SOURCES = \
- gdbus-connection-flush.c \
- test-io-stream.c \
- test-io-stream.h \
- test-pipe-unix.c \
- test-pipe-unix.h \
+uninstalled_test_extra_programs = \
+ resolver \
+ socket-server \
+ echo-server \
+ httpd \
+ send-data \
+ filter-cat \
+ gdbus-example-export \
+ gdbus-example-own-name \
+ gdbus-example-watch-name \
+ gdbus-example-watch-proxy \
+ gdbus-example-server \
+ gdbus-example-subtree \
+ gdbus-example-peer \
+ gdbus-example-proxy-subclass \
+ proxy \
+ gapplication-example-open \
+ gapplication-example-cmdline \
+ gapplication-example-cmdline2 \
+ gapplication-example-cmdline3 \
+ gapplication-example-actions \
+ gapplication-example-dbushooks \
$(NULL)
-gdbus_connection_loss_SOURCES = gdbus-connection-loss.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_connection_slow_SOURCES = gdbus-connection-slow.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_names_SOURCES = gdbus-names.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_proxy_SOURCES = gdbus-proxy.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_proxy_threads_SOURCES = gdbus-proxy-threads.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_proxy_well_known_name_SOURCES = gdbus-proxy-well-known-name.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_introspection_SOURCES = gdbus-introspection.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_threading_SOURCES = gdbus-threading.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_export_SOURCES = gdbus-export.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_error_SOURCES = gdbus-error.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-gdbus_non_socket_SOURCES = \
- gdbus-non-socket.c \
- gdbus-tests.c \
- gdbus-tests.h \
- test-io-stream.c \
- test-io-stream.h \
- test-pipe-unix.c \
- test-pipe-unix.h \
+test_extra_programs = \
+ gdbus-testserver \
+ gdbus-connection-flush-helper \
$(NULL)
-gdbus_exit_on_close_SOURCES = gdbus-exit-on-close.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
-
-resources_SOURCES = resources.c test_resources.c test_resources2.c test_resources2.h
-resources_DEPENDENCIES = test.gresource
-
-gapplication_SOURCES = gapplication.c gdbus-sessionbus.h gdbus-sessionbus.c gdbus-tests.h gdbus-tests.c
-
-gmenumodel_SOURCES = gmenumodel.c gdbus-sessionbus.h gdbus-sessionbus.c
-
-TEST_PROGS += $(test_progs)
-
-TESTS_ENVIRONMENT = \
- GLIB_MKENUMS=../../gobject/glib-mkenums \
- GLIB_COMPILE_SCHEMAS=../glib-compile-schemas
-
+dist_uninstalled_test_data += $(addprefix schema-tests/,$(schema_tests))
schema_tests = \
array-default-not-in-choices.gschema.xml \
bad-choice.gschema.xml \
@@ -358,7 +148,7 @@ schema_tests = \
key-in-list-indirect.gschema.xml \
key-in-list.gschema.xml \
list-of-missing.gschema.xml \
- missing-quotes.gschema.xml \
+ missing-quotes.gschema.xml \
no-default.gschema.xml \
overflow.gschema.xml \
override-missing.gschema.xml \
@@ -380,167 +170,277 @@ schema_tests = \
wrong-category.gschema.xml \
$(NULL)
-schema_test_files = $(addprefix schema-tests/,$(schema_tests))
-
-proxy_LDADD = $(LDADD) \
- $(top_builddir)/gthread/libgthread-2.0.la
-
-tls_certificate_SOURCES = tls-certificate.c gtesttlsbackend.c gtesttlsbackend.h
-
-cert_tests = \
- cert1.pem \
- cert2.pem \
- cert3.pem \
- cert-key.pem \
- cert-list.pem \
- key8.pem \
- key-cert.pem \
- key.pem \
- nothing.pem \
+test_programs += tls-certificate
+tls_certificate_SOURCES = \
+ tls-certificate.c \
+ gtesttlsbackend.c \
+ gtesttlsbackend.h
+dist_test_data += $(cert_data_files)
+cert_data_files = $(addprefix cert-tests/,$(cert_tests))
+cert_tests = \
+ cert1.pem \
+ cert2.pem \
+ cert3.pem \
+ cert-key.pem \
+ cert-list.pem \
+ key8.pem \
+ key-cert.pem \
+ key.pem \
+ nothing.pem \
$(NULL)
-cert_test_files = $(addprefix cert-tests/,$(cert_tests))
+uninstalled_test_extra_programs += socket-client
+socket_client_SOURCES = \
+ socket-client.c \
+ gtlsconsoleinteraction.c \
+ gtlsconsoleinteraction.h
+EXTRA_DIST += socket-common.c
+
+uninstalled_test_extra_programs += gdbus-daemon
+nodist_gdbus_daemon_SOURCES = \
+ $(top_builddir)/gio/gdbus-daemon-generated.c
+gdbus_daemon_SOURCES = \
+ gdbus-daemon.c \
+ $(top_srcdir)/gio/gdbusdaemon.c
# -----------------------------------------------------------------------------
+# Test programs buildable on UNIX only
if OS_UNIX
-gdbus_example_objectmanager_server_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/gio/tests/gdbus-object-manager-example
-gdbus_example_objectmanager_server_LDADD = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
-
-gdbus_example_objectmanager_client_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/gio/tests/gdbus-object-manager-example
-gdbus_example_objectmanager_client_LDADD = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
-
-gdbus_peer_SOURCES = gdbus-peer.c gdbus-tests.h gdbus-tests.c
-gdbus_peer_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/gio/tests/gdbus-object-manager-example
-gdbus_peer_LDADD = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
-
-gdbus_test_fixture_SOURCES = gdbus-test-fixture.c
-gdbus_test_fixture_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/gio/tests/gdbus-object-manager-example
-gdbus_test_fixture_LDADD = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
-
-endif OS_UNIX
+test_programs += \
+ live-g-file \
+ unix-fd \
+ unix-streams \
+ basic-application \
+ socket-address \
+ gdbus-peer-object-manager \
+ contenttype \
+ file \
+ $(NULL)
-# -----------------------------------------------------------------------------
+# Uninstalled because of the check-for-executable logic in DesktopAppInfo unable to find the installed executable
+uninstalled_test_programs += \
+ appinfo \
+ desktop-app-info \
+ $(NULL)
-desktop_test_files = \
+dist_test_data += \
appinfo-test.desktop \
appinfo-test2.desktop \
appinfo-test-gnome.desktop \
appinfo-test-notgnome.desktop \
+ file.c \
+ $(NULL)
+
+test_extra_programs += \
+ appinfo-test \
$(NULL)
-EXTRA_DIST += \
- socket-common.c \
- org.gtk.test.gschema.xml \
- de.po \
- $(schema_test_files) \
- test-codegen.xml \
- $(cert_test_files) \
- test.gresource.xml \
- test1.txt \
- test2.gresource.xml \
- test2.txt \
- test3.gresource.xml \
- test3.txt \
- test4.gresource.xml \
- $(desktop_test_files) \
+uninstalled_test_extra_programs += \
+ gdbus-example-unix-fd-client \
$(NULL)
-MISC_STUFF = test.mo test.gresource
+test_programs += mimeapps
+clean-local: clean-mimeapps
+clean-mimeapps:
+ rm -rf xdgdatadir xdgdatahome
+uninstalled_test_programs += gsettings gschema-compile
+gsettings_DEPENDENCIES = test.mo
+CLEANFILES += test.mo de/LC_MESSAGES/test.mo
+gsettings_CFLAGS = $(AM_CFLAGS) -DSRCDIR=\"$(abs_srcdir)\"
test.mo: de.po
- $(MSGFMT) -o test.mo $(srcdir)/de.po; \
+ $(AM_V_GEN) $(MSGFMT) -o test.mo $(srcdir)/de.po; \
$(MKDIR_P) de/LC_MESSAGES; \
cp -f test.mo de/LC_MESSAGES
+EXTRA_DIST += de.po
+dist_uninstalled_test_data += \
+ org.gtk.test.gschema.xml \
+ org.gtk.schemasourcecheck.gschema.xml \
+ testenum.h \
+ enums.xml.template
+# Generated while running the testcase itself...
+CLEANFILES += \
+ org.gtk.test.enums.xml \
+ gsettings.store \
+ gschemas.compiled \
+ schema-source/gschemas.compiled
-if CROSS_COMPILING
- glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
-else
- glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
-endif
+test_programs += gdbus-connection-flush
+gdbus_connection_flush_SOURCES = \
+ gdbus-connection-flush.c \
+ test-io-stream.c \
+ test-io-stream.h \
+ test-pipe-unix.c \
+ test-pipe-unix.h
-BUILT_SOURCES += test_resources.c test_resources2.c test_resources2.h
-test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
- $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $<
+test_programs += gdbus-exit-on-close
+gdbus_exit_on_close_SOURCES = gdbus-exit-on-close.c $(gdbus_tests_sources) $(gdbus_sessionbus_sources)
-test_resources2.h test_resources2.c: test3.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test3.gresource.xml)
- $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate --c-name _g_test2 --manual-register $<
+test_programs += gdbus-non-socket
+gdbus_non_socket_SOURCES = \
+ gdbus-non-socket.c \
+ gdbus-tests.c \
+ gdbus-tests.h \
+ test-io-stream.c \
+ test-io-stream.h \
+ test-pipe-unix.c \
+ test-pipe-unix.h
-plugin_resources.c: test4.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test4.gresource.xml)
- $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $<
+# These three are manual-run tests because they need a session bus but don't bring one up themselves
+uninstalled_test_extra_programs += gdbus-example-objectmanager-client
+gdbus_example_objectmanager_client_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
-test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test.gresource.xml)
- $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $<
+uninstalled_test_extra_programs += gdbus-example-objectmanager-server
+gdbus_example_objectmanager_server_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
-if BUILDOPT_INSTALL_TESTS
-insttest_LTLIBRARIES = libresourceplugin.la
-else
-noinst_LTLIBRARIES = libresourceplugin.la
-endif
+uninstalled_test_extra_programs += gdbus-test-fixture
+gdbus_test_fixture_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
-libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
-libresourceplugin_la_LDFLAGS = -avoid-version -module $(no_undefined) -rpath $(insttestdir)
-libresourceplugin_la_LIBADD = $(LDADD)
-
-CLEANFILES = gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml test_resources2.[ch] plugin_resources.c
+# This is peer to peer so it doesn't need a session bus (so we can run it normally)
+test_programs += gdbus-peer
+gdbus_peer_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
-DISTCLEANFILES = \
- applications/mimeinfo.cache \
- org.gtk.test.enums.xml \
- de/LC_MESSAGES/test.mo \
- test.mo \
- test.gresource \
- test_resources.c \
- gsettings.store \
- gschemas.compiled \
- schema-source/gschemas.compiled
+# This test is currently unreliable
+test_extra_programs += gdbus-overflow
-distclean-local:
- rm -rf xdgdatahome xdgdatadir
+# -----------------------------------------------------------------------------
+# Test programs that need to bring up a session bus (requires dbus-daemon)
-test_files = \
- contexts.c \
- g-icon.c \
- file.c \
- enums.xml.template \
- testenum.h \
- org.gtk.test.gschema.xml \
- org.gtk.schemasourcecheck.gschema.xml \
- test.gresource \
+if HAVE_DBUS_DAEMON
+gdbus_sessionbus_sources = gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
+
+test_programs += \
+ gapplication \
+ actions \
+ gdbus-auth \
+ gdbus-connection \
+ gdbus-bz627724 \
+ gdbus-connection-loss \
+ gdbus-connection-slow \
+ gdbus-names \
+ gdbus-proxy \
+ gdbus-proxy-threads \
+ gdbus-proxy-well-known-name \
+ gdbus-introspection \
+ gdbus-threading \
+ gdbus-export \
+ gdbus-test-codegen \
+ gdbus-close-pending \
+ gdbus-error \
+ gmenumodel \
$(NULL)
-EXTRA_DIST += $(test_files)
-if BUILDOPT_INSTALL_TESTS
-insttest_PROGRAMS = $(test_progs) $(other_progs)
+gdbus_proxy_threads_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
+gapplication_SOURCES = $(gdbus_sessionbus_sources) gapplication.c
+actions_SOURCES = $(gdbus_sessionbus_sources) actions.c
+gdbus_auth_SOURCES = $(gdbus_sessionbus_sources) gdbus-auth.c
+gdbus_connection_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection.c
+gdbus_bz627724_SOURCES = $(gdbus_sessionbus_sources) gdbus-bz627724.c
+gdbus_connection_loss_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-loss.c
+gdbus_connection_slow_SOURCES = $(gdbus_sessionbus_sources) gdbus-connection-slow.c
+gdbus_names_SOURCES = $(gdbus_sessionbus_sources) gdbus-names.c
+gdbus_proxy_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy.c
+gdbus_proxy_threads_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-threads.c
+gdbus_proxy_well_known_name_SOURCES = $(gdbus_sessionbus_sources) gdbus-proxy-well-known-name.c
+gdbus_introspection_SOURCES = $(gdbus_sessionbus_sources) gdbus-introspection.c
+gdbus_threading_SOURCES = $(gdbus_sessionbus_sources) gdbus-threading.c
+gdbus_export_SOURCES = $(gdbus_sessionbus_sources) gdbus-export.c
+gdbus_error_SOURCES = $(gdbus_sessionbus_sources) gdbus-error.c
+gmenumodel_SOURCES = $(gdbus_sessionbus_sources) gmenumodel.c
+gdbus_close_pending_SOURCES = $(gdbus_sessionbus_sources) gdbus-close-pending.c
+gdbus_test_codegen_SOURCES = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
+nodist_gdbus_test_codegen_SOURCES = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
+
+gdbus-test-codegen.o: gdbus-test-codegen-generated.h
+gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
+ $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
+ UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
+ $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
+ --interface-prefix org.project. \
+ --generate-c-code gdbus-test-codegen-generated \
+ --c-generate-object-manager \
+ --c-namespace Foo_iGen \
+ --generate-docbook gdbus-test-codegen-generated-doc \
+ --annotate "org.project.Bar" Key1 Value1 \
+ --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
+ --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \
+ --annotate "org.project.Bar::TestSignal" Key4 Value4 \
+ --annotate "org.project.Bar:ay" Key5 Value5 \
+ --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \
+ --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \
+ --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
+ $(srcdir)/test-codegen.xml \
+ $(NULL)
+
+EXTRA_DIST += test-codegen.xml
+CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml
+endif # OS_UNIX
+endif # HAVE_DBUS_DAEMON
-schematestdir = $(insttestdir)/schema-tests
-schematest_DATA = $(schema_test_files)
+# -----------------------------------------------------------------------------
+
+if OS_WIN32
+test_programs += win32-streams
+endif
-certtestdir = $(insttestdir)/cert-tests
-certtest_DATA = $(cert_test_files)
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+endif
-testdatadir = $(insttestdir)
-testdata_DATA = $(test_files)
+if HAVE_DBUS1
+test_programs += gdbus-serialization
+gdbus_serialization_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
+gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
+gdbus_serialization_SOURCES = \
+ gdbus-serialization.c \
+ gdbus-tests.h \
+ gdbus-tests.c
+endif
-testmetadir = $(datadir)/installed-tests/$(PACKAGE)
-xfail_tests = desktop-app-info.test
-developer_only_tests = gsettings.test gdbus-overflow.test
-testmeta_DATA = $(filter-out $(xfail_tests) $(developer_only_tests),$(test_progs:=.test))
+# -----------------------------------------------------------------------------
+# The resources test is a bit more complicated...
-%.test: %$(EXEEXT) Makefile
- $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
- echo 'Type=session' >> $@.tmp; \
- echo 'Exec=$(pkglibexecdir)/installed-tests/$<' >> $@.tmp; \
- mv $@.tmp $@)
+test_programs += resources
+resources_SOURCES = resources.c
+nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
+resources_DEPENDENCIES = test.gresource
-%.desktop.insttest: %.desktop
- sed -e s,Exec=./appinfo-test,Exec=$(insttestdir)/appinfo-test, < $< >$@.tmp && mv $@.tmp $@
+test_ltlibraries += libresourceplugin.la
+libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
+libresourceplugin_la_LDFLAGS = -avoid-version -module -export-dynamic $(no_undefined)
+libresourceplugin_la_LIBADD = $(LDADD)
-installed_desktop_test_files = $(desktop_test_files:.desktop=.desktop.insttest)
-install-data-local: $(installed_desktop_test_files)
- for x in $(desktop_test_files); do \
- install -m 0644 $${x}.insttest $(DESTDIR)$(testdatadir)/$$x; \
- done
- install -d -m 0755 $(DESTDIR)$(testdatadir)/schema-tests
+# libtool contains a bug whereby the created .la file doesn't contain the correct dlname='' in the case that
+# you're building a library but not installing it. This is apparently because the only considered use for an
+# uninstalled library is as a convenience library for linking (despite the fact that we give -module). The lack
+# of dlname='' in the .la trips up libltdl and GModule as well. We can trick libtool into believing that we
+# will install the module by giving it a bogus -rpath for the uninstalled cases.
+#
+# See http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html
+if !ENABLE_INSTALLED_TESTS
+libresourceplugin_la_LDFLAGS += -rpath /
+endif
+if CROSS_COMPILING
+ glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
+else
+ glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
endif
+
+resources.o: test_resources2.h
+test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
+ $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $<
+
+test_resources2.h test_resources2.c: test3.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test3.gresource.xml)
+ $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate --c-name _g_test2 --manual-register $<
+
+plugin_resources.c: test4.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test4.gresource.xml)
+ $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $<
+
+test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test.gresource.xml)
+ $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $<
+
+EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
+
+CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c
index f077a369a..5f84cbd63 100644
--- a/gio/tests/appinfo.c
+++ b/gio/tests/appinfo.c
@@ -15,6 +15,12 @@ test_launch (void)
const gchar *path;
gchar *uri;
+ if (!g_getenv ("DISPLAY"))
+ {
+ g_printerr ("No DISPLAY. Skipping test. ");
+ return;
+ }
+
path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
g_assert (appinfo != NULL);
diff --git a/gio/tests/file.c b/gio/tests/file.c
index 86d00581d..c59a66013 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -91,7 +91,7 @@ test_type (void)
g_assert_cmpint (type, ==, G_FILE_TYPE_REGULAR);
g_object_unref (file);
- file = g_file_get_child (datapath_f, "schema-tests");
+ file = g_file_get_child (datapath_f, "cert-tests");
type = g_file_query_file_type (file, 0, NULL);
g_assert_cmpint (type, ==, G_FILE_TYPE_DIRECTORY);
diff --git a/gio/tests/gdbus-example-objectmanager-client.c b/gio/tests/gdbus-example-objectmanager-client.c
index a99399665..b235ca140 100644
--- a/gio/tests/gdbus-example-objectmanager-client.c
+++ b/gio/tests/gdbus-example-objectmanager-client.c
@@ -1,5 +1,5 @@
-#include "gdbus-example-objectmanager-generated.h"
+#include "gdbus-object-manager-example/gdbus-example-objectmanager-generated.h"
/* ---------------------------------------------------------------------------------------------------- */
diff --git a/gio/tests/gdbus-example-objectmanager-server.c b/gio/tests/gdbus-example-objectmanager-server.c
index 1233958b7..2a7bf63b6 100644
--- a/gio/tests/gdbus-example-objectmanager-server.c
+++ b/gio/tests/gdbus-example-objectmanager-server.c
@@ -1,5 +1,5 @@
-#include "gdbus-example-objectmanager-generated.h"
+#include "gdbus-object-manager-example/gdbus-example-objectmanager-generated.h"
/* ---------------------------------------------------------------------------------------------------- */
diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
index 6875210a6..d6d141289 100644
--- a/gio/tests/gdbus-object-manager-example/Makefile.am
+++ b/gio/tests/gdbus-object-manager-example/Makefile.am
@@ -1,24 +1,14 @@
-NULL =
-BUILT_SOURCES =
-CLEANFILES =
+include $(top_srcdir)/glib.mk
-include $(top_srcdir)/Makefile.decl
-
-AM_CPPFLAGS = \
- -g \
- $(gio_INCLUDES) \
- $(GLIB_DEBUG_FLAGS) \
- -I$(top_builddir)/gio \
- -I$(top_srcdir)/gio \
- -DSRCDIR=\""$(srcdir)"\"
+AM_CPPFLAGS = -g $(gio_INCLUDES) $(GLIB_DEBUG_FLAGS) -I$(top_builddir)/gio -I$(top_srcdir)/gio
# ------------------------------------------------------------------------
-GDBUS_GENERATED = \
- gdbus-example-objectmanager-generated.h \
- gdbus-example-objectmanager-generated.c \
+GDBUS_GENERATED = \
+ gdbus-example-objectmanager-generated.h \
+ gdbus-example-objectmanager-generated.c \
gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Animal.xml \
- gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml \
+ gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml \
$(NULL)
$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
@@ -33,11 +23,19 @@ $(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gi
$< \
$(NULL)
+test_ltlibraries = libgdbus-example-objectmanager.la
+
+if ENABLE_GTK_DOC
+# The docs pull these in, so we need them even if not doing 'make check'
BUILT_SOURCES += $(GDBUS_GENERATED)
+noinst_LTLIBRARIES += libgdbus-example-objectmanager.la
+endif
-noinst_LTLIBRARIES = libgdbus-example-objectmanager.la
-libgdbus_example_objectmanager_la_SOURCES = gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c
-libgdbus_example_objectmanager_la_LIBADD = \
+nodist_libgdbus_example_objectmanager_la_SOURCES = \
+ gdbus-example-objectmanager-generated.h \
+ gdbus-example-objectmanager-generated.c
+
+libgdbus_example_objectmanager_la_LIBADD = \
$(top_builddir)/glib/libglib-2.0.la \
$(top_builddir)/gobject/libgobject-2.0.la \
$(top_builddir)/gmodule/libgmodule-2.0.la \
@@ -47,4 +45,3 @@ libgdbus_example_objectmanager_la_LIBADD = \
EXTRA_DIST += gdbus-example-objectmanager.xml
CLEANFILES += $(GDBUS_GENERATED)
-
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index d85e94821..dba892b6b 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -53,7 +53,7 @@
#include "gdbus-tests.h"
-#include "gdbus-example-objectmanager-generated.h"
+#include "gdbus-object-manager-example/gdbus-example-objectmanager-generated.h"
#ifdef G_OS_UNIX
static gboolean is_unix = TRUE;
diff --git a/gio/tests/gdbus-test-fixture.c b/gio/tests/gdbus-test-fixture.c
index a4403dd72..1e0a3223c 100644
--- a/gio/tests/gdbus-test-fixture.c
+++ b/gio/tests/gdbus-test-fixture.c
@@ -1,5 +1,5 @@
-#include "gdbus-example-objectmanager-generated.h"
+#include "gdbus-object-manager-example/gdbus-example-objectmanager-generated.h"
/* ---------------------------------------------------------------------------------------------------- */
diff --git a/gio/tests/gschema-compile.c b/gio/tests/gschema-compile.c
index aa83731f8..b687ab431 100644
--- a/gio/tests/gschema-compile.c
+++ b/gio/tests/gschema-compile.c
@@ -107,14 +107,14 @@ static const SchemaTest tests[] = {
{ "range-parse-error", NULL, "*invalid character in number*" },
{ "from-docs", NULL, NULL },
{ "extending", NULL, NULL },
- { "extend-missing", NULL, "*extends not-yet-existing schema*" },
+ { "extend-missing", NULL, "*extends not yet existing schema*" },
{ "extend-nonlist", NULL, "*which is not a list*" },
- { "extend-self", NULL, "*not-yet-existing*" },
+ { "extend-self", NULL, "*not yet existing*" },
{ "extend-wrong-list-indirect", NULL, "*'y' does not extend 'x'*" },
{ "extend-wrong-list", NULL, "*'y' does not extend 'x'*" },
{ "key-in-list-indirect", NULL, "*cannot add keys to a 'list*" },
{ "key-in-list", NULL, "*cannot add keys to a 'list*" },
- { "list-of-missing", NULL, "*is list of not-yet-existing schema*" },
+ { "list-of-missing", NULL, "*is list of not yet existing schema*" },
{ "extend-and-shadow", NULL, "*shadows*use <override>*" },
{ "extend-and-shadow-indirect", NULL, "*shadows*use <override>*" },
{ "override", NULL, NULL },
diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
index 922eea262..20967f463 100644
--- a/gio/tests/gsettings.c
+++ b/gio/tests/gsettings.c
@@ -660,14 +660,20 @@ test_l10n (void)
str = NULL;
setlocale (LC_MESSAGES, "de_DE");
- str = g_settings_get_string (settings, "error-message");
- setlocale (LC_MESSAGES, locale);
+ /* Only do the test if translation is actually working... */
+ if (g_str_equal (dgettext ("test", "\"Unnamed\""), "\"Unbenannt\""))
+ {
+ str = g_settings_get_string (settings, "error-message");
- g_assert_cmpstr (str, ==, "Unbenannt");
- g_object_unref (settings);
- g_free (str);
- str = NULL;
+ g_assert_cmpstr (str, ==, "Unbenannt");
+ g_object_unref (settings);
+ g_free (str);
+ str = NULL;
+ }
+ else
+ g_printerr ("warning: translation is not working... skipping test. ");
+ setlocale (LC_MESSAGES, locale);
g_free (locale);
}
@@ -701,14 +707,20 @@ test_l10n_context (void)
str = NULL;
setlocale (LC_MESSAGES, "de_DE");
- g_settings_get (settings, "backspace", "s", &str);
- setlocale (LC_MESSAGES, locale);
+ /* Only do the test if translation is actually working... */
+ if (g_str_equal (dgettext ("test", "\"Unnamed\""), "\"Unbenannt\""))
+ {
+ g_settings_get (settings, "backspace", "s", &str);
- g_assert_cmpstr (str, ==, "Löschen");
- g_object_unref (settings);
- g_free (str);
- str = NULL;
+ g_assert_cmpstr (str, ==, "Löschen");
+ g_object_unref (settings);
+ g_free (str);
+ str = NULL;
+ }
+ else
+ g_printerr ("warning: translation is not working... skipping test. ");
+ setlocale (LC_MESSAGES, locale);
g_free (locale);
}
@@ -1578,24 +1590,6 @@ test_child_schema (void)
g_object_unref (settings);
}
-static gboolean
-glib_translations_work (void)
-{
- gboolean works;
- gchar *locale;
- gchar *orig = "Unnamed";
-
- locale = g_strdup (setlocale (LC_MESSAGES, NULL));
- if (!setlocale (LC_MESSAGES, "de"))
- works = FALSE;
- else
- works = dgettext ("glib20", orig) != orig;
- setlocale (LC_MESSAGES, locale);
- g_free (locale);
-
- return works;
-}
-
#include "../strinfo.c"
static void
@@ -2316,11 +2310,8 @@ main (int argc, char *argv[])
g_test_add_func ("/gsettings/complex-types", test_complex_types);
g_test_add_func ("/gsettings/changes", test_changes);
- if (glib_translations_work ())
- {
- g_test_add_func ("/gsettings/l10n", test_l10n);
- g_test_add_func ("/gsettings/l10n-context", test_l10n_context);
- }
+ g_test_add_func ("/gsettings/l10n", test_l10n);
+ g_test_add_func ("/gsettings/l10n-context", test_l10n_context);
g_test_add_func ("/gsettings/delay-apply", test_delay_apply);
g_test_add_func ("/gsettings/delay-revert", test_delay_revert);
diff --git a/gio/win32/Makefile.am b/gio/win32/Makefile.am
index b75bc36de..a48c68f03 100644
--- a/gio/win32/Makefile.am
+++ b/gio/win32/Makefile.am
@@ -1,8 +1,6 @@
-include $(top_srcdir)/Makefile.decl
+include $(top_srcdir)/glib.mk
-NULL =
-
-noinst_LTLIBRARIES = libgiowin32.la
+noinst_LTLIBRARIES += libgiowin32.la
libgiowin32_la_SOURCES = \
gwin32directorymonitor.c \
diff --git a/gio/xdgmime/Makefile.am b/gio/xdgmime/Makefile.am
index fa39d05e5..42348a6ab 100644
--- a/gio/xdgmime/Makefile.am
+++ b/gio/xdgmime/Makefile.am
@@ -1,8 +1,8 @@
-include $(top_srcdir)/Makefile.decl
+include $(top_srcdir)/glib.mk
AM_CPPFLAGS = -DXDG_PREFIX=_gio_xdg
-noinst_LTLIBRARIES = libxdgmime.la
+noinst_LTLIBRARIES += libxdgmime.la
libxdgmime_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
libxdgmime_la_SOURCES = \