Commit a6ee9840 authored by Nicolai Hähnle's avatar Nicolai Hähnle

piglit-summary-html.py: Add glxinfo/lspci output to HTML summaries

parent 59750efa
...@@ -269,11 +269,10 @@ class Environment: ...@@ -269,11 +269,10 @@ class Environment:
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(stdout,stderr) = p.communicate(); (stdout,stderr) = p.communicate();
return stderr+stdout return stderr+stdout
print >>self.file, "glxinfo:", encode(stderr+stdout)
def collectData(self): def collectData(self):
print >>self.file, "glxinfo:", encode(self.run('glxinfo')) print >>self.file, "glxinfo:", '@@@' + encode(self.run('glxinfo'))
print >>self.file, "lspci:", encode(self.run('lspci')) print >>self.file, "lspci:", '@@@' + encode(self.run('lspci'))
class Test: class Test:
......
...@@ -36,7 +36,7 @@ import framework.summary ...@@ -36,7 +36,7 @@ import framework.summary
############################################################################# #############################################################################
def testPathToHtmlFilename(path): 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') ...@@ -71,6 +71,8 @@ IndexGroupGroup = readfile(templatedir + 'index_groupgroup.html')
IndexTest = readfile(templatedir + 'index_test.html') IndexTest = readfile(templatedir + 'index_test.html')
IndexTestTestrun = readfile(templatedir + 'index_test_testrun.html') IndexTestTestrun = readfile(templatedir + 'index_test_testrun.html')
Testrun = readfile(templatedir + 'testrun.html')
SummaryPages = { SummaryPages = {
'all': 'index.html', 'all': 'index.html',
'changes': 'changes.html', 'changes': 'changes.html',
...@@ -129,6 +131,13 @@ def writeResultHtml(test, testResult, filename): ...@@ -129,6 +131,13 @@ def writeResultHtml(test, testResult, filename):
writefile(filename, Result % locals()) 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): def buildTestSummary(indent, alternate, testsummary):
tenindent = 10 - indent tenindent = 10 - indent
...@@ -298,6 +307,7 @@ def main(): ...@@ -298,6 +307,7 @@ def main():
tr.codename = filter(lambda s: s.isalnum(), tr.name) tr.codename = filter(lambda s: s.isalnum(), tr.name)
dirname = summaryDir + '/' + tr.codename dirname = summaryDir + '/' + tr.codename
core.checkDir(dirname, False) core.checkDir(dirname, False)
writeTestrunHtml(tr, dirname + '/index.html')
for test in summary.allTests(): for test in summary.allTests():
filename = dirname + '/' + testPathToHtmlFilename(test.path) filename = dirname + '/' + testPathToHtmlFilename(test.path)
writeResultHtml(test, test.results[j], filename) writeResultHtml(test, test.results[j], filename)
......
<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>
<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>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment