blob: 9bbb33ffc16c251233dbe36e67ddf10948778188 [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001From 73b1c416674d285b021e218da1a3ddb884e606da 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---
Andrew Geissler82c905d2020-04-13 13:39:40 -050014 gio/tests/meson.build | 24 ++++++++++++------------
15 1 file changed, 12 insertions(+), 12 deletions(-)
Brad Bishop15ae2502019-06-18 21:44:24 -040016
Brad Bishop19323692019-04-05 15:28:33 -040017diff --git a/gio/tests/meson.build b/gio/tests/meson.build
Andrew Geisslereff27472021-10-29 15:35:00 -050018index 5dbfb8e..3fd7998 100644
Brad Bishop19323692019-04-05 15:28:33 -040019--- a/gio/tests/meson.build
20+++ b/gio/tests/meson.build
Andrew Geisslereff27472021-10-29 15:35:00 -050021@@ -221,7 +221,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',
Andrew Geisslereff27472021-10-29 15:35:00 -050030@@ -570,12 +570,12 @@ if installed_tests_enabled
Andrew Geissler4b740dc2020-05-05 08:54:39 -050031 endforeach
Brad Bishop19323692019-04-05 15:28:33 -040032 endif
33
34-if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040035+if meson.is_cross_build()
36
37 plugin_resources_c = custom_target('plugin-resources.c',
38 input : 'test4.gresource.xml',
39 output : 'plugin-resources.c',
40- command : [glib_compile_resources,
41+ command : ['glib-compile-resources',
42 '--target=@OUTPUT@',
43 '--sourcedir=' + meson.current_source_dir(),
44 '--generate-source',
Andrew Geisslereff27472021-10-29 15:35:00 -050045@@ -599,7 +599,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040046 test_gresource = custom_target('test.gresource',
47 input : 'test.gresource.xml',
48 output : 'test.gresource',
49- command : [glib_compile_resources,
50+ command : ['glib-compile-resources',
51 '--target=@OUTPUT@',
52 '--sourcedir=' + meson.current_source_dir(),
53 '--sourcedir=' + meson.current_build_dir(),
Andrew Geisslereff27472021-10-29 15:35:00 -050054@@ -610,7 +610,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040055 test_resources2_c = custom_target('test_resources2.c',
56 input : 'test3.gresource.xml',
57 output : 'test_resources2.c',
58- command : [glib_compile_resources,
59+ command : ['glib-compile-resources',
60 '--target=@OUTPUT@',
61 '--sourcedir=' + meson.current_source_dir(),
62 '--generate',
Andrew Geisslereff27472021-10-29 15:35:00 -050063@@ -621,7 +621,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040064 test_resources2_h = custom_target('test_resources2.h',
65 input : 'test3.gresource.xml',
66 output : 'test_resources2.h',
67- command : [glib_compile_resources,
68+ command : ['glib-compile-resources',
69 '--target=@OUTPUT@',
70 '--sourcedir=' + meson.current_source_dir(),
71 '--generate',
Andrew Geisslereff27472021-10-29 15:35:00 -050072@@ -633,7 +633,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040073 input : 'test2.gresource.xml',
Brad Bishop15ae2502019-06-18 21:44:24 -040074 depends : big_test_resource,
Brad Bishop19323692019-04-05 15:28:33 -040075 output : 'test_resources.c',
76- command : [glib_compile_resources,
77+ command : ['glib-compile-resources',
78 '--target=@OUTPUT@',
79 '--sourcedir=' + meson.current_source_dir(),
Brad Bishop15ae2502019-06-18 21:44:24 -040080 '--sourcedir=' + meson.current_build_dir(),
Andrew Geisslereff27472021-10-29 15:35:00 -050081@@ -644,7 +644,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -040082 digit_test_resources_c = custom_target('digit_test_resources.c',
83 input : '111_digit_test.gresource.xml',
84 output : 'digit_test_resources.c',
85- command : [glib_compile_resources,
86+ command : ['glib-compile-resources',
87 '--target=@OUTPUT@',
88 '--sourcedir=' + meson.current_source_dir(),
89 '--sourcedir=' + meson.current_build_dir(),
Andrew Geisslereff27472021-10-29 15:35:00 -050090@@ -655,7 +655,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -040091 digit_test_resources_h = custom_target('digit_test_resources.h',
92 input : '111_digit_test.gresource.xml',
93 output : 'digit_test_resources.h',
94- command : [glib_compile_resources,
95+ command : ['glib-compile-resources',
96 '--target=@OUTPUT@',
97 '--sourcedir=' + meson.current_source_dir(),
98 '--generate',
Andrew Geisslereff27472021-10-29 15:35:00 -050099@@ -688,11 +688,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Andrew Geissler82c905d2020-04-13 13:39:40 -0500100
Andrew Geissler4b740dc2020-05-05 08:54:39 -0500101 ld = find_program('ld', required : false)
102
Andrew Geisslereff27472021-10-29 15:35:00 -0500103- if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
Brad Bishop15ae2502019-06-18 21:44:24 -0400104+ if not meson.is_cross_build()
105 test_gresource_binary = custom_target('test5.gresource',
106 input : 'test5.gresource.xml',
107 output : 'test5.gresource',
108- command : [glib_compile_resources,
109+ command : ['glib-compile-resources',
110 '--target=@OUTPUT@',
111 '--sourcedir=' + meson.current_source_dir(),
112 '--sourcedir=' + meson.current_build_dir(),
Andrew Geisslereff27472021-10-29 15:35:00 -0500113@@ -704,7 +704,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -0400114 test_resources_binary_c = custom_target('test_resources_binary.c',
115 input : 'test5.gresource.xml',
116 output : 'test_resources_binary.c',
117- command : [glib_compile_resources,
118+ command : ['glib-compile-resources',
119 '--target=@OUTPUT@',
120 '--sourcedir=' + meson.current_source_dir(),
121 '--sourcedir=' + meson.current_build_dir(),