[Piglit] [PATCH] generators: fix incorrect generated_tests/spec/glsl-110, etc. dir names
Brian Paul
brianp at vmware.com
Fri Nov 17 20:03:40 UTC 2017
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
+ 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
More information about the Piglit
mailing list