[Piglit] [PATCH 2/3] gen_builtin_uniform_tests: Allow test to have init sequence

Jordan Justen jordan.l.justen at intel.com
Wed Aug 27 10:17:52 PDT 2014


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 generated_tests/gen_builtin_uniform_tests.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/generated_tests/gen_builtin_uniform_tests.py b/generated_tests/gen_builtin_uniform_tests.py
index 975c9ef..3e9b64c 100644
--- a/generated_tests/gen_builtin_uniform_tests.py
+++ b/generated_tests/gen_builtin_uniform_tests.py
@@ -442,11 +442,16 @@ class ShaderTest(object):
         shader += '}\n'
         return shader
 
+    def make_test_init(self):
+        """Generate initialization for the test.
+        """
+        return ''
+
     def make_test(self):
         """Make the complete shader_runner test file, and return it as
         a string.
         """
-        test = ''
+        test = self.make_test_init()
         for test_num, test_vector in enumerate(self._test_vectors):
             for i in xrange(len(test_vector.arguments)):
                 test += 'uniform {0} arg{1} {2}\n'.format(
-- 
2.1.0



More information about the Piglit mailing list