summaryrefslogtreecommitdiff
path: root/generated_tests
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2015-03-05 16:45:14 -0800
committerDylan Baker <baker.dylan.c@gmail.com>2015-03-13 15:19:18 -0700
commitc4218e51a4e7e964477b7d15c2b34d1c91019c8c (patch)
tree2b8dd1d8559e93d237085074df5d891fd4e98596 /generated_tests
parent7c16abb3c934a7b13ec9e492b2c9291beb39811c (diff)
framework: Add python version to mako template dirs
Since these templates are at the very least not compatible betwen 3.x and 2.x, and possibly not backwards compatible from 3.x to 3.x-1 it makes better sense to actually maintain the version. This allows easy transition between python versions without blowing away the mako cache on every iteration. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'generated_tests')
-rw-r--r--generated_tests/templates/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/generated_tests/templates/__init__.py b/generated_tests/templates/__init__.py
index b796effc6..f974825b4 100644
--- a/generated_tests/templates/__init__.py
+++ b/generated_tests/templates/__init__.py
@@ -22,6 +22,7 @@
from __future__ import absolute_import
import os
+import sys
import getpass
import tempfile
@@ -32,6 +33,7 @@ from mako.lookup import TemplateLookup
# Based on a similar setup in framework/summary
MAKO_TEMP_DIR = os.path.join(tempfile.gettempdir(),
'piglit-{0}'.format(getpass.getuser()),
+ 'version-{0}'.format(sys.version.split()[0]),
'generators', 'templates')
TEMPLATE_DIR = os.path.abspath(os.path.dirname(__file__))