meson: enable glcpp test
authorDylan Baker <dylan@pnwbakers.com>
Thu, 11 Jan 2018 22:41:42 +0000 (14:41 -0800)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 18 Apr 2018 16:03:57 +0000 (09:03 -0700)
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/glsl/glcpp/meson.build

index 03b43b996a80ac78b88940d84c91a3659fae5d8d..e6a3dc86753d9485c450b1dca2df47b4c02c9691 100644 (file)
@@ -55,4 +55,20 @@ glcpp = executable(
   build_by_default : false,
 )
 
-# TODO: figure out how to make all of these tests work.
+if with_tests
+  modes = ['unix', 'windows', 'oldmac', 'bizarro']
+  if dep_valgrind != [] and dep_valgrind.found()
+    modes += ['valgrind']
+  endif
+
+  foreach m : modes
+    test(
+      'glcpp test (@0@)'.format(m),
+      find_program('tests/glcpp_test.py'),
+      args : [
+        glcpp, join_paths(meson.current_source_dir(), 'tests'),
+        '--@0@'.format(m),
+      ],
+    )
+  endforeach
+endif