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/private-chat | |
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/private-chat')
-rwxr-xr-x | test/private-chat | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/private-chat b/test/private-chat index 17d17d0b..e7e5406c 100755 --- a/test/private-chat +++ b/test/private-chat @@ -3,24 +3,23 @@ import sys import dbus +if (len(sys.argv) != 2): + print("Usage: %s [voicecall_path]" % (sys.argv[0])) + exit(1) + 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) == 3): - path = sys.argv[1] - callid = sys.argv[2] -else: - callid = sys.argv[1] +call = sys.argv[1] +sep = call.find("/", 1) +path = call[0:sep] manager = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.VoiceCallManager') -mpty = manager.PrivateChat(callid, timeout=100) +mpty = manager.PrivateChat(call, timeout=100) for path in mpty: print(path) |