From d9f252fb61f1f84b150a2cd74db4a5052380f867 Mon Sep 17 00:00:00 2001 From: Alfonso Sanchez-Beato Date: Tue, 10 Jun 2014 10:27:16 +0200 Subject: 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. --- test/private-chat | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'test/private-chat') 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) -- cgit v1.2.3