perf/pbobench: ignore unused arrays
[piglit.git] / tests / vulkan.py
blobff4b6e2b79e1a7650de2e15cf0a8d1f061525ffe
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 """All Vulkan tests that come with piglit, using default settings."""
5 import os
7 from framework.profile import TestProfile
8 from framework import grouptools
9 from framework.test.piglit_test import VkRunnerTest
10 from .py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR
12 __all__ = ['profile']
14 profile = TestProfile()
16 # Find and add all shader tests.
17 for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
18 _basedir = os.path.join(basedir, 'vulkan')
19 for dirpath, _, filenames in os.walk(_basedir):
20 groupname = grouptools.from_path(os.path.relpath(dirpath, _basedir))
21 groupname = grouptools.join('vulkan', groupname)
22 dirname = os.path.relpath(dirpath, os.path.join(basedir, '..'))
23 for filename in filenames:
24 testname, ext = os.path.splitext(filename)
25 if ext != '.vk_shader_test':
26 continue
27 test = VkRunnerTest(os.path.join(dirname, filename))
28 group = grouptools.join(groupname, testname)
29 assert group not in profile.test_list, group
31 profile.test_list[group] = test