blob: f5c161fe047af8ba1d873c4ddc32a9dc27fbba52 [file] [log] [blame]
Patrick Williams03907ee2022-05-01 06:28:52 -05001From 1f3c05529c0c9032ae0a289fb1f088b7541fc9b0 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 Williams03907ee2022-05-01 06:28:52 -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
Patrick Williams03907ee2022-05-01 06:28:52 -050018index 3ed23a5..5df932a 100644
Brad Bishop19323692019-04-05 15:28:33 -040019--- a/gio/tests/meson.build
20+++ b/gio/tests/meson.build
Patrick Williams03907ee2022-05-01 06:28:52 -050021@@ -253,7 +253,7 @@ if host_machine.system() != 'windows'
22 }
23 endif
Brad Bishop19323692019-04-05 15:28:33 -040024
Brad Bishop19323692019-04-05 15:28:33 -040025- 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',
Patrick Williams03907ee2022-05-01 06:28:52 -050030@@ -603,14 +603,14 @@ 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
Andrew Geissler9aee5002022-03-30 16:27:02 +000037 compiler_type = '--compiler=@0@'.format(cc.get_id())
38
Brad Bishop19323692019-04-05 15:28:33 -040039 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000044 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040045 '--target=@OUTPUT@',
46 '--sourcedir=' + meson.current_source_dir(),
Patrick Williams03907ee2022-05-01 06:28:52 -050047@@ -636,7 +636,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040048 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000053 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040054 '--target=@OUTPUT@',
55 '--sourcedir=' + meson.current_source_dir(),
Patrick Williams03907ee2022-05-01 06:28:52 -050056@@ -649,7 +649,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040057 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000062 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040063 '--target=@OUTPUT@',
64 '--sourcedir=' + meson.current_source_dir(),
Patrick Williams03907ee2022-05-01 06:28:52 -050065@@ -662,7 +662,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040066 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000071 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040072 '--target=@OUTPUT@',
73 '--sourcedir=' + meson.current_source_dir(),
Patrick Williams03907ee2022-05-01 06:28:52 -050074@@ -676,7 +676,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040075 input : 'test2.gresource.xml',
Brad Bishop15ae2502019-06-18 21:44:24 -040076 depends : big_test_resource,
Brad Bishop19323692019-04-05 15:28:33 -040077 output : 'test_resources.c',
78- command : [glib_compile_resources,
79+ command : ['glib-compile-resources',
Andrew Geissler9aee5002022-03-30 16:27:02 +000080 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040081 '--target=@OUTPUT@',
82 '--sourcedir=' + meson.current_source_dir(),
Patrick Williams03907ee2022-05-01 06:28:52 -050083@@ -689,7 +689,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -040084 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000089 compiler_type,
Brad Bishop15ae2502019-06-18 21:44:24 -040090 '--target=@OUTPUT@',
91 '--sourcedir=' + meson.current_source_dir(),
Patrick Williams03907ee2022-05-01 06:28:52 -050092@@ -702,7 +702,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -040093 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000098 compiler_type,
Brad Bishop15ae2502019-06-18 21:44:24 -040099 '--target=@OUTPUT@',
100 '--sourcedir=' + meson.current_source_dir(),
Patrick Williams03907ee2022-05-01 06:28:52 -0500101@@ -744,11 +744,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Andrew Geissler82c905d2020-04-13 13:39:40 -0500102
Andrew Geissler4b740dc2020-05-05 08:54:39 -0500103 ld = find_program('ld', required : false)
104
Andrew Geisslereff27472021-10-29 15:35:00 -0500105- if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
Brad Bishop15ae2502019-06-18 21:44:24 -0400106+ 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +0000112 compiler_type,
Brad Bishop15ae2502019-06-18 21:44:24 -0400113 '--target=@OUTPUT@',
114 '--sourcedir=' + meson.current_source_dir(),
Patrick Williams03907ee2022-05-01 06:28:52 -0500115@@ -762,7 +762,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -0400116 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +0000121 compiler_type,
Brad Bishop15ae2502019-06-18 21:44:24 -0400122 '--target=@OUTPUT@',
123 '--sourcedir=' + meson.current_source_dir(),