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/.
Holger Freyther gerrit-no-reply at lists.osmocom.orgHolger Freyther has uploaded this change for review. ( https://gerrit.osmocom.org/9716 Change subject: ms: Quit early when all tests concluded.. ...................................................................... ms: Quit early when all tests concluded.. And fix the the detection if everything has completed. Change-Id: I3575ee7618c35e3b66d25fa31844d267489d9179 --- M src/osmo_ms_driver/location_update_test.py 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/16/9716/1 diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py index 2a3c246..9bab8ad 100644 --- a/src/osmo_ms_driver/location_update_test.py +++ b/src/osmo_ms_driver/location_update_test.py @@ -35,6 +35,9 @@ assert self._time_of_lu is None self._time_of_lu = time + def has_lu_time(self): + return self._time_of_lu is not None + def lu_time(self): return self._time_of_lu or 0 @@ -165,7 +168,7 @@ def wait_for_result(self, loop): to_complete_time = self._start_time + self.TEST_TIME.total_seconds() - while True: + while not self.all_completed(): now_time = time.clock_gettime(time.CLOCK_MONOTONIC) sleep_time = to_complete_time - now_time if sleep_time < 0: @@ -173,9 +176,12 @@ loop.schedule_timeout(sleep_time) loop.select() - def print_stats(self): + def all_completed(self): from functools import reduce - all_completed = reduce(lambda b, ms: b and ms.lu_time() is not None, self._results.values(), True) + return reduce(lambda b, ms: b and ms.has_lu_time(), self._results.values(), True) + + def print_stats(self): + all_completed = self.all_completed() min_value = min(self._results.values(), key=lambda x: x.lu_delay()) max_value = max(self._results.values(), key=lambda x: x.lu_delay()) -- To view, visit https://gerrit.osmocom.org/9716 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3575ee7618c35e3b66d25fa31844d267489d9179 Gerrit-Change-Number: 9716 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther <holger at freyther.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180623/e57613d9/attachment.htm>