summaryrefslogtreecommitdiffstats
path: root/test/hangup-active
diff options
context:
space:
mode:
authorAlfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>2014-06-10 10:27:16 +0200
committerDenis Kenzior <denkenz@gmail.com>2014-06-10 23:23:51 -0500
commitd9f252fb61f1f84b150a2cd74db4a5052380f867 (patch)
tree34e1890aa56723fb286ec681a5dffea5cf59ca29 /test/hangup-active
parent815d62888f4e46aa96d416c47a076839dbbc43f5 (diff)
downloadofono-d9f252fb61f1f84b150a2cd74db4a5052380f867.tar.bz2
test: Adapt voice call test scripts to multi-modem
Some tests scripts were not ready to handle situations with more than one modem present. This change fixes the scripts that handle voice calls.
Diffstat (limited to 'test/hangup-active')
-rwxr-xr-xtest/hangup-active10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/hangup-active b/test/hangup-active
index 8e65bc46..82e0eb0e 100755
--- a/test/hangup-active
+++ b/test/hangup-active
@@ -8,8 +8,14 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-modems = manager.GetModems()
-path = modems[0][0]
+if (len(sys.argv) == 1):
+ modems = manager.GetModems()
+ path = modems[0][0]
+elif (len(sys.argv) == 2):
+ path = sys.argv[1]
+else:
+ print("Usage: %s [modem]" % (sys.argv[0]))
+ sys.exit(1)
manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')