Mesa (main): spirv: Use a single binary for gtests

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 20 18:25:44 UTC 2021


Module: Mesa
Branch: main
Commit: 8cb7d6f81b21dc6c7c8eabd900dc9e865f310fd7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cb7d6f81b21dc6c7c8eabd900dc9e865f310fd7

Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date:   Mon Oct 18 08:56:09 2021 -0700

spirv: Use a single binary for gtests

Less artifacts and less time running linker.  Also set the guideline
for future tests to not create new binaries for extra gtests.

Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13415>

---

 src/compiler/meson.build | 24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/src/compiler/meson.build b/src/compiler/meson.build
index a2e40959aa3..ce6c6c06c44 100644
--- a/src/compiler/meson.build
+++ b/src/compiler/meson.build
@@ -71,24 +71,14 @@ spirv2nir = executable(
 
 if with_tests
   test(
-    'avail_vis',
+    'spirv_tests',
     executable(
-      'avail_vis',
-      files('spirv/tests/avail_vis.cpp'),
-      c_args : [c_msvc_compat_args, no_override_init_args],
-      gnu_symbol_visibility : 'hidden',
-      include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
-      dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
-    ),
-    suite : ['compiler', 'spirv'],
-    protocol : gtest_test_protocol,
-  )
-
-  test(
-    'volatile',
-    executable(
-      'volatile',
-      files('spirv/tests/volatile.cpp'),
+      'spirv_tests',
+      files(
+        'spirv/tests/helpers.h',
+        'spirv/tests/avail_vis.cpp',
+        'spirv/tests/volatile.cpp',
+      ),
       c_args : [c_msvc_compat_args, no_override_init_args],
       gnu_symbol_visibility : 'hidden',
       include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],



More information about the mesa-commit mailing list