summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-06-14 15:57:12 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-14 22:37:11 +0000
commit4c5e2863f37ffddd6feb95f582c0ac1cbac1794a (patch)
treeeaa8e7634dbd589979a0f2f1ef5e0139577a5d00
parent3e646810f0bc1c6952a42a60499f33e32afa6081 (diff)
OsmoGsmTester: Update sample test script
Copied from newest mo_mt_sms.py test. Change-Id: I49644f6f8223d45bccbcbb3aa8325c20c06dcdbe
-rw-r--r--OsmoGSMTester/chapters/intro.adoc15
1 files changed, 8 insertions, 7 deletions
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 @@ 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