mirror of git://git.sysmocom.de/ofono
test: Add swap-calls test script
This commit is contained in:
parent
847a09dc47
commit
407e177bc1
|
@ -512,7 +512,8 @@ test_scripts = test/backtrace \
|
||||||
test/cdma-connman-disable \
|
test/cdma-connman-disable \
|
||||||
test/cdma-connman-enable \
|
test/cdma-connman-enable \
|
||||||
test/set-context-property \
|
test/set-context-property \
|
||||||
test/test-gnss
|
test/test-gnss \
|
||||||
|
test/swap-calls
|
||||||
|
|
||||||
if TEST
|
if TEST
|
||||||
testdir = $(pkglibdir)/test
|
testdir = $(pkglibdir)/test
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import dbus
|
||||||
|
|
||||||
|
bus = dbus.SystemBus()
|
||||||
|
|
||||||
|
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||||
|
'org.ofono.Manager')
|
||||||
|
|
||||||
|
modems = manager.GetModems()
|
||||||
|
modem = modems[0][0]
|
||||||
|
|
||||||
|
if (len(sys.argv) == 2):
|
||||||
|
modem = sys.argv[1]
|
||||||
|
|
||||||
|
manager = dbus.Interface(bus.get_object('org.ofono', modem),
|
||||||
|
'org.ofono.VoiceCallManager')
|
||||||
|
|
||||||
|
manager.SwapCalls()
|
Loading…
Reference in New Issue