summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2008-08-27 22:32:41 +0200
committerNicolai Haehnle <nhaehnle@gmail.com>2008-08-27 22:32:41 +0200
commita6ee98404fbe63d19d9097641497d9e52e3d45e0 (patch)
tree683c00587fe7288296ce9f057281c2512b55d5af
parent59750efad2071cbed9422baa700721c3935d96c8 (diff)
piglit-summary-html.py: Add glxinfo/lspci output to HTML summaries
-rw-r--r--framework/core.py5
-rwxr-xr-xpiglit-summary-html.py12
-rw-r--r--templates/index_testrunb.html2
-rw-r--r--templates/testrun.html22
4 files changed, 36 insertions, 5 deletions
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 @@
-<td class="head"><b>%(name)s</b></td>
+<td class="head"><b>%(name)s</b><br/>(<a href="%(codename)s/index.html">info</a>)</td>
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 @@
+<html>
+ <head>
+ <title>%(name)s - System info</title>
+ <link rel="stylesheet" href="../result.css"/>
+ </head>
+ <body>
+ <h1>System info for %(name)s</h1>
+ <p>
+ <a href="../index.html">Back to summary</a>
+ </p>
+ <table>
+ <tr class="head">
+ <th>Detail</th>
+ <th>Value</th>
+ </tr>
+ %(details)s
+ </table>
+ <p>
+ <a href="../index.html">Back to summary</a>
+ </p>
+ </body>
+</html>