Change in osmo-gsm-tester[master]: report: fix runtime error when suite.duration is None

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

srs_andre gerrit-no-reply at lists.osmocom.org
Mon Jul 20 13:24:52 UTC 2020


srs_andre has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/19332 )


Change subject: report: fix runtime error when suite.duration is None
......................................................................

report: fix runtime error when suite.duration is None

report generation failed when duration was not set correctly
and None was returned. Use 0 as duration in that case and continue.

Change-Id: I7696350edf801e181e6804ecdbfe83545a912dc3
---
M src/osmo_gsm_tester/core/report.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/32/19332/1

diff --git a/src/osmo_gsm_tester/core/report.py b/src/osmo_gsm_tester/core/report.py
index d2c68c5..42a21d8 100644
--- a/src/osmo_gsm_tester/core/report.py
+++ b/src/osmo_gsm_tester/core/report.py
@@ -115,7 +115,7 @@
         num_tests += int(testsuite.get('tests'))
         num_failures += int(testsuite.get('failures'))
         num_errors += int(testsuite.get('errors'))
-        time += suite.duration
+        time += suite.duration if suite.duration is not None else 0
     testsuites.set('tests', str(num_tests))
     testsuites.set('errors', str(num_errors))
     testsuites.set('failures', str(num_failures))

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/19332
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I7696350edf801e181e6804ecdbfe83545a912dc3
Gerrit-Change-Number: 19332
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200720/854bbbf8/attachment.htm>


More information about the gerrit-log mailing list