blob: 6147bdae462e30bfbec1544dadaa7e4dbd474894 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001From d2d7af496b4f4a13779179dbcbb98de56b09783f 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>
Brad Bishop15ae2502019-06-18 21:44:24 -040012---
Andrew Geissler82c905d2020-04-13 13:39:40 -050013 gio/tests/meson.build | 24 ++++++++++++------------
14 1 file changed, 12 insertions(+), 12 deletions(-)
Brad Bishop15ae2502019-06-18 21:44:24 -040015
Brad Bishop19323692019-04-05 15:28:33 -040016diff --git a/gio/tests/meson.build b/gio/tests/meson.build
Andrew Geissler9aee5002022-03-30 16:27:02 +000017index e8d10a0f11f2..abe676767c60 100644
Brad Bishop19323692019-04-05 15:28:33 -040018--- a/gio/tests/meson.build
19+++ b/gio/tests/meson.build
Andrew Geissler9aee5002022-03-30 16:27:02 +000020@@ -250,7 +250,7 @@ if host_machine.system() != 'windows'
Brad Bishop19323692019-04-05 15:28:33 -040021
22 # Test programs that need to bring up a session bus (requires dbus-daemon)
23 have_dbus_daemon = find_program('dbus-daemon', required : false).found()
24- if have_dbus_daemon
25+ if true
26 annotate_args = [
27 '--annotate', 'org.project.Bar', 'Key1', 'Value1',
28 '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
Andrew Geissler9aee5002022-03-30 16:27:02 +000029@@ -601,14 +601,14 @@ if installed_tests_enabled
Andrew Geissler4b740dc2020-05-05 08:54:39 -050030 endforeach
Brad Bishop19323692019-04-05 15:28:33 -040031 endif
32
33-if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop19323692019-04-05 15:28:33 -040034+if meson.is_cross_build()
35
Andrew Geissler9aee5002022-03-30 16:27:02 +000036 compiler_type = '--compiler=@0@'.format(cc.get_id())
37
Brad Bishop19323692019-04-05 15:28:33 -040038 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000043 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040044 '--target=@OUTPUT@',
45 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +000046@@ -634,7 +634,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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000052 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040053 '--target=@OUTPUT@',
54 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +000055@@ -647,7 +647,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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000061 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040062 '--target=@OUTPUT@',
63 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +000064@@ -660,7 +660,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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000070 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040071 '--target=@OUTPUT@',
72 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +000073@@ -674,7 +674,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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000079 compiler_type,
Brad Bishop19323692019-04-05 15:28:33 -040080 '--target=@OUTPUT@',
81 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +000082@@ -687,7 +687,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -040083 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000088 compiler_type,
Brad Bishop15ae2502019-06-18 21:44:24 -040089 '--target=@OUTPUT@',
90 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +000091@@ -700,7 +700,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -040092 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',
Andrew Geissler9aee5002022-03-30 16:27:02 +000097 compiler_type,
Brad Bishop15ae2502019-06-18 21:44:24 -040098 '--target=@OUTPUT@',
99 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +0000100@@ -742,11 +742,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Andrew Geissler82c905d2020-04-13 13:39:40 -0500101
Andrew Geissler4b740dc2020-05-05 08:54:39 -0500102 ld = find_program('ld', required : false)
103
Andrew Geisslereff27472021-10-29 15:35:00 -0500104- if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
Brad Bishop15ae2502019-06-18 21:44:24 -0400105+ if not meson.is_cross_build()
106 test_gresource_binary = custom_target('test5.gresource',
107 input : 'test5.gresource.xml',
108 output : 'test5.gresource',
109- command : [glib_compile_resources,
110+ command : ['glib-compile-resources',
Andrew Geissler9aee5002022-03-30 16:27:02 +0000111 compiler_type,
Brad Bishop15ae2502019-06-18 21:44:24 -0400112 '--target=@OUTPUT@',
113 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +0000114@@ -760,7 +760,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
Brad Bishop15ae2502019-06-18 21:44:24 -0400115 test_resources_binary_c = custom_target('test_resources_binary.c',
116 input : 'test5.gresource.xml',
117 output : 'test_resources_binary.c',
118- command : [glib_compile_resources,
119+ command : ['glib-compile-resources',
Andrew Geissler9aee5002022-03-30 16:27:02 +0000120 compiler_type,
Brad Bishop15ae2502019-06-18 21:44:24 -0400121 '--target=@OUTPUT@',
122 '--sourcedir=' + meson.current_source_dir(),
Andrew Geissler9aee5002022-03-30 16:27:02 +0000123--
1242.34.1
125