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/9720
Change subject: ms: Make the total test duration configurable
......................................................................
ms: Make the total test duration configurable
Change-Id: I5598d5dfd51e224e13835307ad20d108a5aa3935
---
M src/osmo_ms_driver/__main__.py
M src/osmo_ms_driver/location_update_test.py
2 files changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/20/9720/1
diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py
index 5314d71..1573084 100644
--- a/src/osmo_ms_driver/__main__.py
+++ b/src/osmo_ms_driver/__main__.py
@@ -23,6 +23,8 @@
from osmo_gsm_tester import log
# System modules
+from datetime import timedelta
+
import argparse
import atexit
import datetime
@@ -39,6 +41,9 @@
parser.add_argument('-i', '--launch-interval', dest='launch_interval',
default=100, type=int,
help="Time between launching in milliseconds")
+ parser.add_argument('-t', '--test-duration', dest="test_duration",
+ default=120, type=int,
+ help="Time of the test duration in seconds")
parser.add_argument('-d', '--distribution', dest="cdf_name",
choices=cdfs.keys(), default="ease_in_out",
help="Curve to use for starting within launch duration")
@@ -81,7 +86,7 @@
atexit.register(test.stop_all)
# Run until everything has been launched
- test.run_test(loop)
+ test.run_test(loop, timedelta(seconds=args.test_duration))
# Print stats
test.print_stats()
diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py
index c1113b1..3ba255c 100644
--- a/src/osmo_ms_driver/location_update_test.py
+++ b/src/osmo_ms_driver/location_update_test.py
@@ -55,7 +55,6 @@
TEMPLATE_LUA = "osmo-mobile-lu.lua"
TEMPLATE_CFG = "osmo-mobile.cfg"
- TEST_TIME = timedelta(seconds=120)
def __init__(self, name, number_of_ms, cdf_function, event_server, tmp_dir):
super().__init__(log.C_RUN, name)
@@ -143,10 +142,10 @@
return current_time + step_size, sleep_time
- def run_test(self, loop):
+ def run_test(self, loop, test_duration):
self.prepare(loop)
- to_complete_time = self._start_time + self.TEST_TIME.total_seconds()
+ to_complete_time = self._start_time + test_duration.total_seconds()
tick_time = self._start_time
while not self.all_completed():
--
To view, visit https://gerrit.osmocom.org/9720
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: I5598d5dfd51e224e13835307ad20d108a5aa3935
Gerrit-Change-Number: 9720
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/67b1fb03/attachment.htm>