From 9f1716edaad4b6fd75bb0ef7d220543b351a84bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2017 16:58:53 +0200 Subject: [PATCH] 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 file changed, 20 insertions(+), 18 deletions(-) diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index 1bba9332f8..61c2a04a3d 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',