Hi,
1st patch adds hold-and-answer script needed GPP test cases:
31.3.2.1, 31.3.2.2 and 31.3.2.3 in 3GPP 51.010.
2nd patch adds hangup <call_state> script needed for 3GPP test case 31.3.1.3.1
in 3GPP 51.0.10.
Guillaume Zajac (2):
test: Add hold-and-answer script for GCF testing
test: Add hangup script for GCF testing
Makefile.am | 4 ++-
test/hangup | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++
test/hold-and-answer | 20 ++++++++++++++++++
3 files changed, 76 insertions(+), 1 deletions(-)
create mode 100755 test/hangup
create mode 100755 test/hold-and-answer
--
1.7.5.4
Show replies by date
---
Makefile.am | 3 ++-
test/hold-and-answer | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletions(-)
create mode 100755 test/hold-and-answer
diff --git a/Makefile.am b/Makefile.am
index b35cf1f..4410043 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -622,7 +622,8 @@ test_scripts = test/backtrace \
test/set-context-property \
test/test-gnss \
test/swap-calls \
- test/release-and-answer
+ test/release-and-answer \
+ test/hold-and-answer
if TEST
testdir = $(pkglibdir)/test
diff --git a/test/hold-and-answer b/test/hold-and-answer
new file mode 100755
index 0000000..2c47e27
--- /dev/null
+++ b/test/hold-and-answer
@@ -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')
+
+modems = manager.GetModems()
+modem = modems[0][0]
+
+if (len(sys.argv) == 2):
+ modem = sys.argv[1]
+
+manager = dbus.Interface(bus.get_object('org.ofono', modem),
+ 'org.ofono.VoiceCallManager')
+
+manager.HoldAndAnswer(timeout=100)
--
1.7.5.4
---
Makefile.am | 3 ++-
test/hangup | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 1 deletions(-)
create mode 100755 test/hangup
diff --git a/Makefile.am b/Makefile.am
index 4410043..01b79ff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -623,7 +623,8 @@ test_scripts = test/backtrace \
test/test-gnss \
test/swap-calls \
test/release-and-answer \
- test/hold-and-answer
+ test/hold-and-answer \
+ test/hangup
if TEST
testdir = $(pkglibdir)/test
diff --git a/test/hangup b/test/hangup
new file mode 100755
index 0000000..186e323
--- /dev/null
+++ b/test/hangup
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+
+modems = manager.GetModems()
+path = modems[0][0]
+
+manager = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.VoiceCallManager')
+
+calls = manager.GetCalls()
+if (len(calls) == 0):
+ print "No calls available"
+ sys.exit(1)
+
+if (len(sys.argv) < 2):
+ print
+ print "[ call path ] < call state >"
+ print
+ for path, properties in calls:
+ state = properties["State"]
+ print "[ %s ] < %s >" % (path, state)
+ print
+
+ print "Usage: %s < call state >" % (sys.argv[0])
+ print
+ sys.exit(1)
+
+cstate = sys.argv[1]
+
+if cstate != "active" and cstate != "waiting" and cstate !=
"held":
+ print "Valid < call state > is active / waiting / held"
+ sys.exit(1)
+
+for path, properties in calls:
+ print
+ state = properties["State"]
+ print "[ %s ] < %s >" % (path, state)
+ print
+
+ if state != cstate:
+ continue
+
+ call = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.VoiceCall')
+
+ call.Hangup()
--
1.7.5.4