diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-04-28 09:30:54 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-04-28 09:30:54 -0500 |
commit | 407e177bc1a10a96d8cdeee28eada5e164ff90e5 (patch) | |
tree | e49e4e790489adc1327637a3de0582354f0cc07b | |
parent | 847a09dc47207a3c293020d5ef639bd47db45ece (diff) | |
download | ofono-407e177bc1a10a96d8cdeee28eada5e164ff90e5.tar.bz2 |
test: Add swap-calls test script
-rw-r--r-- | Makefile.am | 3 | ||||
-rwxr-xr-x | test/swap-calls | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 56c12b52..a413a479 100644 --- a/Makefile.am +++ b/Makefile.am @@ -512,7 +512,8 @@ test_scripts = test/backtrace \ test/cdma-connman-disable \ test/cdma-connman-enable \ test/set-context-property \ - test/test-gnss + test/test-gnss \ + test/swap-calls if TEST testdir = $(pkglibdir)/test diff --git a/test/swap-calls b/test/swap-calls new file mode 100755 index 00000000..4996e0c9 --- /dev/null +++ b/test/swap-calls @@ -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() |