Commit e5090563 authored by Dylan Baker's avatar Dylan Baker

framework: add clinfo to system information

It's like glxinfo or wglinfo, but for OpenCL.
Reviewed-by: default avatarSerge Martin <edb+piglit@sigluy.net>
Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
parent 7a034f96
......@@ -194,6 +194,7 @@ def collect_system_info():
progs = [('wglinfo', ['wglinfo']),
('glxinfo', ['glxinfo']),
('uname', ['uname', '-a']),
('clinfo', ['clinfo']),
('lspci', ['lspci'])]
result = {}
......
......@@ -241,6 +241,7 @@ class TestrunResult(object):
self.options = None
self.glxinfo = None
self.wglinfo = None
self.clinfo = None
self.lspci = None
self.time_elapsed = None
self.tests = {}
......@@ -288,7 +289,7 @@ class TestrunResult(object):
"""
res = cls()
for name in ['name', 'uname', 'options', 'glxinfo', 'wglinfo', 'lspci',
'tests', 'totals', 'results_version']:
'tests', 'totals', 'results_version', 'clinfo']:
value = dict_.get(name)
if value:
setattr(res, name, value)
......
......@@ -89,6 +89,7 @@ def _make_testrun_info(results, destination, exclude):
options=each.options,
uname=each.uname,
glxinfo=each.glxinfo,
clinfo=each.clinfo,
lspci=each.lspci))
# Then build the individual test results
......
......@@ -456,6 +456,7 @@ class TestTestrunResultToJson(object):
test.uname = 'this is uname'
test.options = {'some': 'option'}
test.glxinfo = 'glxinfo'
test.clinfo = 'clinfo'
test.wglinfo = 'wglinfo'
test.lspci = 'this is lspci'
test.time_elapsed = 1.23
......@@ -483,6 +484,10 @@ class TestTestrunResultToJson(object):
"""results.TestrunResult.to_json: wglinfo is properly encoded"""
nt.eq_(self.test['wglinfo'], 'wglinfo')
def test_clinfo(self):
"""results.TestrunResult.to_json: clinfo is properly encoded"""
nt.eq_(self.test['clinfo'], 'clinfo')
def test_lspci(self):
"""results.TestrunResult.to_json: lspci is properly encoded"""
nt.eq_(self.test['lspci'], 'this is lspci')
......@@ -513,6 +518,7 @@ class TestTestrunResultFromDict(object):
test.options = {'some': 'option'}
test.glxinfo = 'glxinfo'
test.wglinfo = 'wglinfo'
test.clinfo = 'clinfo'
test.lspci = 'this is lspci'
test.time_elapsed = 1.23
test.tests = {
......@@ -532,7 +538,7 @@ class TestTestrunResultFromDict(object):
nt.eq_(baseline, test)
for attrib in ['name', 'uname', 'glxinfo', 'wglinfo', 'lspci',
'time_elapsed', 'results_version']:
'time_elapsed', 'results_version', 'clinfo']:
test.description = ('results.TestrunResult.from_dict: '
'{} is restored correctly'.format(attrib))
yield (test,
......
......@@ -58,6 +58,12 @@
<pre>${glxinfo}</pre>
</td>
</tr>
<tr>
<td>clinfo</td>
<td>
<pre>${clinfo}</pre>
</td>
</tr>
</table>
<p>
<a href="../index.html">Back to summary</a>
......
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