summaryrefslogtreecommitdiff
path: root/generated_tests
diff options
context:
space:
mode:
authorDylan Baker <dylanx.c.baker@intel.com>2014-11-11 09:27:31 -0800
committerDylan Baker <dylanx.c.baker@intel.com>2014-12-01 10:16:34 -0800
commite1cb31aa07e394b03c862951d472ed40e5bc08b8 (patch)
tree1fe2f505a1782683c11d3dab83fc8c061ae0f4b7 /generated_tests
parent84e06633fa0b254f1ff78d070425a4771c5a40ae (diff)
gen_outerproduct_tests.py: Move template to templates dir
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
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