summaryrefslogtreecommitdiffstats
path: root/suites
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-05-06 15:06:04 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-05-08 11:04:26 +0000
commit67cea22236096a23e096e2c119dc03f74398f5c2 (patch)
tree3c6e39fd384f947997c90e5ae498aae7ad774612 /suites
parentcccbe5987db2ae97f766ae018c45c4fc0f7b3c26 (diff)
add debug suite
Diffstat (limited to 'suites')
-rwxr-xr-xsuites/debug/interactive.py36
-rw-r--r--suites/debug/suite.conf10
2 files changed, 46 insertions, 0 deletions
diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py
new file mode 100755
index 0000000..ff5da30
--- /dev/null
+++ b/suites/debug/interactive.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.test import *
+
+print('use resources...')
+nitb = suite.nitb()
+bts = suite.bts()
+modems = suite.modems(int(prompt('How many modems?')))
+
+print('start nitb and bts...')
+nitb.bts_add(bts)
+nitb.start()
+bts.start()
+
+for m in modems:
+ nitb.subscriber_add(m)
+ m.connect(nitb)
+
+while True:
+ cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered')
+ cmd = cmd.strip().lower()
+
+ if not cmd:
+ continue
+ if 'quit'.startswith(cmd):
+ break
+ elif 'wait-registered'.startswith(cmd):
+ wait(nitb.subscriber_attached, *modems)
+ elif 'get-registered'.startswith(cmd):
+ print(nitb.imsi_list_attached())
+ print('RESULT: %s' %
+ ('All modems are registered.' if nitb.subscriber_attached(*modems)
+ else 'Some modem(s) not registered yet.'))
+ elif 'sms'.startswith(cmd):
+ for mo in modems:
+ for mt in modems:
+ mo.sms_send(mt.msisdn, 'to ' + mt.name())
diff --git a/suites/debug/suite.conf b/suites/debug/suite.conf
new file mode 100644
index 0000000..04959b8
--- /dev/null
+++ b/suites/debug/suite.conf
@@ -0,0 +1,10 @@
+resources:
+ nitb_iface:
+ - times: 1
+ bts:
+ - times: 1
+ modem:
+ - times: 4
+
+defaults:
+ timeout: 60s