[Piglit] [PATCH] generators: Add positional argument specifiers.

Vinson Lee vlee at freedesktop.org
Wed May 14 15:26:39 PDT 2014


Fix build errors with Python < 2.7.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 generated_tests/gen_outerproduct_invalid_params.py |    2 +-
 generated_tests/gen_texture_lod_tests.py           |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/generated_tests/gen_outerproduct_invalid_params.py b/generated_tests/gen_outerproduct_invalid_params.py
index 177b0eb..9d9b0ec 100644
--- a/generated_tests/gen_outerproduct_invalid_params.py
+++ b/generated_tests/gen_outerproduct_invalid_params.py
@@ -49,7 +49,7 @@ def main():
                   'mat2x2', 'mat2x3', 'mat2x4', 'mat3', 'mat3x2', 'mat3x3',
                   'mat3x4', 'mat4', 'mat4x2', 'mat4x3', 'mat4x4']:
         name = ('spec/glsl-1.20/compiler/built-in-functions/'
-                'outerProduct-{}.vert'.format(type_))
+                'outerProduct-{0}.vert'.format(type_))
         print(name)
         with open(name, 'w+') as f:
             f.write(template.render_unicode(type=type_))
diff --git a/generated_tests/gen_texture_lod_tests.py b/generated_tests/gen_texture_lod_tests.py
index dc04747..d096c5c 100644
--- a/generated_tests/gen_texture_lod_tests.py
+++ b/generated_tests/gen_texture_lod_tests.py
@@ -155,13 +155,13 @@ def main():
 
     for count, params in enumerate(LOD_TESTS, start=1):
         name = ("spec/ARB_shader_texture_lod/compiler/"
-                "tex_lod-{:02d}.frag".format(count))
+                "tex_lod-{0:02d}.frag".format(count))
         print(name)
         gen_frag_lod_test(params, name)
 
     for count, params in enumerate(GRAD_TESTS, start=1):
         name = ("spec/ARB_shader_texture_lod/compiler/"
-                "tex_grad-{:02d}.frag".format(count))
+                "tex_grad-{0:02d}.frag".format(count))
         print(name)
         gen_frag_grad_test(params, name)
 
@@ -169,7 +169,7 @@ def main():
     # are sequentially numbered.
     for count, params in enumerate(GRAD_TESTS, start=len(GRAD_TESTS) + 1):
         name = ("spec/ARB_shader_texture_lod/compiler/"
-                "tex_grad-{:02d}.vert".format(count))
+                "tex_grad-{0:02d}.vert".format(count))
         print(name)
         gen_vert_grad_test(params, name)
 
-- 
1.7.1



More information about the Piglit mailing list