diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch | 168 |
1 files changed, 104 insertions, 64 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch index 9b4ded14d5..48899ce852 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch +++ b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch @@ -1,4 +1,4 @@ -From 310dfe1bdd16d4b254732fcc202c6211629bc7b6 Mon Sep 17 00:00:00 2001 +From 0061d66057dfd7e7267772df60b36474fb180eed Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen <jussi.kukkonen@intel.com> Date: Mon, 9 Nov 2015 11:07:27 +0200 Subject: [PATCH] Enable more tests while cross-compiling @@ -9,73 +9,113 @@ case we can depend on glib-2.0-native. Upstream-Status: Inappropriate [OE specific] Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> + --- - gio/tests/Makefile.am | 8 +++----- - tests/gobject/Makefile.am | 8 +++----- - 2 files changed, 6 insertions(+), 10 deletions(-) + gio/tests/meson.build | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) -diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am -index 868873f..533e454 100644 ---- a/gio/tests/Makefile.am -+++ b/gio/tests/Makefile.am -@@ -503,10 +503,9 @@ test_programs += \ - endif - - # ----------------------------------------------------------------------------- --# The resources test is a bit more complicated, and we cannot build it when --# cross-compiling GIO because it requires running a binary... -+# The resources test is a bit more complicated, and requires glib-native -+# for running a binary - --if !CROSS_COMPILING - test_programs += resources - resources_SOURCES = resources.c - nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h -@@ -528,7 +527,11 @@ if !ENABLE_INSTALLED_TESTS - libresourceplugin_la_LDFLAGS += -rpath / - endif - -+if !CROSS_COMPILING - glib_compile_resources=$(top_builddir)/gio/glib-compile-resources -+else -+glib_compile_resources=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) -@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) -- - - EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml - CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource --endif # !CROSS_COMPILING - - BUILT_SOURCES += giotypefuncs.c +diff --git a/gio/tests/meson.build b/gio/tests/meson.build +index 382dfcc..c171717 100644 +--- a/gio/tests/meson.build ++++ b/gio/tests/meson.build +@@ -191,7 +191,7 @@ if host_machine.system() != 'windows' -diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am -index 16f2827..4c2208e 100644 ---- a/tests/gobject/Makefile.am -+++ b/tests/gobject/Makefile.am -@@ -48,10 +48,13 @@ if ENABLE_TIMELOOP - installed_test_programs += timeloop-closure + # Test programs that need to bring up a session bus (requires dbus-daemon) + have_dbus_daemon = find_program('dbus-daemon', required : false).found() +- if have_dbus_daemon ++ if true + annotate_args = [ + '--annotate', 'org.project.Bar', 'Key1', 'Value1', + '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2', +@@ -465,12 +465,12 @@ if installed_tests_enabled + install_data('static-link.py', install_dir : installed_tests_execdir) endif --# The marshal test requires running a binary, which means we cannot --# build it when cross-compiling -+# The marshal test requires running a binary, which means we require -+# glib-native when cross-compiling - if !CROSS_COMPILING - glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal -+else -+glib_genmarshal=$(shell which glib-genmarshal) -+endif +-if not meson.is_cross_build() or meson.has_exe_wrapper() ++if meson.is_cross_build() - testmarshal.h: stamp-testmarshal.h - @true -@@ -69,7 +72,6 @@ BUILT_SOURCES += testmarshal.h testmarshal.c - CLEANFILES += stamp-testmarshal.h - EXTRA_DIST += testcommon.h testmarshal.list - BUILT_EXTRA_DIST += testmarshal.h testmarshal.c --endif # !CROSS_COMPILING + plugin_resources_c = custom_target('plugin-resources.c', + input : 'test4.gresource.xml', + output : 'plugin-resources.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--generate-source', +@@ -494,7 +494,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + test_gresource = custom_target('test.gresource', + input : 'test.gresource.xml', + output : 'test.gresource', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), +@@ -505,7 +505,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + test_resources2_c = custom_target('test_resources2.c', + input : 'test3.gresource.xml', + output : 'test_resources2.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--generate', +@@ -516,7 +516,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + test_resources2_h = custom_target('test_resources2.h', + input : 'test3.gresource.xml', + output : 'test_resources2.h', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--generate', +@@ -528,7 +528,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + input : 'test2.gresource.xml', + depends : big_test_resource, + output : 'test_resources.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), +@@ -539,7 +539,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + digit_test_resources_c = custom_target('digit_test_resources.c', + input : '111_digit_test.gresource.xml', + output : 'digit_test_resources.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), +@@ -550,7 +550,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + digit_test_resources_h = custom_target('digit_test_resources.h', + input : '111_digit_test.gresource.xml', + output : 'digit_test_resources.h', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--generate', +@@ -579,11 +579,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + # LLVM once that support is in a stable release. + objcopy = find_program('objcopy', required : false) - dist-hook: $(BUILT_EXTRA_DIST) - files='$(BUILT_EXTRA_DIST)'; \ +- if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found() ++ if not meson.is_cross_build() + test_gresource_binary = custom_target('test5.gresource', + input : 'test5.gresource.xml', + output : 'test5.gresource', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), +@@ -595,7 +595,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + test_resources_binary_c = custom_target('test_resources_binary.c', + input : 'test5.gresource.xml', + output : 'test_resources_binary.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), |