mirror of git://git.sysmocom.de/ofono
test: Add register-auto
This commit is contained in:
parent
5e4ce76bba
commit
f7088384e8
|
@ -729,7 +729,8 @@ test_scripts = test/backtrace \
|
|||
test/hangup-call \
|
||||
test/display-icon \
|
||||
test/set-msisdn \
|
||||
test/set-ddr
|
||||
test/set-ddr \
|
||||
test/register-auto
|
||||
|
||||
if TEST
|
||||
testdir = $(pkglibdir)/test
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import dbus
|
||||
import sys
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
|
||||
if len(sys.argv) == 2:
|
||||
path = sys.argv[1]
|
||||
else:
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
modems = manager.GetModems()
|
||||
path = modems[0][0]
|
||||
|
||||
netreg = dbus.Interface(bus.get_object('org.ofono', path),
|
||||
'org.ofono.NetworkRegistration')
|
||||
netreg.Register()
|
Loading…
Reference in New Issue