test: Add hangup-call script for GCF testing
authorGuillaume Zajac <guillaume.zajac@linux.intel.com>
Mon, 6 Aug 2012 15:42:36 +0000 (17:42 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 6 Aug 2012 15:52:23 +0000 (08:52 -0700)
Makefile.am
test/hangup-call [new file with mode: 0755]

index 0c83775..56f9b34 100644 (file)
@@ -626,7 +626,8 @@ test_scripts = test/backtrace \
                test/release-and-answer \
                test/release-and-swap \
                test/hold-and-answer \
-               test/hangup-multiparty
+               test/hangup-multiparty \
+               test/hangup-call
 
 if TEST
 testdir = $(pkglibdir)/test
diff --git a/test/hangup-call b/test/hangup-call
new file mode 100755 (executable)
index 0000000..4c46ec0
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+if (len(sys.argv) < 2):
+       print "Usage: %s [ Call Path ]" % (sys.argv[0])
+       sys.exit(1)
+
+call = dbus.Interface(bus.get_object('org.ofono', sys.argv[1]),
+                                               'org.ofono.VoiceCall')
+call.Hangup()