[Piglit] [PATCH 01/10] all.py: don't add unsupported texwrap test combinations

Ilia Mirkin imirkin at alum.mit.edu
Mon Jul 27 17:12:54 PDT 2015


On Mon, Jul 27, 2015 at 8:02 PM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
>  tests/all.py | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/tests/all.py b/tests/all.py
> index de0342f..fbba3b9 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -153,8 +153,9 @@ def add_vpfpgeneric(adder, name):
>  def add_texwrap_target_tests(adder, target):
>      adder(['texwrap', target, 'GL_RGBA8'],
>            'texwrap {}'.format(target))
> -    adder(['texwrap', target, 'GL_RGBA8', 'offset'],
> -          'texwrap {} offset'.format(target))
> +    if target == '2D':
> +        adder(['texwrap', target, 'GL_RGBA8', 'offset'],
> +              'texwrap {} offset'.format(target))
>      adder(['texwrap', target, 'GL_RGBA8', 'bordercolor'],
>            'texwrap {} bordercolor'.format(target))
>      adder(['texwrap', target, 'GL_RGBA8', 'proj'],
> @@ -166,8 +167,9 @@ def add_texwrap_target_tests(adder, target):
>  def add_texwrap_format_tests(adder, ext='', suffix=''):
>      args = [] if ext == '' else [ext]
>      adder(['texwrap'] + args, 'texwrap formats{}'.format(suffix))
> -    adder(['texwrap'] + args + ['offset'],
> -          'texwrap formats{} offset'.format(suffix))
> +    if not 'compression' in ext and not 's3tc' in ext:

I'd very much prefer this to be

if 'compression' not in ext and 's3tc' not in ext:
  ...

since that flows a lot more like English does. With that,

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> +        adder(['texwrap'] + args + ['offset'],
> +              'texwrap formats{} offset'.format(suffix))
>      adder(['texwrap'] + args + ['bordercolor'],
>            'texwrap formats{} bordercolor'.format(suffix))
>      adder(['texwrap'] + args + ['bordercolor', 'swizzled'],
> --
> 2.1.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list