util: fix process_test path

Make sure we only use winepath when needed.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Fixes: f8f1413070 ("util/u_process: add util_get_process_exec_path")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2690
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2020-03-26 14:07:39 +01:00 committed by Daniel Stone
parent 1351ee0335
commit 8f573bdaaa

View file

@ -285,12 +285,13 @@ if with_tests
dependencies : idep_mesautil,
c_args : [c_msvc_compat_args],
)
if not (host_machine.system() == 'windows')
process_test_exe_full_path = process_test_exe.full_path()
else
if (host_machine.system() == 'windows' and cc.get_id() == 'gcc')
# This conversion is only required on mingw
process_test_exe_full_path = run_command(
'winepath', '-w', process_test_exe.full_path()
).stdout().strip()
else
process_test_exe_full_path = process_test_exe.full_path()
endif
test(