summaryrefslogtreecommitdiff
path: root/generated_tests
diff options
context:
space:
mode:
Diffstat (limited to 'generated_tests')
-rw-r--r--generated_tests/CMakeLists.txt3
-rw-r--r--generated_tests/gen_outerproduct_tests.py13
-rw-r--r--generated_tests/templates/gen_outerproduct_tests/template.shader_test.mako (renamed from generated_tests/gen_outerproduct_template.mako)0
3 files changed, 9 insertions, 7 deletions
diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt
index bb6cc794d..6b157e1d0 100644
--- a/generated_tests/CMakeLists.txt
+++ b/generated_tests/CMakeLists.txt
@@ -98,7 +98,8 @@ piglit_make_generated_tests(
piglit_make_generated_tests(
outerproduct_tests.list
gen_outerproduct_tests.py
- gen_outerproduct_template.mako)
+ templates/gen_outerproduct_tests/template.shader_test.mako
+ )
piglit_make_generated_tests(
builtin_uniform_tests_fp64.list
diff --git a/generated_tests/gen_outerproduct_tests.py b/generated_tests/gen_outerproduct_tests.py
index fdc381090..621107474 100644
--- a/generated_tests/gen_outerproduct_tests.py
+++ b/generated_tests/gen_outerproduct_tests.py
@@ -24,7 +24,11 @@ from __future__ import print_function
import os
import itertools
import collections
-import mako.template
+
+from templates import template_file
+
+TEMPLATE = template_file(os.path.splitext(os.path.basename(__file__))[0],
+ 'template.shader_test.mako')
Parameters = collections.namedtuple(
'Paramters', ['columns', 'rows', 'vec_type', 'matrix'])
@@ -40,10 +44,6 @@ def main():
name = ('spec/glsl-1.20/execution/'
'{shader}-outerProduct-{type}{mat}{vec}.shader_test')
- template = mako.template.Template(filename=
- os.path.join(os.path.dirname(__file__),
- 'gen_outerproduct_template.mako'))
-
for c, r in itertools.product(xrange(2, 5), repeat=2):
vecs = [
Parameters(c, r, 'vec', 'mat{0}x{1}'.format(r, c)),
@@ -67,9 +67,10 @@ def main():
print(_name)
with open(_name, 'w+') as f:
- f.write(template.render_unicode(params=params,
+ f.write(TEMPLATE.render_unicode(params=params,
type=type,
shader=shader))
+
if __name__ == '__main__':
main()
diff --git a/generated_tests/gen_outerproduct_template.mako b/generated_tests/templates/gen_outerproduct_tests/template.shader_test.mako
index 5d7561aad..5d7561aad 100644
--- a/generated_tests/gen_outerproduct_template.mako
+++ b/generated_tests/templates/gen_outerproduct_tests/template.shader_test.mako