Rebasing and adding CDMA MO Call test scripts --- Makefile.am | 5 ++++- test/cdma-dial-number | 24 ++++++++++++++++++++++++ test/cdma-hangup | 20 ++++++++++++++++++++ test/cdma-list-call | 25 +++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletions(-) create mode 100755 test/cdma-dial-number create mode 100755 test/cdma-hangup create mode 100755 test/cdma-list-call
diff --git a/Makefile.am b/Makefile.am index a68fc36..abdf5ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -455,7 +455,10 @@ test_scripts = test/backtrace \ test/set-gsm-band \ test/set-umts-band \ test/lockdown-modem \ - test/set-call-forwarding + test/set-call-forwarding \ + test/cdma-list-call \ + test/cdma-dial-number \ + test/cdma-hangup if TEST testdir = $(pkglibdir)/test diff --git a/test/cdma-dial-number b/test/cdma-dial-number new file mode 100755 index 0000000..54a67b3 --- /dev/null +++ b/test/cdma-dial-number @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +if len(sys.argv) > 2: + path = sys.argv[1] + number = sys.argv[2] +else: + modems = manager.GetModems() + path, properties = modems[0] + number = sys.argv[1] + +print "Using modem %s" % path + +manager = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.cdma.VoiceCallManager') + +manager.Dial(number) diff --git a/test/cdma-hangup b/test/cdma-hangup new file mode 100755 index 0000000..f8e631e --- /dev/null +++ b/test/cdma-hangup @@ -0,0 +1,20 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +if len(sys.argv) > 2: + path = sys.argv[1] +else: + modems = manager.GetModems() + path, properties = modems[0] + +manager = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.cdma.VoiceCallManager') + +manager.Hangup() diff --git a/test/cdma-list-call b/test/cdma-list-call new file mode 100755 index 0000000..c941383 --- /dev/null +++ b/test/cdma-list-call @@ -0,0 +1,25 @@ +#!/usr/bin/python + +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +modems = manager.GetModems() + +for path, properties in modems: + print "[ %s ]" % (path) + + if "org.ofono.cdma.VoiceCallManager" not in properties["Interfaces"]: + continue + + mgr = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.cdma.VoiceCallManager') + + properties = mgr.GetProperties() + + for key in properties.keys(): + val = str(properties[key]) + print " %s = %s" % (key, val) -- 1.7.0.4 _______________________________________________ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono