diff options
author | Thomas Wood <thomas.wood@intel.com> | 2014-06-04 11:07:30 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2014-06-11 10:46:51 +0100 |
commit | 6755d9195bc05bbee2445eeac6af6b0e0ecf5160 (patch) | |
tree | da51edcaaa872011a81010e8b1822585a0871e9b | |
parent | 26f5404d1d5bc23731ebcde5ba79060885927ee3 (diff) |
templates: add the totals to testrun_info
Add the totals to the testrun_info template, including the total number
of tests evaluated.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
-rw-r--r-- | framework/summary.py | 3 | ||||
-rw-r--r-- | templates/testrun_info.mako | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/framework/summary.py b/framework/summary.py index 544889431..7e8d480cc 100644 --- a/framework/summary.py +++ b/framework/summary.py @@ -452,8 +452,11 @@ class Summary: else: time = None + self.__find_totals() + with open(path.join(destination, each.name, "index.html"), 'w') as out: out.write(testindex.render(name=each.name, + totals=self.totals, time=time, options=each.options, uname=each.uname, diff --git a/templates/testrun_info.mako b/templates/testrun_info.mako index 6ff1f4456..9ff5022ce 100644 --- a/templates/testrun_info.mako +++ b/templates/testrun_info.mako @@ -18,6 +18,17 @@ <th>Value</th> </tr> <tr> + <td>totals</td> + <td> + <table> + % for key, value in sorted(totals.iteritems(), key=lambda (k,v): (v,k), reverse=True): + <tr><td>${key}</td><td>${value}</td></tr> + % endfor + <tr><td>total</td><td>${sum(totals.itervalues())}</td></tr> + </table> + </td> + </tr> + <tr> <td>time_elapsed</td> <td>${time}</td> </tr> |