meson/glsl: Only run GLSL tests if can_run_host_binaries()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308>
This commit is contained in:

committed by
Marge Bot

parent
dd88fb33fe
commit
a4d1ae7017
@@ -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
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user