Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 1 | From d2d7af496b4f4a13779179dbcbb98de56b09783f 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> |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 12 | --- |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | gio/tests/meson.build | 24 ++++++++++++------------ |
| 14 | 1 file changed, 12 insertions(+), 12 deletions(-) |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 15 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | diff --git a/gio/tests/meson.build b/gio/tests/meson.build |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 17 | index e8d10a0f11f2..abe676767c60 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 18 | --- a/gio/tests/meson.build |
| 19 | +++ b/gio/tests/meson.build |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 20 | @@ -250,7 +250,7 @@ if host_machine.system() != 'windows' |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | |
| 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 29 | @@ -601,14 +601,14 @@ if installed_tests_enabled |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 30 | endforeach |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 31 | endif |
| 32 | |
| 33 | -if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 34 | +if meson.is_cross_build() |
| 35 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 36 | compiler_type = '--compiler=@0@'.format(cc.get_id()) |
| 37 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 38 | 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 43 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 44 | '--target=@OUTPUT@', |
| 45 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 46 | @@ -634,7 +634,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 47 | 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 52 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | '--target=@OUTPUT@', |
| 54 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 55 | @@ -647,7 +647,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 56 | 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 61 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 62 | '--target=@OUTPUT@', |
| 63 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 64 | @@ -660,7 +660,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 65 | 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 70 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 71 | '--target=@OUTPUT@', |
| 72 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 73 | @@ -674,7 +674,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 74 | input : 'test2.gresource.xml', |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 75 | depends : big_test_resource, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 76 | output : 'test_resources.c', |
| 77 | - command : [glib_compile_resources, |
| 78 | + command : ['glib-compile-resources', |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 79 | compiler_type, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 80 | '--target=@OUTPUT@', |
| 81 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 82 | @@ -687,7 +687,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 83 | 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 88 | compiler_type, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 89 | '--target=@OUTPUT@', |
| 90 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 91 | @@ -700,7 +700,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 92 | 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 97 | compiler_type, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 98 | '--target=@OUTPUT@', |
| 99 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 100 | @@ -742,11 +742,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 101 | |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 102 | ld = find_program('ld', required : false) |
| 103 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 104 | - 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] | 105 | + 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 111 | compiler_type, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 112 | '--target=@OUTPUT@', |
| 113 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 114 | @@ -760,7 +760,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 115 | 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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 120 | compiler_type, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 121 | '--target=@OUTPUT@', |
| 122 | '--sourcedir=' + meson.current_source_dir(), |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 123 | -- |
| 124 | 2.34.1 |
| 125 | |