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 | 126 |
1 files changed, 56 insertions, 70 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 5ccd3203fb..ff2629f06c 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 @@ | |||
1 | From 1481c6d5f08f9dbbe10abc87b372a1f61db36476 Mon Sep 17 00:00:00 2001 | 1 | From 23cd157352ac8a53f992ddc6d6d01caadf1c79bc Mon Sep 17 00:00:00 2001 |
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | 2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> |
3 | Date: Mon, 9 Nov 2015 11:07:27 +0200 | 3 | Date: Mon, 9 Nov 2015 11:07:27 +0200 |
4 | Subject: [PATCH] Enable more tests while cross-compiling | 4 | Subject: [PATCH] Enable more tests while cross-compiling |
@@ -9,54 +9,16 @@ case we can depend on glib-2.0-native. | |||
9 | 9 | ||
10 | Upstream-Status: Inappropriate [OE specific] | 10 | Upstream-Status: Inappropriate [OE specific] |
11 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | 11 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> |
12 | |||
12 | --- | 13 | --- |
13 | gio/tests/Makefile.am | 10 ++++++---- | 14 | gio/tests/meson.build | 26 ++++++++++++++------------ |
14 | gio/tests/meson.build | 15 ++++++++------- | 15 | 1 file changed, 14 insertions(+), 12 deletions(-) |
15 | tests/gobject/Makefile.am | 6 ++++++ | ||
16 | 3 files changed, 20 insertions(+), 11 deletions(-) | ||
17 | 16 | ||
18 | diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am | ||
19 | index c4e7a92..633e85c 100644 | ||
20 | --- a/gio/tests/Makefile.am | ||
21 | +++ b/gio/tests/Makefile.am | ||
22 | @@ -583,10 +583,9 @@ test_programs += \ | ||
23 | endif | ||
24 | |||
25 | # ----------------------------------------------------------------------------- | ||
26 | -# The resources test is a bit more complicated, and we cannot build it when | ||
27 | -# cross-compiling GIO because it requires running a binary... | ||
28 | +# The resources test is a bit more complicated, and requires glib-native | ||
29 | +# for running a binary | ||
30 | |||
31 | -if !CROSS_COMPILING | ||
32 | test_programs += resources | ||
33 | resources_SOURCES = resources.c | ||
34 | nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h | ||
35 | @@ -611,7 +610,11 @@ if !ENABLE_INSTALLED_TESTS | ||
36 | libresourceplugin_la_LDFLAGS += -rpath / | ||
37 | endif | ||
38 | |||
39 | +if !CROSS_COMPILING | ||
40 | glib_compile_resources=$(top_builddir)/gio/glib-compile-resources | ||
41 | +else | ||
42 | +glib_compile_resources=glib-compile-resources | ||
43 | +endif | ||
44 | |||
45 | test-generated.txt: test1.txt | ||
46 | $(AM_V_GEN) echo "Generated" > $@ && \ | ||
47 | @@ -632,7 +635,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) -- | ||
48 | |||
49 | EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml | ||
50 | CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource | ||
51 | -endif # !CROSS_COMPILING | ||
52 | |||
53 | BUILT_SOURCES += giotypefuncs.inc | ||
54 | |||
55 | diff --git a/gio/tests/meson.build b/gio/tests/meson.build | 17 | diff --git a/gio/tests/meson.build b/gio/tests/meson.build |
56 | index dca33bd..181f5c7 100644 | 18 | index 65f43e2..028b196 100644 |
57 | --- a/gio/tests/meson.build | 19 | --- a/gio/tests/meson.build |
58 | +++ b/gio/tests/meson.build | 20 | +++ b/gio/tests/meson.build |
59 | @@ -173,7 +173,7 @@ if host_machine.system() != 'windows' | 21 | @@ -185,7 +185,7 @@ if host_machine.system() != 'windows' |
60 | 22 | ||
61 | # Test programs that need to bring up a session bus (requires dbus-daemon) | 23 | # Test programs that need to bring up a session bus (requires dbus-daemon) |
62 | have_dbus_daemon = find_program('dbus-daemon', required : false).found() | 24 | have_dbus_daemon = find_program('dbus-daemon', required : false).found() |
@@ -65,8 +27,8 @@ index dca33bd..181f5c7 100644 | |||
65 | annotate_args = [ | 27 | annotate_args = [ |
66 | '--annotate', 'org.project.Bar', 'Key1', 'Value1', | 28 | '--annotate', 'org.project.Bar', 'Key1', 'Value1', |
67 | '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2', | 29 | '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2', |
68 | @@ -406,12 +406,13 @@ if installed_tests_enabled | 30 | @@ -453,12 +453,13 @@ if installed_tests_enabled |
69 | install_subdir('cert-tests', install_dir : installed_tests_execdir) | 31 | install_data('static-link.py', install_dir : installed_tests_execdir) |
70 | endif | 32 | endif |
71 | 33 | ||
72 | -if not meson.is_cross_build() or meson.has_exe_wrapper() | 34 | -if not meson.is_cross_build() or meson.has_exe_wrapper() |
@@ -81,7 +43,7 @@ index dca33bd..181f5c7 100644 | |||
81 | '--target=@OUTPUT@', | 43 | '--target=@OUTPUT@', |
82 | '--sourcedir=' + meson.current_source_dir(), | 44 | '--sourcedir=' + meson.current_source_dir(), |
83 | '--generate-source', | 45 | '--generate-source', |
84 | @@ -428,7 +429,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() | 46 | @@ -482,7 +483,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
85 | test_gresource = custom_target('test.gresource', | 47 | test_gresource = custom_target('test.gresource', |
86 | input : 'test.gresource.xml', | 48 | input : 'test.gresource.xml', |
87 | output : 'test.gresource', | 49 | output : 'test.gresource', |
@@ -90,7 +52,7 @@ index dca33bd..181f5c7 100644 | |||
90 | '--target=@OUTPUT@', | 52 | '--target=@OUTPUT@', |
91 | '--sourcedir=' + meson.current_source_dir(), | 53 | '--sourcedir=' + meson.current_source_dir(), |
92 | '--sourcedir=' + meson.current_build_dir(), | 54 | '--sourcedir=' + meson.current_build_dir(), |
93 | @@ -439,7 +440,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() | 55 | @@ -493,7 +494,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
94 | test_resources2_c = custom_target('test_resources2.c', | 56 | test_resources2_c = custom_target('test_resources2.c', |
95 | input : 'test3.gresource.xml', | 57 | input : 'test3.gresource.xml', |
96 | output : 'test_resources2.c', | 58 | output : 'test_resources2.c', |
@@ -99,7 +61,7 @@ index dca33bd..181f5c7 100644 | |||
99 | '--target=@OUTPUT@', | 61 | '--target=@OUTPUT@', |
100 | '--sourcedir=' + meson.current_source_dir(), | 62 | '--sourcedir=' + meson.current_source_dir(), |
101 | '--generate', | 63 | '--generate', |
102 | @@ -450,7 +451,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() | 64 | @@ -504,7 +505,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
103 | test_resources2_h = custom_target('test_resources2.h', | 65 | test_resources2_h = custom_target('test_resources2.h', |
104 | input : 'test3.gresource.xml', | 66 | input : 'test3.gresource.xml', |
105 | output : 'test_resources2.h', | 67 | output : 'test_resources2.h', |
@@ -108,30 +70,54 @@ index dca33bd..181f5c7 100644 | |||
108 | '--target=@OUTPUT@', | 70 | '--target=@OUTPUT@', |
109 | '--sourcedir=' + meson.current_source_dir(), | 71 | '--sourcedir=' + meson.current_source_dir(), |
110 | '--generate', | 72 | '--generate', |
111 | @@ -461,7 +462,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() | 73 | @@ -516,7 +517,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
112 | test_resources_c = custom_target('test_resources.c', | ||
113 | input : 'test2.gresource.xml', | 74 | input : 'test2.gresource.xml', |
75 | depends : big_test_resource, | ||
114 | output : 'test_resources.c', | 76 | output : 'test_resources.c', |
115 | - command : [glib_compile_resources, | 77 | - command : [glib_compile_resources, |
116 | + command : ['glib-compile-resources', | 78 | + command : ['glib-compile-resources', |
117 | '--target=@OUTPUT@', | 79 | '--target=@OUTPUT@', |
118 | '--sourcedir=' + meson.current_source_dir(), | 80 | '--sourcedir=' + meson.current_source_dir(), |
119 | '--generate-source', | 81 | '--sourcedir=' + meson.current_build_dir(), |
120 | diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am | 82 | @@ -527,7 +528,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
121 | index 1bcefbe..77e646a 100644 | 83 | digit_test_resources_c = custom_target('digit_test_resources.c', |
122 | --- a/tests/gobject/Makefile.am | 84 | input : '111_digit_test.gresource.xml', |
123 | +++ b/tests/gobject/Makefile.am | 85 | output : 'digit_test_resources.c', |
124 | @@ -51,7 +51,13 @@ if ENABLE_TIMELOOP | 86 | - command : [glib_compile_resources, |
125 | installed_test_programs += timeloop-closure | 87 | + command : ['glib-compile-resources', |
126 | endif | 88 | '--target=@OUTPUT@', |
127 | 89 | '--sourcedir=' + meson.current_source_dir(), | |
128 | +# The marshal test requires running a binary, which means we require | 90 | '--sourcedir=' + meson.current_build_dir(), |
129 | +# glib-native when cross-compiling | 91 | @@ -538,7 +539,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
130 | +if !CROSS_COMPILING | 92 | digit_test_resources_h = custom_target('digit_test_resources.h', |
131 | glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal | 93 | input : '111_digit_test.gresource.xml', |
132 | +else | 94 | output : 'digit_test_resources.h', |
133 | +glib_genmarshal=$(shell which glib-genmarshal) | 95 | - command : [glib_compile_resources, |
134 | +endif | 96 | + command : ['glib-compile-resources', |
135 | 97 | '--target=@OUTPUT@', | |
136 | testmarshal.h: stamp-testmarshal.h | 98 | '--sourcedir=' + meson.current_source_dir(), |
137 | @true | 99 | '--generate', |
100 | @@ -565,11 +566,12 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() | ||
101 | # Support for --add-symbol was added to LLVM objcopy in 2019 | ||
102 | # (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for | ||
103 | # LLVM once that support is in a stable release. | ||
104 | - if build_machine.system() == 'linux' and cc.get_id() == 'gcc' | ||
105 | + #if build_machine.system() == 'linux' and cc.get_id() == 'gcc' | ||
106 | + if not meson.is_cross_build() | ||
107 | test_gresource_binary = custom_target('test5.gresource', | ||
108 | input : 'test5.gresource.xml', | ||
109 | output : 'test5.gresource', | ||
110 | - command : [glib_compile_resources, | ||
111 | + command : ['glib-compile-resources', | ||
112 | '--target=@OUTPUT@', | ||
113 | '--sourcedir=' + meson.current_source_dir(), | ||
114 | '--sourcedir=' + meson.current_build_dir(), | ||
115 | @@ -581,7 +583,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() | ||
116 | test_resources_binary_c = custom_target('test_resources_binary.c', | ||
117 | input : 'test5.gresource.xml', | ||
118 | output : 'test_resources_binary.c', | ||
119 | - command : [glib_compile_resources, | ||
120 | + command : ['glib-compile-resources', | ||
121 | '--target=@OUTPUT@', | ||
122 | '--sourcedir=' + meson.current_source_dir(), | ||
123 | '--sourcedir=' + meson.current_build_dir(), | ||