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/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/11517
Change subject: WIP: HACK to integrate suite_run in osmo_ms_driver
......................................................................
WIP: HACK to integrate suite_run in osmo_ms_driver
Template system still need to be ported to osmo-gsm-tester one, and Loop
needs to be moved to EventLoop.
Change-Id: Ic84a549f2fbe5fc0700f501a5e08dbaa9f5cbb78
---
M src/osmo_ms_driver/__main__.py
1 file changed, 30 insertions(+), 21 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/17/11517/1
diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py
index 1573084..8fcd154 100644
--- a/src/osmo_ms_driver/__main__.py
+++ b/src/osmo_ms_driver/__main__.py
@@ -50,6 +50,8 @@
parser.add_argument('-m', '--number-ms', dest="num_ms",
default=10, type=int,
help="Number of MobileStations to simulate")
+ parser.add_argument('trial_package',
+ help='Directory containing binaries to test')
return parser
def main():
@@ -61,35 +63,42 @@
# We don't care what is happening to child processes we spawn!
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
- loop = SimpleLoop()
+ with trial.Trial(args.trial_package) as current_trial:
+ current_trial.verify()
+ suite_scenario_str, suite_def, scenarios = suite.load_suite_scenario_str("nitb_netreg_mass")
+ current_trial.add_suite_run(suite_scenario_str, suite_def, scenarios)
+ #current_trial.run_suites(test_names)
+ suite_run = current_trial.suites[0]
- tmp_dir = tempfile.mkdtemp(suffix="osmo-ms-driver")
- log.log("Going to store files in ", tmp_dir=tmp_dir)
+ loop = SimpleLoop()
- # How long should starting all apps take
- time_start=datetime.timedelta(seconds=args.launch_duration)
- # In which steps to start processes
- time_step=datetime.timedelta(milliseconds=args.launch_interval)
+ tmp_dir = tempfile.mkdtemp(suffix="osmo-ms-driver")
+ log.log("Going to store files in ", tmp_dir=tmp_dir)
- # Event server path
- event_server_path = os.path.join(tmp_dir, "osmo_ms_driver.unix")
+ # How long should starting all apps take
+ time_start=datetime.timedelta(seconds=args.launch_duration)
+ # In which steps to start processes
+ time_step=datetime.timedelta(milliseconds=args.launch_interval)
- # The function that decides when to start something
- cdf = cdfs[args.cdf_name](time_start, time_step)
+ # Event server path
+ event_server_path = os.path.join(tmp_dir, "osmo_ms_driver.unix")
- # Event server to handle MS->test events
- ev_server = EventServer("ev_server", event_server_path)
- ev_server.listen(loop)
+ # The function that decides when to start something
+ cdf = cdfs[args.cdf_name](time_start, time_step)
- # Just a single test for now.
- test = MassUpdateLocationTest("lu_test", args.num_ms, cdf, ev_server, tmp_dir)
- atexit.register(test.stop_all)
+ # Event server to handle MS->test events
+ ev_server = EventServer("ev_server", event_server_path)
+ ev_server.listen(loop)
- # Run until everything has been launched
- test.run_test(loop, timedelta(seconds=args.test_duration))
+ # Just a single test for now.
+ test = MassUpdateLocationTest(suite_run, "lu_test", args.num_ms, cdf, ev_server, tmp_dir)
+ atexit.register(test.stop_all)
- # Print stats
- test.print_stats()
+ # Run until everything has been launched
+ test.run_test(loop, timedelta(seconds=args.test_duration))
+
+ # Print stats
+ test.print_stats()
if __name__ == '__main__':
main()
--
To view, visit https://gerrit.osmocom.org/11517
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: Ic84a549f2fbe5fc0700f501a5e08dbaa9f5cbb78
Gerrit-Change-Number: 11517
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181030/e7f00341/attachment.htm>