From fcc064e55c5da5a1dd3816d4add7c0143d622663 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 21 Oct 2010 21:44:51 +0200 Subject: [PATCH] test: Add option to also enable other than the first context --- test/activate-context | 5 ++++- test/deactivate-context | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/activate-context b/test/activate-context index 0b19b8cb..2e64db54 100755 --- a/test/activate-context +++ b/test/activate-context @@ -25,7 +25,10 @@ for path, properties in modems: connman.SetProperty("Powered", dbus.Boolean(1)) - path = contexts[0][0] + if len(sys.argv) > 1: + path = contexts[int(sys.argv[1])][0] + else: + path = contexts[0][0] context = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.ConnectionContext') diff --git a/test/deactivate-context b/test/deactivate-context index 04d4bc81..e3754c2e 100755 --- a/test/deactivate-context +++ b/test/deactivate-context @@ -23,7 +23,10 @@ for path, properties in modems: print "No context available" sys.exit(1) - path = contexts[0][0] + if len(sys.argv) > 1: + path = contexts[int(sys.argv[1])][0] + else: + path = contexts[0][0] context = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.ConnectionContext')