diff options
author | Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com> | 2014-06-10 10:27:16 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2014-06-10 23:23:51 -0500 |
commit | d9f252fb61f1f84b150a2cd74db4a5052380f867 (patch) | |
tree | 34e1890aa56723fb286ec681a5dffea5cf59ca29 /test/hangup-active | |
parent | 815d62888f4e46aa96d416c47a076839dbbc43f5 (diff) | |
download | ofono-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-x | test/hangup-active | 10 |
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') |