meson: use files() instead of joining paths
The Meson docs points out that it's better to use the files() function when referring to files in the source tree than manually constructing paths like this. Let's follow that advice, and get some neat cleanups. Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20907>
This commit is contained in:

committed by
Marge Bot

parent
d54c8a47c6
commit
f00c9e85e5
@@ -89,7 +89,7 @@ if with_any_opengl and with_tests and meson.can_run_host_binaries() and \
|
||||
'glcpp test (@0@)'.format(m),
|
||||
prog_python,
|
||||
args : [
|
||||
join_paths(meson.current_source_dir(), 'tests/glcpp_test.py'),
|
||||
files('tests/glcpp_test.py'),
|
||||
glcpp, join_paths(meson.current_source_dir(), 'tests'),
|
||||
'--@0@'.format(m),
|
||||
],
|
||||
|
@@ -71,7 +71,7 @@ if meson.can_run_host_binaries()
|
||||
'glsl compiler warnings',
|
||||
prog_python,
|
||||
args : [
|
||||
join_paths(meson.current_source_dir(), 'warnings_test.py'),
|
||||
files('warnings_test.py'),
|
||||
'--glsl-compiler', glsl_compiler,
|
||||
'--test-directory', join_paths(
|
||||
dir_source_root, 'src', 'compiler', 'glsl', 'tests', 'warnings'
|
||||
@@ -85,7 +85,7 @@ if meson.can_run_host_binaries()
|
||||
'glsl optimization',
|
||||
prog_python,
|
||||
args : [
|
||||
join_paths(meson.current_source_dir(), 'optimization_test.py'),
|
||||
files('optimization_test.py'),
|
||||
'--test-runner', glsl_test
|
||||
],
|
||||
suite : ['compiler', 'glsl'],
|
||||
@@ -97,14 +97,14 @@ if with_tools.contains('glsl')
|
||||
'glsl dump-builder test',
|
||||
glsl_compiler,
|
||||
args : ['--version', '110', '--dump-builder',
|
||||
join_paths(meson.current_source_dir(), 'standalone_dump-builder.frag'),
|
||||
files('standalone_dump-builder.frag'),
|
||||
],
|
||||
suite : ['compiler', 'glsl'],
|
||||
)
|
||||
test(
|
||||
'glsl lower-precision test',
|
||||
prog_python,
|
||||
args : [join_paths(meson.current_source_dir(), 'lower_precision_test.py'),
|
||||
args : [files('lower_precision_test.py'),
|
||||
glsl_compiler
|
||||
],
|
||||
suite : ['compiler', 'glsl'],
|
||||
|
@@ -421,7 +421,7 @@ if with_tests
|
||||
'nir_algebraic_parser',
|
||||
prog_python,
|
||||
args : [
|
||||
join_paths(meson.current_source_dir(), 'tests/algebraic_parser_test.py')
|
||||
files('tests/algebraic_parser_test.py')
|
||||
],
|
||||
suite : ['compiler', 'nir'],
|
||||
)
|
||||
|
Reference in New Issue
Block a user