gallium: Enable unit tests as actual meson unit tests.
authorEric Anholt <eric@anholt.net>
Thu, 24 Jan 2019 17:36:56 +0000 (09:36 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 25 Jan 2019 21:06:45 +0000 (13:06 -0800)
These tests don't need swrast, so we can always enable them when
build_tests is set.  Most of them run to successful completion quickly
(.9s on my SKL).

Reviewed-by: <Roland Scheidegger sroland@vmware.com>
src/gallium/tests/meson.build
src/gallium/tests/unit/meson.build

index 0ee04350c87b6588d0b4c0ffb26591be19a23961..080bd8485b0ab3cb64166b6c90f17ea782ecfa08 100644 (file)
@@ -19,7 +19,5 @@
 # SOFTWARE.
 
 subdir('trivial')
-if with_gallium_softpipe
-  subdir('unit')
-endif
+subdir('unit')
 subdir('graw')
index 4a97810dfaac30cf29068c8165dffc7ad0acaf50..eacbd39b882775497665a530b49bfa24a4fe94d0 100644 (file)
 
 foreach t : ['pipe_barrier_test', 'u_cache_test', 'u_half_test',
              'u_format_test', 'u_format_compatible_test', 'translate_test']
-  executable(
+  exe = executable(
     t,
     '@0@.c'.format(t),
-    include_directories : [inc_common, inc_gallium_drivers, inc_gallium_winsys],
-    link_with : [libgallium, libmesa_util, libws_null],
-    dependencies : [driver_swrast, dep_thread],
+    include_directories : inc_common,
+    link_with : [libgallium, libmesa_util],
+    dependencies : [dep_thread],
     install : false,
   )
+  # u_cache_test is slow, and translate_test fails.
+  if not ['u_cache_test', 'translate_test'].contains(t)
+    test(t, exe, suite: 'gallium')
+  endif
 endforeach