mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
scripts/resulttool/report: Add total statistic to test result.
Add total passed, failed, and skipped statistic to test result. (From OE-Core rev: 7ad74f99b6105f23bcf930712627aac279c6af10) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
565b05b0e4
commit
610b02a2fb
|
@ -186,6 +186,10 @@ class ResultsTextReport(object):
|
|||
havefailed = True
|
||||
if line['machine'] not in machines:
|
||||
machines.append(line['machine'])
|
||||
reporttotalvalues = {}
|
||||
for k in cols:
|
||||
reporttotalvalues[k] = '%s' % sum([line[k] for line in test_count_reports])
|
||||
reporttotalvalues['count'] = '%s' % len(test_count_reports)
|
||||
for (machine, report) in self.ptests.items():
|
||||
for ptest in self.ptests[machine]:
|
||||
if len(ptest) > maxlen['ptest']:
|
||||
|
@ -199,6 +203,7 @@ class ResultsTextReport(object):
|
|||
if len(ltpposixtest) > maxlen['ltpposixtest']:
|
||||
maxlen['ltpposixtest'] = len(ltpposixtest)
|
||||
output = template.render(reportvalues=reportvalues,
|
||||
reporttotalvalues=reporttotalvalues,
|
||||
havefailed=havefailed,
|
||||
machines=machines,
|
||||
ptests=self.ptests,
|
||||
|
|
|
@ -8,7 +8,8 @@ Test Result Status Summary (Counts/Percentages sorted by testseries, ID)
|
|||
{{ report.testseries.ljust(maxlen['testseries']) }} | {{ report.result_id.ljust(maxlen['result_id']) }} | {{ (report.passed|string).ljust(maxlen['passed']) }} | {{ (report.failed|string).ljust(maxlen['failed']) }} | {{ (report.skipped|string).ljust(maxlen['skipped']) }}
|
||||
{% endfor %}
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
{{ 'Total'.ljust(maxlen['testseries']) }} | {{ reporttotalvalues['count'].ljust(maxlen['result_id']) }} | {{ reporttotalvalues['passed'].ljust(maxlen['passed']) }} | {{ reporttotalvalues['failed'].ljust(maxlen['failed']) }} | {{ reporttotalvalues['skipped'].ljust(maxlen['skipped']) }}
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
{% for machine in machines %}
|
||||
{% if ptests[machine] %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user