Mesa (main): intel: Build mi_builder_test whenever build-tests is set

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 7 18:44:03 UTC 2022


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

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Mon Jun  6 23:15:27 2022 -0700

intel: Build mi_builder_test whenever build-tests is set

Previously `install-intel-gpu-tests` controlled this, but now
`install-intel-gpu-tests` will only be used to decide if it should be
installed.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16902>

---

 src/intel/common/meson.build | 39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/src/intel/common/meson.build b/src/intel/common/meson.build
index 894486985c9..4cd076c73fd 100644
--- a/src/intel/common/meson.build
+++ b/src/intel/common/meson.build
@@ -75,25 +75,8 @@ idep_libintel_common = declare_dependency(
 )
 
 install_intel_gpu_tests = get_option('install-intel-gpu-tests')
-
-if install_intel_gpu_tests
-  foreach g : [['70', 'gfx7'], ['75', 'hsw'], ['80', 'gfx8'],
-               ['90', 'gfx9'], ['110', 'gfx11'], ['120', 'gfx12'],
-               ['125', 'gfx125']]
-    executable(
-      'intel_ at 0@_mi_builder_test'.format(g[1]),
-      files('tests/mi_builder_test.cpp'),
-      cpp_args : [
-        cpp_msvc_compat_args,
-        '-DGFX_VERx10=@0@'.format(g[0])
-      ],
-      gnu_symbol_visibility : 'hidden',
-      include_directories : [inc_include, inc_src, inc_intel],
-      link_with : [libintel_dev],
-      dependencies : [dep_libdrm, idep_gtest, idep_genxml, idep_mesautil],
-      install : install_intel_gpu_tests,
-    )
-  endforeach
+if install_intel_gpu_tests and not with_tests
+  error('`install-intel-gpu-tests` requires `build-tests`')
 endif
 
 if with_tests and not with_platform_android
@@ -126,4 +109,22 @@ if with_tests and not with_platform_android
     args : ['-quiet'],
     suite : ['intel'],
   )
+
+  foreach g : [['70', 'gfx7'], ['75', 'hsw'], ['80', 'gfx8'],
+               ['90', 'gfx9'], ['110', 'gfx11'], ['120', 'gfx12'],
+               ['125', 'gfx125']]
+    executable(
+      'intel_ at 0@_mi_builder_test'.format(g[1]),
+      files('tests/mi_builder_test.cpp'),
+      cpp_args : [
+        cpp_msvc_compat_args,
+        '-DGFX_VERx10=@0@'.format(g[0])
+      ],
+      gnu_symbol_visibility : 'hidden',
+      include_directories : [inc_include, inc_src, inc_intel],
+      link_with : [libintel_dev],
+      dependencies : [dep_libdrm, idep_gtest, idep_genxml, idep_mesautil],
+      install : install_intel_gpu_tests,
+    )
+  endforeach
 endif



More information about the mesa-commit mailing list