[PATCH] osmo-gsm-manuals[master]: OsmoGsmTester: Update sample test script

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.org
Wed Jun 14 14:07:25 UTC 2017


Review at  https://gerrit.osmocom.org/2917

OsmoGsmTester: Update sample test script

Copied from newest sms.py test.

Change-Id: I49644f6f8223d45bccbcbb3aa8325c20c06dcdbe
---
M OsmoGSMTester/chapters/intro.adoc
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/17/2917/1

diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc
index 8a09910..50b6dff 100644
--- a/OsmoGSMTester/chapters/intro.adoc
+++ b/OsmoGSMTester/chapters/intro.adoc
@@ -161,7 +161,6 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.test import *
 
-print('use resources...')
 nitb = suite.nitb()
 bts = suite.bts()
 ms_mo = suite.modem()
@@ -170,19 +169,21 @@
 print('start nitb and bts...')
 nitb.bts_add(bts)
 nitb.start()
-sleep(1)
-assert nitb.running()
 bts.start()
 
 nitb.subscriber_add(ms_mo)
 nitb.subscriber_add(ms_mt)
 
-ms_mo.connect(nitb)
-ms_mt.connect(nitb)
+ms_mo.connect(nitb.mcc_mnc())
+ms_mt.connect(nitb.mcc_mnc())
+
+print('waiting for modems to attach...')
+wait(ms_mo.is_connected, nitb.mcc_mnc())
+wait(ms_mt.is_connected, nitb.mcc_mnc())
 wait(nitb.subscriber_attached, ms_mo, ms_mt)
 
-sms = ms_mo.sms_send(ms_mt.msisdn)
-wait(ms_mt.sms_received, sms)
+sms = ms_mo.sms_send(ms_mt)
+wait(ms_mt.sms_was_received, sms)
 ----
 
 === Resource Resolution

-- 
To view, visit https://gerrit.osmocom.org/2917
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49644f6f8223d45bccbcbb3aa8325c20c06dcdbe
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list