log passed tests

In the end of a test suite, do not omit the passed tests. For example,
running handover against N BTS combinations, it was hard to summarize
which BTS models actually succeeded, with only the failures listed.

Besides the "FAIL" listings, now print something like this in the end:

 PASS: handover:sysmo+secondbts-trx-b200 (pass: 1)
     pass: handover.py (198.8 sec)
 PASS: handover:sysmo+secondbts-trx-umtrx (pass: 1)
     pass: handover.py (192.7 sec)
 PASS: handover:trx-b200+secondbts-trx-umtrx (pass: 1)
     pass: handover.py (193.1 sec)

Change-Id: Ib85a5b90e267c2ed2f844691187ecadc8939b1bb
This commit is contained in:
Neels Hofmeyr 2020-11-28 10:06:14 +01:00
parent aa67f95027
commit 7d79ea4d2a
1 changed files with 3 additions and 0 deletions

View File

@ -164,12 +164,14 @@ def test_to_junit(t):
return testcase
def trial_to_text(trial):
suite_passes = []
suite_failures = []
count_fail = 0
count_pass = 0
for suite in trial.suites:
if suite.passed():
count_pass += 1
suite_passes.append(suite_to_text(suite))
else:
count_fail += 1
suite_failures.append(suite_to_text(suite))
@ -181,6 +183,7 @@ def trial_to_text(trial):
summary.append('%d suites passed' % count_pass)
msg = [', '.join(summary)]
msg.extend(suite_failures)
msg.extend(suite_passes)
return '\n'.join(msg)
def suite_to_text(suite):