[4/5] khr_gl45: add support for mustpass lists

Submitted by Marek Olšák on May 2, 2018, 8:32 p.m.

Details

Message ID 20180502203247.11284-4-maraeo@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Marek Olšák May 2, 2018, 8:32 p.m.
From: Nicolai Hähnle <nicolai.haehnle@amd.com>

---
 tests/khr_gl45.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/khr_gl45.py b/tests/khr_gl45.py
index 08e6280bb..95f474220 100644
--- a/tests/khr_gl45.py
+++ b/tests/khr_gl45.py
@@ -36,34 +36,37 @@  PIGLIT_KHR_GL_BIN -- environment equivalent of [khr_gl]:bin
 PIGLIT_KHR_GL_EXTRA_ARGS -- environment equivalent of [khr_gl]:extra_args
 
 """
 
 from __future__ import (
     absolute_import, division, print_function, unicode_literals
 )
 import itertools
 
 from framework.test import deqp
+from framework.options import OPTIONS
 
 __all__ = ['profile']
 
-_KHR_BIN = deqp.get_option('PIGLIT_KHR_GL_BIN', ('khr_gl', 'bin'),
+_KHR_BIN = deqp.get_option('PIGLIT_KHR_GL_BIN', ('khr_gl45', 'bin'),
                            required=True)
 
-_EXTRA_ARGS = deqp.get_option('PIGLIT_KHR_GL_EXTRA_ARGS', ('khr_gl', 'extra_args'),
+_KHR_MUSTPASS = deqp.get_option('PIGLIT_KHRGL45_MUSTPASS',
+                                 ('khr_gl45', 'mustpasslist'),
+                                 required=OPTIONS.deqp_mustpass)
+
+_EXTRA_ARGS = deqp.get_option('PIGLIT_KHR_GL_EXTRA_ARGS', ('khr_gl45', 'extra_args'),
                               default='').split()
 
 
 class DEQPKHRTest(deqp.DEQPBaseTest):
     deqp_bin = _KHR_BIN
 
     @property
     def extra_args(self):
         return super(DEQPKHRTest, self).extra_args + \
             [x for x in _EXTRA_ARGS if not x.startswith('--deqp-case')]
 
 profile = deqp.make_profile(  # pylint: disable=invalid-name
-    itertools.chain(
-        deqp.iter_deqp_test_cases(
-            deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL45-cases.txt', _EXTRA_ARGS)),
-    ),
+    deqp.select_source(_KHR_BIN, 'KHR-GL45-cases.txt', _KHR_MUSTPASS,
+                       _EXTRA_ARGS),
     DEQPKHRTest)

Comments

Quoting Marek Olšák (2018-05-02 13:32:46)
> From: Nicolai Hähnle <nicolai.haehnle@amd.com>
> 
> ---
>  tests/khr_gl45.py | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/khr_gl45.py b/tests/khr_gl45.py
> index 08e6280bb..95f474220 100644
> --- a/tests/khr_gl45.py
> +++ b/tests/khr_gl45.py
> @@ -36,34 +36,37 @@ PIGLIT_KHR_GL_BIN -- environment equivalent of [khr_gl]:bin
>  PIGLIT_KHR_GL_EXTRA_ARGS -- environment equivalent of [khr_gl]:extra_args

please update the docstring with the change from khr_gl to khr_gl45.

with that,
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>

>  
>  """
>  
>  from __future__ import (
>      absolute_import, division, print_function, unicode_literals
>  )
>  import itertools
>  
>  from framework.test import deqp
> +from framework.options import OPTIONS
>  
>  __all__ = ['profile']
>  
> -_KHR_BIN = deqp.get_option('PIGLIT_KHR_GL_BIN', ('khr_gl', 'bin'),
> +_KHR_BIN = deqp.get_option('PIGLIT_KHR_GL_BIN', ('khr_gl45', 'bin'),
>                             required=True)
>  
> -_EXTRA_ARGS = deqp.get_option('PIGLIT_KHR_GL_EXTRA_ARGS', ('khr_gl', 'extra_args'),
> +_KHR_MUSTPASS = deqp.get_option('PIGLIT_KHRGL45_MUSTPASS',
> +                                 ('khr_gl45', 'mustpasslist'),
> +                                 required=OPTIONS.deqp_mustpass)
> +
> +_EXTRA_ARGS = deqp.get_option('PIGLIT_KHR_GL_EXTRA_ARGS', ('khr_gl45', 'extra_args'),
>                                default='').split()
>  
>  
>  class DEQPKHRTest(deqp.DEQPBaseTest):
>      deqp_bin = _KHR_BIN
>  
>      @property
>      def extra_args(self):
>          return super(DEQPKHRTest, self).extra_args + \
>              [x for x in _EXTRA_ARGS if not x.startswith('--deqp-case')]
>  
>  profile = deqp.make_profile(  # pylint: disable=invalid-name
> -    itertools.chain(
> -        deqp.iter_deqp_test_cases(
> -            deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL45-cases.txt', _EXTRA_ARGS)),
> -    ),
> +    deqp.select_source(_KHR_BIN, 'KHR-GL45-cases.txt', _KHR_MUSTPASS,
> +                       _EXTRA_ARGS),
>      DEQPKHRTest)
> -- 
> 2.17.0
> 
> _______________________________________________
> Piglit mailing list
> Piglit@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit