Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 1 | From 23cd157352ac8a53f992ddc6d6d01caadf1c79bc 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 | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 12 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 13 | --- |
| 14 | gio/tests/meson.build | 26 ++++++++++++++------------ |
| 15 | 1 file changed, 14 insertions(+), 12 deletions(-) |
| 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 |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 18 | index 65f43e2..028b196 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 |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 21 | @@ -185,7 +185,7 @@ if host_machine.system() != 'windows' |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | |
| 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', |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 30 | @@ -453,12 +453,13 @@ if installed_tests_enabled |
| 31 | install_data('static-link.py', install_dir : installed_tests_execdir) |
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() |
| 35 | +#if not meson.is_cross_build() or meson.has_exe_wrapper() |
| 36 | +if meson.is_cross_build() |
| 37 | |
| 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', |
| 43 | '--target=@OUTPUT@', |
| 44 | '--sourcedir=' + meson.current_source_dir(), |
| 45 | '--generate-source', |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 46 | @@ -482,7 +483,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', |
| 52 | '--target=@OUTPUT@', |
| 53 | '--sourcedir=' + meson.current_source_dir(), |
| 54 | '--sourcedir=' + meson.current_build_dir(), |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 55 | @@ -493,7 +494,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', |
| 61 | '--target=@OUTPUT@', |
| 62 | '--sourcedir=' + meson.current_source_dir(), |
| 63 | '--generate', |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 64 | @@ -504,7 +505,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', |
| 70 | '--target=@OUTPUT@', |
| 71 | '--sourcedir=' + meson.current_source_dir(), |
| 72 | '--generate', |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 73 | @@ -516,7 +517,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', |
| 79 | '--target=@OUTPUT@', |
| 80 | '--sourcedir=' + meson.current_source_dir(), |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 81 | '--sourcedir=' + meson.current_build_dir(), |
| 82 | @@ -527,7 +528,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
| 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', |
| 88 | '--target=@OUTPUT@', |
| 89 | '--sourcedir=' + meson.current_source_dir(), |
| 90 | '--sourcedir=' + meson.current_build_dir(), |
| 91 | @@ -538,7 +539,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
| 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', |
| 97 | '--target=@OUTPUT@', |
| 98 | '--sourcedir=' + meson.current_source_dir(), |
| 99 | '--generate', |
| 100 | @@ -565,11 +566,12 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
| 101 | # Support for --add-symbol was added to LLVM objcopy in 2019 |
| 102 | # (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for |
| 103 | # LLVM once that support is in a stable release. |
| 104 | - if build_machine.system() == 'linux' and cc.get_id() == 'gcc' |
| 105 | + #if build_machine.system() == 'linux' and cc.get_id() == 'gcc' |
| 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', |
| 112 | '--target=@OUTPUT@', |
| 113 | '--sourcedir=' + meson.current_source_dir(), |
| 114 | '--sourcedir=' + meson.current_build_dir(), |
| 115 | @@ -581,7 +583,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() |
| 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', |
| 121 | '--target=@OUTPUT@', |
| 122 | '--sourcedir=' + meson.current_source_dir(), |
| 123 | '--sourcedir=' + meson.current_build_dir(), |