summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2015-09-30 12:03:04 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2015-09-30 12:25:08 -0700
commite50905630b9f002d6d9aa7ccac6066f22a9524d6 (patch)
treeb6861335b83eff9bb862395cfda9f3af3a581f2a
parent7a034f967bcc40e9451bb0e35dff01e36b1a9f95 (diff)
framework: add clinfo to system information
It's like glxinfo or wglinfo, but for OpenCL. Reviewed-by: Serge Martin <edb+piglit@sigluy.net> Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r--framework/core.py1
-rw-r--r--framework/results.py3
-rw-r--r--framework/summary/html_.py1
-rw-r--r--framework/tests/results_tests.py8
-rw-r--r--templates/testrun_info.mako6
5 files changed, 17 insertions, 2 deletions
diff --git a/framework/core.py b/framework/core.py
index 549130bb2..c30f96170 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -194,6 +194,7 @@ def collect_system_info():
progs = [('wglinfo', ['wglinfo']),
('glxinfo', ['glxinfo']),
('uname', ['uname', '-a']),
+ ('clinfo', ['clinfo']),
('lspci', ['lspci'])]
result = {}
diff --git a/framework/results.py b/framework/results.py
index c5f90e89c..8d3fe170f 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -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)
diff --git a/framework/summary/html_.py b/framework/summary/html_.py
index 0036b839d..689bcf1a1 100644
--- a/framework/summary/html_.py
+++ b/framework/summary/html_.py
@@ -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
diff --git a/framework/tests/results_tests.py b/framework/tests/results_tests.py
index a28d78b96..728d4797a 100644
--- a/framework/tests/results_tests.py
+++ b/framework/tests/results_tests.py
@@ -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,
diff --git a/templates/testrun_info.mako b/templates/testrun_info.mako
index 9ff5022ce..f8e1b4773 100644
--- a/templates/testrun_info.mako
+++ b/templates/testrun_info.mako
@@ -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>