From 407e177bc1a10a96d8cdeee28eada5e164ff90e5 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 28 Apr 2011 09:30:54 -0500 Subject: [PATCH] test: Add swap-calls test script --- Makefile.am | 3 ++- test/swap-calls | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 test/swap-calls 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()