util: fix process_test path
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 26 Mar 2020 13:07:39 +0000 (14:07 +0100)
committerDaniel Stone <daniels@collabora.com>
Fri, 27 Mar 2020 10:32:31 +0000 (10:32 +0000)
Make sure we only use winepath when needed.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Fixes: f8f1413070a ("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>

src/util/meson.build

index 77e3973c1a085c5e718adee39a47d771eb9512b6..e30029063c0e8d81914e1c1dd47defd92d4ea788 100644 (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(