From a6ee98404fbe63d19d9097641497d9e52e3d45e0 Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Wed, 27 Aug 2008 22:32:41 +0200 Subject: piglit-summary-html.py: Add glxinfo/lspci output to HTML summaries --- framework/core.py | 5 ++--- piglit-summary-html.py | 12 +++++++++++- templates/index_testrunb.html | 2 +- templates/testrun.html | 22 ++++++++++++++++++++++ 4 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 templates/testrun.html diff --git a/framework/core.py b/framework/core.py index 03f8b8aeb..8d6482e0e 100644 --- a/framework/core.py +++ b/framework/core.py @@ -269,11 +269,10 @@ class Environment: command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout,stderr) = p.communicate(); return stderr+stdout - print >>self.file, "glxinfo:", encode(stderr+stdout) def collectData(self): - print >>self.file, "glxinfo:", encode(self.run('glxinfo')) - print >>self.file, "lspci:", encode(self.run('lspci')) + print >>self.file, "glxinfo:", '@@@' + encode(self.run('glxinfo')) + print >>self.file, "lspci:", '@@@' + encode(self.run('lspci')) class Test: diff --git a/piglit-summary-html.py b/piglit-summary-html.py index 387fa85dc..5956378ca 100755 --- a/piglit-summary-html.py +++ b/piglit-summary-html.py @@ -36,7 +36,7 @@ import framework.summary ############################################################################# def testPathToHtmlFilename(path): - return filter(lambda s: s.isalnum() or s == '_', path.replace('/', '__')) + '.html' + return 'test_' + filter(lambda s: s.isalnum() or s == '_', path.replace('/', '__')) + '.html' ############################################################################# @@ -71,6 +71,8 @@ IndexGroupGroup = readfile(templatedir + 'index_groupgroup.html') IndexTest = readfile(templatedir + 'index_test.html') IndexTestTestrun = readfile(templatedir + 'index_test_testrun.html') +Testrun = readfile(templatedir + 'testrun.html') + SummaryPages = { 'all': 'index.html', 'changes': 'changes.html', @@ -129,6 +131,13 @@ def writeResultHtml(test, testResult, filename): writefile(filename, Result % locals()) +def writeTestrunHtml(testrun, filename): + detaildict = dict(filter(lambda item: item[0] in testrun.globalkeys, testrun.__dict__.items())) + details = buildDetails(detaildict) + name = testrun.name + codename = testrun.codename + + writefile(filename, Testrun % locals()) def buildTestSummary(indent, alternate, testsummary): tenindent = 10 - indent @@ -298,6 +307,7 @@ def main(): tr.codename = filter(lambda s: s.isalnum(), tr.name) dirname = summaryDir + '/' + tr.codename core.checkDir(dirname, False) + writeTestrunHtml(tr, dirname + '/index.html') for test in summary.allTests(): filename = dirname + '/' + testPathToHtmlFilename(test.path) writeResultHtml(test, test.results[j], filename) diff --git a/templates/index_testrunb.html b/templates/index_testrunb.html index b4ef7ecca..ddee9cf0d 100644 --- a/templates/index_testrunb.html +++ b/templates/index_testrunb.html @@ -1 +1 @@ -%(name)s +%(name)s
(info) diff --git a/templates/testrun.html b/templates/testrun.html new file mode 100644 index 000000000..a04ec0d01 --- /dev/null +++ b/templates/testrun.html @@ -0,0 +1,22 @@ + + + %(name)s - System info + + + +

System info for %(name)s

+

+ Back to summary +

+ + + + + + %(details)s +
DetailValue
+

+ Back to summary +

+ + -- cgit v1.2.3