[Piglit] [Patch v3 01/13] summary.py: Dont us os.environ to set the template directory
Dylan Baker
baker.dylan.c at gmail.com
Fri Jun 20 12:50:27 PDT 2014
This makes summary more robust, since it doesn't rely on
PIGLIT_SOURCE_DIR being set correctly in the environment.
Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
framework/summary.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/framework/summary.py b/framework/summary.py
index e5eb156..7b88c96 100644
--- a/framework/summary.py
+++ b/framework/summary.py
@@ -271,7 +271,8 @@ class Summary:
implementation is HTML output through mako, aptly named generateHTML().
"""
TEMP_DIR = path.join(tempfile.gettempdir(), "piglit/html-summary")
- TEMPLATE_DIR = path.join(os.environ['PIGLIT_SOURCE_DIR'], 'templates')
+ TEMPLATE_DIR = path.abspath(
+ path.join(path.dirname(__file__), '..', 'templates'))
def __init__(self, resultfiles):
"""
--
2.0.0
More information about the Piglit
mailing list