blob: ff2629f06c852647835ac91884e6583976226d9b [file] [log] [blame]
Brad Bishop15ae2502019-06-18 21:44:24 -04001From 23cd157352ac8a53f992ddc6d6d01caadf1c79bc Mon Sep 17 00:00:00 2001
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 9 Nov 2015 11:07:27 +0200
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08004Subject: [PATCH] Enable more tests while cross-compiling
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05005
6Upstream disables a few tests while cross-compiling because their build requires
7running other built binaries. This usually makes sense but in the cross-compile
8case we can depend on glib-2.0-native.
9
10Upstream-Status: Inappropriate [OE specific]
11Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050012
Brad Bishop15ae2502019-06-18 21:44:24 -040013---
14 gio/tests/meson.build | 26 ++++++++++++++------------
15 1 file changed, 14 insertions(+), 12 deletions(-)
16
Brad Bishop19323692019-04-05 15:28:33 -040017diff --git a/gio/tests/meson.build b/gio/tests/meson.build
Brad Bishop15ae2502019-06-18 21:44:24 -040018index 65f43e2..028b196 100644
Brad Bishop19323692019-04-05 15:28:33 -040019--- a/gio/tests/meson.build
20+++ b/gio/tests/meson.build
Brad Bishop15ae2502019-06-18 21:44:24 -040021@@ -185,7 +185,7 @@ if host_machine.system() != 'windows'
Brad Bishop19323692019-04-05 15:28:33 -040022
23 # Test programs that need to bring up a session bus (requires dbus-daemon)
24 have_dbus_daemon = find_program('dbus-daemon', required : false).found()
25- if have_dbus_daemon
26+ if true
27 annotate_args = [
28 '--annotate', 'org.project.Bar', 'Key1', 'Value1',
29 '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
Brad Bishop15ae2502019-06-18 21:44:24 -040030@@ -453,12 +453,13 @@ if installed_tests_enabled
31 install_data('static-link.py', install_dir : installed_tests_execdir)
Brad Bishop19323692019-04-05 15:28:33 -040032 endif
33
34-if not meson.is_cross_build() or meson.has_exe_wrapper()
35+#if not meson.is_cross_build() or meson.has_exe_wrapper()
36+if meson.is_cross_build()
37
38 plugin_resources_c = custom_target('plugin-resources.c',
39 input : 'test4.gresource.xml',
40 output : 'plugin-resources.c',
41- command : [glib_compile_resources,
42+ command : ['glib-compile-resources',
43 '--target=@OUTPUT@',
44 '--sourcedir=' + meson.current_source_dir(),
45 '--generate-source',
Brad Bishop15ae2502019-06-18 21:44:24 -040046@@ -482,7 +483,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040047 test_gresource = custom_target('test.gresource',
48 input : 'test.gresource.xml',
49 output : 'test.gresource',
50- command : [glib_compile_resources,
51+ command : ['glib-compile-resources',
52 '--target=@OUTPUT@',
53 '--sourcedir=' + meson.current_source_dir(),
54 '--sourcedir=' + meson.current_build_dir(),
Brad Bishop15ae2502019-06-18 21:44:24 -040055@@ -493,7 +494,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040056 test_resources2_c = custom_target('test_resources2.c',
57 input : 'test3.gresource.xml',
58 output : 'test_resources2.c',
59- command : [glib_compile_resources,
60+ command : ['glib-compile-resources',
61 '--target=@OUTPUT@',
62 '--sourcedir=' + meson.current_source_dir(),
63 '--generate',
Brad Bishop15ae2502019-06-18 21:44:24 -040064@@ -504,7 +505,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040065 test_resources2_h = custom_target('test_resources2.h',
66 input : 'test3.gresource.xml',
67 output : 'test_resources2.h',
68- command : [glib_compile_resources,
69+ command : ['glib-compile-resources',
70 '--target=@OUTPUT@',
71 '--sourcedir=' + meson.current_source_dir(),
72 '--generate',
Brad Bishop15ae2502019-06-18 21:44:24 -040073@@ -516,7 +517,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040074 input : 'test2.gresource.xml',
Brad Bishop15ae2502019-06-18 21:44:24 -040075 depends : big_test_resource,
Brad Bishop19323692019-04-05 15:28:33 -040076 output : 'test_resources.c',
77- command : [glib_compile_resources,
78+ command : ['glib-compile-resources',
79 '--target=@OUTPUT@',
80 '--sourcedir=' + meson.current_source_dir(),
Brad Bishop15ae2502019-06-18 21:44:24 -040081 '--sourcedir=' + meson.current_build_dir(),
82@@ -527,7 +528,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
83 digit_test_resources_c = custom_target('digit_test_resources.c',
84 input : '111_digit_test.gresource.xml',
85 output : 'digit_test_resources.c',
86- command : [glib_compile_resources,
87+ command : ['glib-compile-resources',
88 '--target=@OUTPUT@',
89 '--sourcedir=' + meson.current_source_dir(),
90 '--sourcedir=' + meson.current_build_dir(),
91@@ -538,7 +539,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
92 digit_test_resources_h = custom_target('digit_test_resources.h',
93 input : '111_digit_test.gresource.xml',
94 output : 'digit_test_resources.h',
95- command : [glib_compile_resources,
96+ command : ['glib-compile-resources',
97 '--target=@OUTPUT@',
98 '--sourcedir=' + meson.current_source_dir(),
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(),