summaryrefslogtreecommitdiff
path: root/piglit-summary-html.py
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2007-03-25 03:57:24 +0200
committerNicolai Haehnle <nhaehnle@gmail.com>2007-03-25 03:57:24 +0200
commit5a2d446816e0916f219121fb9a474dc9fc212531 (patch)
tree0e582c24ecb7cb9c73fe8be7f7cad8fca32abd23 /piglit-summary-html.py
parent39f6e0211da517cfb31bab6e6afe98060581ff32 (diff)
Fetch templates relative to piglit-summary-html.py
Diffstat (limited to 'piglit-summary-html.py')
-rwxr-xr-xpiglit-summary-html.py34
1 files changed, 18 insertions, 16 deletions
diff --git a/piglit-summary-html.py b/piglit-summary-html.py
index edad4f67..fbe257e7 100755
--- a/piglit-summary-html.py
+++ b/piglit-summary-html.py
@@ -28,6 +28,7 @@ import sys
import framework.core as core
+
#############################################################################
##### Auxiliary functions
#############################################################################
@@ -184,20 +185,21 @@ def writefile(filename, text):
f.write(text)
f.close()
-Result = readfile('templates/result.html')
-ResultDetail = readfile('templates/result_detail.html')
-ResultList = readfile('templates/result_list.html')
-ResultListItem = readfile('templates/result_listitem.html')
-ResultMString = readfile('templates/result_mstring.html')
-
-Index = readfile('templates/index.html')
-IndexTestrun = readfile('templates/index_testrun.html')
-IndexTestrunB = readfile('templates/index_testrunb.html')
-IndexGroup = readfile('templates/index_group.html')
-IndexGroupTestrun = readfile('templates/index_group_testrun.html')
-IndexGroupGroup = readfile('templates/index_groupgroup.html')
-IndexTest = readfile('templates/index_test.html')
-IndexTestTestrun = readfile('templates/index_test_testrun.html')
+templatedir = os.path.dirname(__file__) + '/templates/'
+Result = readfile(templatedir + 'result.html')
+ResultDetail = readfile(templatedir + 'result_detail.html')
+ResultList = readfile(templatedir + 'result_list.html')
+ResultListItem = readfile(templatedir + 'result_listitem.html')
+ResultMString = readfile(templatedir + 'result_mstring.html')
+
+Index = readfile(templatedir + 'index.html')
+IndexTestrun = readfile(templatedir + 'index_testrun.html')
+IndexTestrunB = readfile(templatedir + 'index_testrunb.html')
+IndexGroup = readfile(templatedir + 'index_group.html')
+IndexGroupTestrun = readfile(templatedir + 'index_group_testrun.html')
+IndexGroupGroup = readfile(templatedir + 'index_groupgroup.html')
+IndexTest = readfile(templatedir + 'index_test.html')
+IndexTestTestrun = readfile(templatedir + 'index_test_testrun.html')
SummaryPages = {
'all': 'index.html',
@@ -403,8 +405,8 @@ def main():
core.checkDir(summaryDir + '/' + r.codename, False)
recursiveWriteResultHtml(r.results, summaryDir + '/' + r.codename)
- writefile(summaryDir + '/result.css', readfile('templates/result.css'))
- writefile(summaryDir + '/index.css', readfile('templates/index.css'))
+ writefile(summaryDir + '/result.css', readfile(templatedir + 'result.css'))
+ writefile(summaryDir + '/index.css', readfile(templatedir + 'index.css'))
writeSummaryHtml(results, summaryDir, 'all')
writeSummaryHtml(results, summaryDir, 'problems')
writeSummaryHtml(results, summaryDir, 'changes')