summaryrefslogtreecommitdiffstats
path: root/test/test-call-settings
diff options
context:
space:
mode:
authorBertrand Aygon <bertrand.aygon@intel.com>2011-03-04 11:22:53 +0100
committerDenis Kenzior <denkenz@gmail.com>2011-03-08 13:21:52 -0600
commit8f954f28de9a5073caaa3e79103f1a760130a893 (patch)
tree7b8d7ca4657cc0a19fbfff649b88a9c2dd243888 /test/test-call-settings
parent2cb579005aec8755f0d1d273249b55a7ba8f5085 (diff)
downloadofono-8f954f28de9a5073caaa3e79103f1a760130a893.tar.bz2
test: Allow specifiying the modem
in test/test-call-settings
Diffstat (limited to 'test/test-call-settings')
-rwxr-xr-xtest/test-call-settings18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/test-call-settings b/test/test-call-settings
index f31fd1ad..32c89432 100755
--- a/test/test-call-settings
+++ b/test/test-call-settings
@@ -14,15 +14,12 @@ def property_changed(name, value):
if __name__ == "__main__":
if len(sys.argv) < 3:
- print "Usage: %s <property> <newvalue>" % (sys.argv[0])
+ print "Usage: %s [modem] <property> <newvalue>" % (sys.argv[0])
print "Properties can be: VoiceCallWaiting, HideCallerId"
sys.exit(1)
canexit = False
- property = sys.argv[1]
- newvalue = sys.argv[2]
-
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
@@ -31,8 +28,19 @@ if __name__ == "__main__":
'org.ofono.Manager')
modems = manager.GetModems()
+ modem = modems[0][0]
+
+ if (len(sys.argv) == 4):
+ modem = sys.argv[1]
+ property = sys.argv[2]
+ newvalue = sys.argv[3]
+ else:
+ property = sys.argv[1]
+ newvalue = sys.argv[2]
+
+ print "Using modem %s" % modem
- cs = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
+ cs = dbus.Interface(bus.get_object('org.ofono', modem),
'org.ofono.CallSettings')
cs.connect_to_signal("PropertyChanged", property_changed)