diff --git a/src/compiler/glsl/glcpp/meson.build b/src/compiler/glsl/glcpp/meson.build index 0c67d1fa741..4614310aee1 100644 --- a/src/compiler/glsl/glcpp/meson.build +++ b/src/compiler/glsl/glcpp/meson.build @@ -89,8 +89,14 @@ glcpp = executable( build_by_default : false, ) +# Meson can't auto-skip these on cross builds because of the python wrapper +# +# TODO: has_exe_wrapper() is deprecated and renamed to can_run_host_binaries() +# starting with Meson 0.55.0 +# # FIXME: these fail on windows due to whitespace differences -if with_any_opengl and with_tests and host_machine.system() != 'windows' +if with_any_opengl and with_tests and meson.has_exe_wrapper() and \ + host_machine.system() != 'windows' modes = ['unix', 'windows', 'oldmac', 'bizarro'] foreach m : modes diff --git a/src/compiler/glsl/tests/meson.build b/src/compiler/glsl/tests/meson.build index 17945382db4..c8a84a81801 100644 --- a/src/compiler/glsl/tests/meson.build +++ b/src/compiler/glsl/tests/meson.build @@ -79,29 +79,35 @@ test( suite : ['compiler', 'glsl'], ) -test( - 'glsl compiler warnings', - prog_python, - args : [ - join_paths(meson.current_source_dir(), 'warnings_test.py'), - '--glsl-compiler', glsl_compiler, - '--test-directory', join_paths( - meson.source_root(), 'src', 'compiler', 'glsl', 'tests', 'warnings' - ), - ], - suite : ['compiler', 'glsl'], - timeout: 60, -) +# Meson can't auto-skip these on cross builds because of the python wrapper +# +# TODO: has_exe_wrapper() is deprecated and renamed to can_run_host_binaries() +# starting with Meson 0.55.0 +if meson.has_exe_wrapper() + test( + 'glsl compiler warnings', + prog_python, + args : [ + join_paths(meson.current_source_dir(), 'warnings_test.py'), + '--glsl-compiler', glsl_compiler, + '--test-directory', join_paths( + meson.source_root(), 'src', 'compiler', 'glsl', 'tests', 'warnings' + ), + ], + suite : ['compiler', 'glsl'], + timeout: 60, + ) -test( - 'glsl optimization', - prog_python, - args : [ - join_paths(meson.current_source_dir(), 'optimization_test.py'), - '--test-runner', glsl_test - ], - suite : ['compiler', 'glsl'], -) + test( + 'glsl optimization', + prog_python, + args : [ + join_paths(meson.current_source_dir(), 'optimization_test.py'), + '--test-runner', glsl_test + ], + suite : ['compiler', 'glsl'], + ) +endif if with_tools.contains('glsl') test(