Skip to content

Commit

Permalink
Include difference in numbers on verbosity level above 3
Browse files Browse the repository at this point in the history
This counts the number of tests in a summary how they change.

Fixes os-autoinst#59. I do not plan to count bugs but focus on test results here.
  • Loading branch information
okurz committed Feb 7, 2018
1 parent 6d8e92e commit 119381c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openqa_review/openqa_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,9 @@ def __init__(self, browser, job_group_url, root_url, args):
current_summary = parse_summary(current_details)
previous_summary = parse_summary(previous_details)

changes = {k: v - previous_summary.get(k, 0) for k, v in iteritems(current_summary) if k != 'none' and k != 'incomplete'}
log.info("Changes since last build:\n\t%s" % '\n\t'.join("%s: %s" % (k, v) for k, v in iteritems(changes)))
changes = SortedDict({k: v - previous_summary.get(k, 0) for k, v in iteritems(current_summary) if k != 'none'})
self.changes_str = '***Changes since reference build***\n\n* ' + '\n* '.join("%s: %s" % (k, v) for k, v in iteritems(changes)) + '\n'
log.info("%s" % self.changes_str)

self.build = get_build_nr(current_url)
self.ref_build = get_build_nr(previous_url)
Expand Down Expand Up @@ -933,6 +934,8 @@ def __str__(self):
build_str = self.build
if self.args.verbose_test and self.args.verbose_test > 1:
build_str += ' (reference %s)' % self.ref_build
if self.args.verbose_test and self.args.verbose_test > 3:
build_str += '\n\n' + self.changes_str

openqa_review_report_product = openqa_review_report_product_template.substitute({
'now': now_str,
Expand Down
7 changes: 7 additions & 0 deletions tests/report25_TTT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
**Date:** 2016-09-19 - 14:35
**Build:** 0313 (reference 0311)

***Changes since reference build***

* failed: -11
* passed: 0
* soft failure: -1


**Common issues:**

* **Missing architectures**: i586
Expand Down

0 comments on commit 119381c

Please sign in to comment.