diff options
author | Vinson Lee <vlee@vmware.com> | 2009-04-15 07:59:08 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-04-15 07:59:08 -0600 |
commit | 34df16b25e2ca34d0840bd79678e5e5a04e79bca (patch) | |
tree | 343601344cd4e04f4ad0f4a75cb4b4f3108e7037 /piglit-summary-html.py | |
parent | 4db9a01e5f0d5ce2122a21bf88e785e39c471118 (diff) |
Use os.path.join() for directory/file paths.
Diffstat (limited to 'piglit-summary-html.py')
-rwxr-xr-x | piglit-summary-html.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/piglit-summary-html.py b/piglit-summary-html.py index 5956378ca..2f586e5aa 100755 --- a/piglit-summary-html.py +++ b/piglit-summary-html.py @@ -54,24 +54,24 @@ def writefile(filename, text): f.write(text) f.close() -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') -IndexTestrunBHref = readfile(templatedir + 'index_testrunb_href.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') - -Testrun = readfile(templatedir + 'testrun.html') +templatedir = os.path.join(os.path.dirname(__file__), 'templates') +Result = readfile(os.path.join(templatedir, 'result.html')) +ResultDetail = readfile(os.path.join(templatedir, 'result_detail.html')) +ResultList = readfile(os.path.join(templatedir, 'result_list.html')) +ResultListItem = readfile(os.path.join(templatedir, 'result_listitem.html')) +ResultMString = readfile(os.path.join(templatedir, 'result_mstring.html')) + +Index = readfile(os.path.join(templatedir, 'index.html')) +IndexTestrun = readfile(os.path.join(templatedir, 'index_testrun.html')) +IndexTestrunB = readfile(os.path.join(templatedir, 'index_testrunb.html')) +IndexTestrunBHref = readfile(os.path.join(templatedir, 'index_testrunb_href.html')) +IndexGroup = readfile(os.path.join(templatedir, 'index_group.html')) +IndexGroupTestrun = readfile(os.path.join(templatedir, 'index_group_testrun.html')) +IndexGroupGroup = readfile(os.path.join(templatedir, 'index_groupgroup.html')) +IndexTest = readfile(os.path.join(templatedir, 'index_test.html')) +IndexTestTestrun = readfile(os.path.join(templatedir, 'index_test_testrun.html')) + +Testrun = readfile(os.path.join(templatedir, 'testrun.html')) SummaryPages = { 'all': 'index.html', @@ -312,8 +312,8 @@ def main(): filename = dirname + '/' + testPathToHtmlFilename(test.path) writeResultHtml(test, test.results[j], filename) - writefile(summaryDir + '/result.css', readfile(templatedir + 'result.css')) - writefile(summaryDir + '/index.css', readfile(templatedir + 'index.css')) + writefile(os.path.join(summaryDir, 'result.css'), readfile(os.path.join(templatedir, 'result.css'))) + writefile(os.path.join(summaryDir, 'index.css'), readfile(os.path.join(templatedir, 'index.css'))) writeSummaryHtml(summary, summaryDir, 'all') writeSummaryHtml(summary, summaryDir, 'problems') writeSummaryHtml(summary, summaryDir, 'changes') |