Commit aed29ecb authored by Brian Paul's avatar Brian Paul

generators: fix incorrect generated_tests/spec/glsl-110, etc. dir names

Reviewed-by: Charmaine Lee's avatarCharmaine Lee <charmainel@vmware.com>
Reviewed-by: Dylan Baker's avatarDylan Baker <dylan@pnwbakers.com>
parent 9c0a023c
......@@ -198,6 +198,11 @@ class TestParams(object):
ret += ' '
return ret
@utils.lazy_property
def formated_version(self):
# Note: GLSLVersion.float() does 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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment