summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-06-14 15:57:12 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-11-28 17:15:33 +0100
commit422f8bae65964d577b84d7f75dc512570492116b (patch)
tree0832c0bef27a96754c31e4f559f6bdf00decd5a2
parentee57f0952a68cd3ffa1c7421d4a9fce8caec869f (diff)
OsmoGsmTester: Update sample test script
Copied from newest mo_mt_sms.py test. Change-Id: I49644f6f8223d45bccbcbb3aa8325c20c06dcdbe
-rw-r--r--doc/manuals/chapters/intro.adoc15
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/manuals/chapters/intro.adoc b/doc/manuals/chapters/intro.adoc
index 8a09910..50b6dff 100644
--- a/doc/manuals/chapters/intro.adoc
+++ b/doc/manuals/chapters/intro.adoc
@@ -161,7 +161,6 @@ A typical single test script (part of a suite) may look like this:
#!/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 @@ ms_mt = suite.modem()
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