summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-19 19:44:06 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2009-07-19 19:44:06 (GMT)
commitd071758739ad4961b30259772f4cc1066cea369e (patch)
treeaff11c6b0b0f20f2e9d7d082a9f81f6388d47d99
parentd681085658eec2e3f0c64d4915c25d4e8481f824 (diff)
downloadconnman-d071758739ad4961b30259772f4cc1066cea369e.zip
connman-d071758739ad4961b30259772f4cc1066cea369e.tar.gz
connman-d071758739ad4961b30259772f4cc1066cea369e.tar.bz2
Add option for offline mode to test script
-rwxr-xr-xtest/test-connman14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test-connman b/test/test-connman
index bbe47bc..dff1a25 100755
--- a/test/test-connman
+++ b/test/test-connman
@@ -21,6 +21,7 @@ if len(sys.argv) < 2:
print " scan [type]"
print " enable <type>"
print " disable <type>"
+ print " offlinemode [on|off]"
print ""
print " dev <interface>"
print " dev <interface> scan"
@@ -255,6 +256,19 @@ elif sys.argv[1] == "disable":
else:
manager.DisableTechnology("")
+elif sys.argv[1] in ["offlinemode", "flightmode"]:
+ if len(sys.argv) > 2:
+ if sys.argv[2] == "on":
+ active = dbus.Boolean(1)
+ elif sys.argv[2] == "off":
+ active = dbus.Boolean(0)
+ else:
+ active = dbus.Boolean(sys.argv[2])
+ manager.SetProperty("OfflineMode", active)
+ else:
+ properties = manager.GetProperties()
+ print "Offline mode is %s" % (properties["OfflineMode"])
+
elif sys.argv[1] == "dev":
properties = manager.GetProperties()