Quoting Brian Paul (2017-11-17 12:03:40)
> We were generating tests both in spec/glsl-1.10/ and spec/glsl-110/.
> This changes the later to match the former.
> ---
>  generated_tests/gen_variable_index_write_tests.py | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/generated_tests/gen_variable_index_write_tests.py 
> b/generated_tests/gen_variable_index_write_tests.py
> index 0c06dcd..2615d9a 100644
> --- a/generated_tests/gen_variable_index_write_tests.py
> +++ b/generated_tests/gen_variable_index_write_tests.py
> @@ -198,6 +198,11 @@ class TestParams(object):
>              ret += ' '
>          return ret
>  
> +    @utils.lazy_property
> +    def formated_version(self):
> +        # Note: GLSLVersion::float() does the division by 100

The C++ syntax is pretty uncommon in python, "GLSLVersions.float()" please.

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

> +        return '{:.2f}'.format(float(self.version))
> +
>  
>  class ParamsFactory(object):  # pylint: disable=too-few-public-methods
>      """A factory class that provides TestParam objects.
> @@ -220,7 +225,7 @@ class ParamsFactory(object):  # pylint: 
> disable=too-few-public-methods
>  
>  def make_vs(name, params):
>      """Create a vertex shader test."""
> -    dirname = _DIRNAME.format(params.version)
> +    dirname = _DIRNAME.format(params.formated_version)
>      utils.safe_makedirs(dirname)
>      with open(os.path.join(dirname, name), 'w') as f:
>          f.write(_VS_TEMPLATE.render_unicode(params=params))
> @@ -229,7 +234,7 @@ def make_vs(name, params):
>  
>  def make_fs(name, params):
>      """Create a fragment shader test."""
> -    dirname = _DIRNAME.format(params.version)
> +    dirname = _DIRNAME.format(params.formated_version)
>      utils.safe_makedirs(dirname)
>      with open(os.path.join(dirname, name), 'w') as f:
>          f.write(_FS_TEMPLATE.render_unicode(params=params))
> -- 
> 1.9.1
> 

Attachment: signature.asc
Description: signature

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to