1 # Copyright 2014-2016 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 integrations for the official Khronos Vulkan CTS.
23 upstream: https://github.com/KhronosGroup/Vulkan-CTS
27 from __future__
import (
28 absolute_import
, division
, print_function
, unicode_literals
32 from framework
.test
import deqp
36 # Path to the deqp-gles3 executable.
37 _DEQP_VK_BIN
= deqp
.get_option('PIGLIT_DEQP_VK_BIN',
41 _EXTRA_ARGS
= deqp
.get_option('PIGLIT_DEQP_VK_EXTRA_ARGS',
42 ('deqp-vk', 'extra_args'),
45 _DEQP_ASSERT
= re
.compile(
46 r
'deqp-vk: external/vulkancts/.*: Assertion `.*\' failed
.')
49 class DEQPVKTest(deqp.DEQPBaseTest):
50 """Test representation for Khronos Vulkan CTS."""
52 deqp_bin = _DEQP_VK_BIN
55 return super(DEQPVKTest, self).extra_args + \
56 [x for x in _EXTRA_ARGS if not x.startswith('--deqp
-case
')]
58 def interpret_result(self):
59 if 'Failed to
compile shader at vkGlslToSpirV
' in self.result.out:
60 self.result.result = 'skip
'
62 '\n\nMarked
as skip because GLSLang failed to
compile shaders
'
63 elif _DEQP_ASSERT.search(self.result.err):
64 self.result.result = 'skip
'
66 '\n\nMarked
as skip because of a internal dEQP assertion
'
68 super(DEQPVKTest, self).interpret_result()
71 profile = deqp.make_profile( # pylint: disable=invalid-name
72 deqp.iter_deqp_test_cases(
73 deqp.gen_caselist_txt(_DEQP_VK_BIN, 'dEQP
-VK
-cases
.txt
',