Mesa (master): amd/common: Check with_tests before adding test

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Nov 28 23:46:40 UTC 2020


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

Author: James Park <jpark37 at lagfreegames.com>
Date:   Fri Nov 27 23:35:51 2020 -0800

amd/common: Check with_tests before adding test

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7819>

---

 src/amd/common/meson.build | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/amd/common/meson.build b/src/amd/common/meson.build
index af95c2e8974..216506ff5b3 100644
--- a/src/amd/common/meson.build
+++ b/src/amd/common/meson.build
@@ -98,16 +98,18 @@ libamd_common = static_library(
 idep_amdgfxregs_h = declare_dependency(sources : [amdgfxregs_h])
 
 
-test(
-  'ac_surface_modifier_test',
-  executable(
+if with_tests
+  test(
     'ac_surface_modifier_test',
-    ['ac_surface_modifier_test.c'],
-    link_with: [libamd_common, libamdgpu_addrlib],
-    include_directories : [
-      inc_amd, inc_gallium, inc_include, inc_src,
-    ],
-    dependencies: [idep_amdgfxregs_h, dep_libdrm_amdgpu, idep_mesautil],
-  ),
-  suite: ['amd']
-)
+    executable(
+      'ac_surface_modifier_test',
+      ['ac_surface_modifier_test.c'],
+      link_with: [libamd_common, libamdgpu_addrlib],
+      include_directories : [
+        inc_amd, inc_gallium, inc_include, inc_src,
+      ],
+      dependencies: [idep_amdgfxregs_h, dep_libdrm_amdgpu, idep_mesautil],
+    ),
+    suite: ['amd']
+  )
+endif



More information about the mesa-commit mailing list