test: Add release-and-swap script

This commit is contained in:
Denis Kenzior 2012-08-05 23:32:01 -05:00
parent 3d57bf37d0
commit e4b284860e
2 changed files with 23 additions and 0 deletions

View File

@ -624,6 +624,7 @@ test_scripts = test/backtrace \
test/test-gnss \
test/swap-calls \
test/release-and-answer \
test/release-and-swap \
test/hold-and-answer \
test/hangup-multiparty

22
test/release-and-swap Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
modems = manager.GetModems()
for path, properties in modems:
print "[ %s ]" % (path)
if "org.ofono.VoiceCallManager" not in properties["Interfaces"]:
continue
mgr = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
mgr.ReleaseAndSwap()
break