util: Make process_test path compatible with mingw native toolchains
[mesa.git] / src / util / meson.build
index 0a2b2e4284e9a44ca14dbd58730a81e046f43c2b..7ea125e5ac8442c4dfc2c0924e29805a6324d446 100644 (file)
@@ -55,8 +55,6 @@ files_mesa_util = files(
   'half_float.h',
   'hash_table.c',
   'hash_table.h',
-  'imports.c',
-  'imports.h',
   'list.h',
   'macros.h',
   'mesa-sha1.c',
@@ -112,6 +110,7 @@ files_mesa_util = files(
   'u_vector.h',
   'u_math.c',
   'u_math.h',
+  'u_memset.h',
   'u_mm.c',
   'u_mm.h',
   'u_debug.c',
@@ -288,10 +287,13 @@ if with_tests
     dependencies : idep_mesautil,
     c_args : [c_msvc_compat_args],
   )
-  if (host_machine.system() == 'windows' and cc.get_id() == 'gcc')
-    # This conversion is only required on mingw
+  if (host_machine.system() == 'windows' and build_machine.system() != 'windows')
+    # This conversion is only required on mingw crosscompilers, otherwise we hit at least one of these issues
+    # https://gitlab.freedesktop.org/mesa/mesa/-/issues/2690
+    # https://gitlab.freedesktop.org/mesa/mesa/-/issues/2788
+    prog_winepath = find_program('winepath')
     process_test_exe_full_path = run_command(
-      'winepath', '-w', process_test_exe.full_path()
+      prog_winepath, '-w', process_test_exe.full_path()
     ).stdout().strip()
   else
     process_test_exe_full_path = process_test_exe.full_path()
@@ -316,10 +318,7 @@ if with_tests
   endif
   subdir('tests/vma')
   subdir('tests/set')
-  # FIXME: this test on the Wine version in GitLab CI
-  if host_machine.system() != 'windows'
-    subdir('tests/sparse_array')
-  endif
+  subdir('tests/sparse_array')
   subdir('tests/format')
   subdir('tests/vector')
 endif