Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 1 | From 1f3c05529c0c9032ae0a289fb1f088b7541fc9b0 Mon Sep 17 00:00:00 2001 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> |
| 3 | Date: Mon, 9 Nov 2015 11:07:27 +0200 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 4 | Subject: [PATCH] Enable more tests while cross-compiling |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 5 | |
| 6 | Upstream disables a few tests while cross-compiling because their build requires |
| 7 | running other built binaries. This usually makes sense but in the cross-compile |
| 8 | case we can depend on glib-2.0-native. |
| 9 | |
| 10 | Upstream-Status: Inappropriate [OE specific] |
| 11 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 12 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 13 | --- |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | gio/tests/meson.build | 24 ++++++++++++------------ |
| 15 | 1 file changed, 12 insertions(+), 12 deletions(-) |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 16 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | diff --git a/gio/tests/meson.build b/gio/tests/meson.build |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 18 | index 3ed23a5..5df932a 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 19 | --- a/gio/tests/meson.build |
| 20 | +++ b/gio/tests/meson.build |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 21 | @@ -253,7 +253,7 @@ if host_machine.system() != 'windows' |
| 22 | } |
| 23 | endif |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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', |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 30 | @@ -603,14 +603,14 @@ if installed_tests_enabled |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 31 | endforeach |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 32 | endif |
| 33 | |
| 34 | -if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | +if meson.is_cross_build() |
| 36 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 37 | compiler_type = '--compiler=@0@'.format(cc.get_id()) |
| 38 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 44 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 45 | '--target=@OUTPUT@', |
| 46 | '--sourcedir=' + meson.current_source_dir(), |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 47 | @@ -636,7 +636,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 53 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 54 | '--target=@OUTPUT@', |
| 55 | '--sourcedir=' + meson.current_source_dir(), |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 56 | @@ -649,7 +649,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 62 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 63 | '--target=@OUTPUT@', |
| 64 | '--sourcedir=' + meson.current_source_dir(), |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 65 | @@ -662,7 +662,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 71 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 72 | '--target=@OUTPUT@', |
| 73 | '--sourcedir=' + meson.current_source_dir(), |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 74 | @@ -676,7 +676,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 75 | input : 'test2.gresource.xml', |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 76 | depends : big_test_resource, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 77 | output : 'test_resources.c', |
| 78 | - command : [glib_compile_resources, |
| 79 | + command : ['glib-compile-resources', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 80 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 81 | '--target=@OUTPUT@', |
| 82 | '--sourcedir=' + meson.current_source_dir(), |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 83 | @@ -689,7 +689,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 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', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 89 | compiler_type, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 90 | '--target=@OUTPUT@', |
| 91 | '--sourcedir=' + meson.current_source_dir(), |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 92 | @@ -702,7 +702,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 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', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 98 | compiler_type, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 99 | '--target=@OUTPUT@', |
| 100 | '--sourcedir=' + meson.current_source_dir(), |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 101 | @@ -744,11 +744,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 102 | |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 103 | ld = find_program('ld', required : false) |
| 104 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 105 | - if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found() |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 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', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 112 | compiler_type, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 113 | '--target=@OUTPUT@', |
| 114 | '--sourcedir=' + meson.current_source_dir(), |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 115 | @@ -762,7 +762,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 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', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 121 | compiler_type, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 122 | '--target=@OUTPUT@', |
| 123 | '--sourcedir=' + meson.current_source_dir(), |