summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
blob: 48899ce85260208fdf446e18a1719896e5d59fb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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

Upstream disables a few tests while cross-compiling because their build requires
running other built binaries. This usually makes sense but in the cross-compile
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/meson.build | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

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'
 
   #  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
 
-if not meson.is_cross_build() or meson.has_exe_wrapper()
+if meson.is_cross_build()
 
   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)
 
-  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(),