[Piglit] [PATCH 2/2] summary/html: generalize info output
Dylan Baker
dylan at pnwbakers.com
Wed Jun 27 18:08:53 UTC 2018
So that random keys show up somewhat nicely.
---
framework/summary/html_.py | 5 +----
templates/testrun_info.mako | 32 ++++++++++++--------------------
2 files changed, 13 insertions(+), 24 deletions(-)
diff --git a/framework/summary/html_.py b/framework/summary/html_.py
index 945230bc6..f0cc6b639 100644
--- a/framework/summary/html_.py
+++ b/framework/summary/html_.py
@@ -100,10 +100,7 @@ def _make_testrun_info(results, destination, exclude=None):
totals=each.totals['root'],
time=each.time_elapsed.delta,
options=each.options,
- uname=each.info['system'].get('uname'),
- glxinfo=each.info['system'].get('glxinfo'),
- clinfo=each.info['system'].get('clinfo'),
- lspci=each.info['system'].get('lspci')))
+ info=each.info))
# Then build the individual test results
for key, value in six.iteritems(each.tests):
diff --git a/templates/testrun_info.mako b/templates/testrun_info.mako
index 473897a29..f8d86f94a 100644
--- a/templates/testrun_info.mako
+++ b/templates/testrun_info.mako
@@ -44,27 +44,19 @@
<td>${options}</td>
</tr>
<tr>
- <td>uname -a</td>
+ <td>info</td>
<td>
- <pre>${uname}</pre>
- </td>
- </tr>
- <tr>
- <td>lspci</td>
- <td>
- <pre>${lspci}</pre>
- </td>
- </tr>
- <tr>
- <td>glxinfo</td>
- <td>
- <pre>${glxinfo}</pre>
- </td>
- </tr>
- <tr>
- <td>clinfo</td>
- <td>
- <pre>${clinfo}</pre>
+ <table>
+ % for key, sub in sorted(six.iteritems(info)):
+ % if isinstance(sub, str):
+ <tr><td>${str}</td></tr>
+ % else:
+ % for subkey, value in sorted(six.iteritems(sub)):
+ <tr><td>${subkey}</td><td><pre>${value}</pre></td></tr>
+ % endfor
+ % endif
+ % endfor
+ </table>
</td>
</tr>
</table>
--
2.17.1
More information about the Piglit
mailing list