1From 1f3c05529c0c9032ae0a289fb1f088b7541fc9b0 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 9 Nov 2015 11:07:27 +0200
4Subject: [PATCH] Enable more tests while cross-compiling
5
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>
12
13---
14 gio/tests/meson.build | 24 ++++++++++++------------
15 1 file changed, 12 insertions(+), 12 deletions(-)
16
17diff --git a/gio/tests/meson.build b/gio/tests/meson.build
18index 3ed23a5..5df932a 100644
19--- a/gio/tests/meson.build
20+++ b/gio/tests/meson.build
21@@ -253,7 +253,7 @@ if host_machine.system() != 'windows'
22     }
23   endif
24
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',
30@@ -603,14 +603,14 @@ if installed_tests_enabled
31   endforeach
32 endif
33
34-if not meson.is_cross_build() or meson.has_exe_wrapper()
35+if meson.is_cross_build()
36
37   compiler_type = '--compiler=@0@'.format(cc.get_id())
38
39   plugin_resources_c = custom_target('plugin-resources.c',
40     input : 'test4.gresource.xml',
41     output : 'plugin-resources.c',
42-    command : [glib_compile_resources,
43+    command : ['glib-compile-resources',
44                compiler_type,
45                '--target=@OUTPUT@',
46                '--sourcedir=' + meson.current_source_dir(),
47@@ -636,7 +636,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
48   test_gresource = custom_target('test.gresource',
49     input : 'test.gresource.xml',
50     output : 'test.gresource',
51-    command : [glib_compile_resources,
52+    command : ['glib-compile-resources',
53                compiler_type,
54                '--target=@OUTPUT@',
55                '--sourcedir=' + meson.current_source_dir(),
56@@ -649,7 +649,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
57   test_resources2_c = custom_target('test_resources2.c',
58     input : 'test3.gresource.xml',
59     output : 'test_resources2.c',
60-    command : [glib_compile_resources,
61+    command : ['glib-compile-resources',
62                compiler_type,
63                '--target=@OUTPUT@',
64                '--sourcedir=' + meson.current_source_dir(),
65@@ -662,7 +662,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
66   test_resources2_h = custom_target('test_resources2.h',
67     input : 'test3.gresource.xml',
68     output : 'test_resources2.h',
69-    command : [glib_compile_resources,
70+    command : ['glib-compile-resources',
71                compiler_type,
72                '--target=@OUTPUT@',
73                '--sourcedir=' + meson.current_source_dir(),
74@@ -676,7 +676,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
75     input : 'test2.gresource.xml',
76     depends : big_test_resource,
77     output : 'test_resources.c',
78-    command : [glib_compile_resources,
79+    command : ['glib-compile-resources',
80                compiler_type,
81                '--target=@OUTPUT@',
82                '--sourcedir=' + meson.current_source_dir(),
83@@ -689,7 +689,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
84   digit_test_resources_c = custom_target('digit_test_resources.c',
85     input : '111_digit_test.gresource.xml',
86     output : 'digit_test_resources.c',
87-    command : [glib_compile_resources,
88+    command : ['glib-compile-resources',
89                compiler_type,
90                '--target=@OUTPUT@',
91                '--sourcedir=' + meson.current_source_dir(),
92@@ -702,7 +702,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
93   digit_test_resources_h = custom_target('digit_test_resources.h',
94     input : '111_digit_test.gresource.xml',
95     output : 'digit_test_resources.h',
96-    command : [glib_compile_resources,
97+    command : ['glib-compile-resources',
98                compiler_type,
99                '--target=@OUTPUT@',
100                '--sourcedir=' + meson.current_source_dir(),
101@@ -744,11 +744,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
102
103   ld = find_program('ld', required : false)
104
105-  if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
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                  compiler_type,
113                  '--target=@OUTPUT@',
114                  '--sourcedir=' + meson.current_source_dir(),
115@@ -762,7 +762,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                  compiler_type,
122                  '--target=@OUTPUT@',
123                  '--sourcedir=' + meson.current_source_dir(),
124