From a9fa7589c63f621216032b30cbb94dc49a6b8d98 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 14 Nov 2022 13:01:47 +0000 Subject: [PATCH] tests: Work around Meson bug with using exe_wrapper Do not use can_run_host_binaries() as it returns true even though custom_target() does not currently correctly wrap target-built tool binaries with exe_wrapper so they can be run on the host. See https://github.com/mesonbuild/meson/issues/11029 --- gio/tests/meson.build | 4 +++- glib/tests/meson.build | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index 04d7f4212..da4161766 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -700,7 +700,9 @@ if installed_tests_enabled endforeach endif -if meson.can_run_host_binaries() +# FIXME: Work around Meson not automatically using exe_wrapper around glib_compile_resources +# https://github.com/mesonbuild/meson/issues/11029 +if not meson.is_cross_build() resource_plugin = [] compiler_type = '--compiler=@0@'.format(cc.get_id()) diff --git a/glib/tests/meson.build b/glib/tests/meson.build index 883b9cfc5..2af5871ff 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -431,7 +431,9 @@ foreach test_name, extra_args : python_tests endforeach # some testing of gtester functionality -if meson.can_run_host_binaries() and host_system != 'windows' +# FIXME: Work around Meson not automatically using exe_wrapper around gtester +# https://github.com/mesonbuild/meson/issues/11029 +if not meson.is_cross_build() and host_system != 'windows' xmllint = find_program('xmllint', required: false) if xmllint.found() tmpsample_xml = custom_target('tmpsample.xml',