testsuite: Disable vulkan tests when vulkan isn't available

They are always going to fail in that case anyway.
This commit is contained in:
Timm Bäder 2017-10-22 16:58:53 +02:00
parent f59e5b2b31
commit 9f1716edaa

View File

@ -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',