1 # Copyright (c) 2017 Intel Corporation
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 """Piglit integration for the now open sourced Khronos CTS tests being
22 developed at https://github.com/KhronosGroup/VK-GL-CTS
24 By default this will run GL30, GL31, GL32, GL33, GL40, GL41, GL42,
25 GL43, GL44, GL45 and GL46 test cases. Those desiring to run only a
26 subset of them should consider using the -t or -x options to include
30 ./piglit run khr_gl -c foo -t GL30- would run only GL30 tests
32 This integration requires some configuration in piglit.conf, or the use of
33 environment variables.
35 In piglit.conf one should set the following:
36 [khr_gl]:bin -- Path to the glcts binary
37 [khr_gl]:extra_args -- any extra arguments to be passed to cts (optional)
39 Alternatively (or in addition, since environment variables have precedence),
41 PIGLIT_KHR_GL_BIN -- environment equivalent of [khr_gl]:bin
42 PIGLIT_KHR_GL_EXTRA_ARGS -- environment equivalent of [khr_gl]:extra_args
46 from __future__
import (
47 absolute_import
, division
, print_function
, unicode_literals
51 from framework
.test
import deqp
55 _KHR_BIN
= deqp
.get_option('PIGLIT_KHR_GL_BIN', ('khr_gl', 'bin'),
58 _EXTRA_ARGS
= deqp
.get_option('PIGLIT_KHR_GL_EXTRA_ARGS', ('khr_gl', 'extra_args'),
62 class DEQPKHRTest(deqp
.DEQPBaseTest
):
67 return super(DEQPKHRTest
, self
).extra_args
+ \
68 [x
for x
in _EXTRA_ARGS
if not x
.startswith('--deqp-case')]
70 # Add all of the suites by default, users can use filters to remove them.
71 profile
= deqp
.make_profile( # pylint: disable=invalid-name
73 deqp
.iter_deqp_test_cases(
74 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL30-cases.txt', _EXTRA_ARGS
)),
75 deqp
.iter_deqp_test_cases(
76 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL31-cases.txt', _EXTRA_ARGS
)),
77 deqp
.iter_deqp_test_cases(
78 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL32-cases.txt', _EXTRA_ARGS
)),
79 deqp
.iter_deqp_test_cases(
80 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL33-cases.txt', _EXTRA_ARGS
)),
81 deqp
.iter_deqp_test_cases(
82 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL40-cases.txt', _EXTRA_ARGS
)),
83 deqp
.iter_deqp_test_cases(
84 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL41-cases.txt', _EXTRA_ARGS
)),
85 deqp
.iter_deqp_test_cases(
86 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL42-cases.txt', _EXTRA_ARGS
)),
87 deqp
.iter_deqp_test_cases(
88 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL43-cases.txt', _EXTRA_ARGS
)),
89 deqp
.iter_deqp_test_cases(
90 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL44-cases.txt', _EXTRA_ARGS
)),
91 deqp
.iter_deqp_test_cases(
92 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL45-cases.txt', _EXTRA_ARGS
)),
93 deqp
.iter_deqp_test_cases(
94 deqp
.gen_caselist_txt(_KHR_BIN
, 'KHR-GL46-cases.txt', _EXTRA_ARGS
)),