File: vulkan.py

package info (click to toggle)
piglit 0~git20220119-124bca3c9-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 109,012 kB
  • sloc: ansic: 273,511; xml: 46,666; python: 33,098; lisp: 20,392; cpp: 12,480; sh: 22; makefile: 22; pascal: 5
file content (31 lines) | stat: -rw-r--r-- 1,136 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""All Vulkan tests that come with piglit, using default settings."""

import os

from framework.profile import TestProfile
from framework import grouptools
from framework.test.piglit_test import VkRunnerTest
from .py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR

__all__ = ['profile']

profile = TestProfile()

# Find and add all shader tests.
for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
    _basedir = os.path.join(basedir, 'vulkan')
    for dirpath, _, filenames in os.walk(_basedir):
        groupname = grouptools.from_path(os.path.relpath(dirpath, _basedir))
        groupname = grouptools.join('vulkan', groupname)
        dirname = os.path.relpath(dirpath, os.path.join(basedir, '..'))
        for filename in filenames:
            testname, ext = os.path.splitext(filename)
            if ext != '.vk_shader_test':
                continue
            test = VkRunnerTest(os.path.join(dirname, filename))
            group = grouptools.join(groupname, testname)
            assert group not in profile.test_list, group

            profile.test_list[group] = test