v2: update for the changes to the test result template and check for None in the summary index time value
Signed-off-by: Thomas Wood <thomas.w...@intel.com> --- framework/summary.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/summary.py b/framework/summary.py index 9228330..62e543f 100644 --- a/framework/summary.py +++ b/framework/summary.py @@ -26,6 +26,7 @@ import itertools import shutil import collections import tempfile +from datetime import timedelta from mako.template import Template # a local variable status exists, prevent accidental overloading by renaming @@ -383,9 +384,11 @@ class Summary: for each in self.results: os.mkdir(path.join(destination, each.name)) + time = str(timedelta(0, each.time_elapsed)) if each.time_elapsed is not None else None + with open(path.join(destination, each.name, "index.html"), 'w') as out: out.write(testindex.render(name=each.name, - time=each.time_elapsed, + time=time, options=each.options, uname=each.uname, glxinfo=each.glxinfo, @@ -405,6 +408,8 @@ class Summary: if isinstance(value.get('dmesg'), list): value['dmesg'] = "\n".join(value['dmesg']) + value['time'] = str(timedelta(0, value.get('time'))) if value.get('time') is not None else None + with open(path.join(destination, each.name, key + ".html"), 'w') as out: out.write(testfile.render( -- 1.9.0 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit