[gtk+] testsuite: Disable vulkan tests when vulkan isn't available



commit 9f1716edaad4b6fd75bb0ef7d220543b351a84bc
Author: Timm Bäder <mail baedert org>
Date:   Sun Oct 22 16:58:53 2017 +0200

    testsuite: Disable vulkan tests when vulkan isn't available
    
    They are always going to fail in that case anyway.

 testsuite/gsk/meson.build |   38 ++++++++++++++++++++------------------
 1 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index 1bba933..61c2a04 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -22,25 +22,27 @@ test('nodes (cairo)', test_render_nodes,
           ],
      suite: 'gsk')
 
-vulkan_test_env = environment()
-vulkan_test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
-vulkan_test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
-vulkan_test_env.set('GSETTINGS_BACKEND', 'memory')
-vulkan_test_env.set('GTK_CSD', '1')
-vulkan_test_env.set('G_ENABLE_DIAGNOSTIC', '0')
-vulkan_test_env.set('GSK_RENDERER', 'vulkan')
+if have_vulkan
+  vulkan_test_env = environment()
+  vulkan_test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+  vulkan_test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+  vulkan_test_env.set('GSETTINGS_BACKEND', 'memory')
+  vulkan_test_env.set('GTK_CSD', '1')
+  vulkan_test_env.set('G_ENABLE_DIAGNOSTIC', '0')
+  vulkan_test_env.set('GSK_RENDERER', 'vulkan')
 
-test('nodes (vulkan)', test_render_nodes,
-     args: [ '--tap', '-k' ],
-     env: [ 'GIO_USE_VOLUME_MONITOR=unix',
-            'GSETTINGS_BACKEND=memory',
-            'GTK_CSD=1',
-            'G_ENABLE_DIAGNOSTIC=0',
-            'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
-            'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
-            'GSK_RENDERER=vulkan'
-          ],
-     suite: 'gsk')
+  test('nodes (vulkan)', test_render_nodes,
+       args: [ '--tap', '-k' ],
+       env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+              'GSETTINGS_BACKEND=memory',
+              'GTK_CSD=1',
+              'G_ENABLE_DIAGNOSTIC=0',
+              'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+              'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+              'GSK_RENDERER=vulkan'
+            ],
+       suite: 'gsk')
+endif
 
 test_data = [
   'blendmode.node',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]