test: Add register-auto

This commit is contained in:
Denis Kenzior 2016-01-28 22:05:43 -06:00
parent 5e4ce76bba
commit f7088384e8
2 changed files with 20 additions and 1 deletions

View File

@ -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

18
test/register-auto Executable file
View File

@ -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()