diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-04-18 12:02:28 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-04-18 12:02:28 -0700 |
commit | c59ffcc46e6c1d94ad6ef7609c088578f685393b (patch) | |
tree | 276dac553990000dbd4a01f69f0499d4854ee91b /test | |
parent | a51d364ba254346c4b6722945caf4e6eb90d05df (diff) | |
download | connman-c59ffcc46e6c1d94ad6ef7609c088578f685393b.tar.gz connman-c59ffcc46e6c1d94ad6ef7609c088578f685393b.tar.bz2 connman-c59ffcc46e6c1d94ad6ef7609c088578f685393b.zip |
test: Add scripts for timeserver modifications
Diffstat (limited to 'test')
-rwxr-xr-x | test/get-global-timeservers | 12 | ||||
-rwxr-xr-x | test/set-global-timeservers | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/get-global-timeservers b/test/get-global-timeservers new file mode 100755 index 00000000..adcf175a --- /dev/null +++ b/test/get-global-timeservers @@ -0,0 +1,12 @@ +#!/usr/bin/python + +import dbus + +bus = dbus.SystemBus() + +clock = dbus.Interface(bus.get_object('net.connman', '/'), + 'net.connman.Clock') + +properties = clock.GetProperties() + +print "Timeserver is %s" % (properties["Timeservers"]) diff --git a/test/set-global-timeservers b/test/set-global-timeservers new file mode 100755 index 00000000..d7551a11 --- /dev/null +++ b/test/set-global-timeservers @@ -0,0 +1,18 @@ +#!/usr/bin/python + +import sys +import dbus + +if (len(sys.argv) < 1): + print "Usage: %s [timeserver*]" % (sys.argv[0]) + sys.exit(1) + +bus = dbus.SystemBus() + +clock = dbus.Interface(bus.get_object('net.connman', '/'), + 'net.connman.Clock') + +print "Setting timeserver to %s" % (sys.argv[1:]) + +clock.SetProperty("Timeservers", dbus.Array(sys.argv[1:], + signature=dbus.Signature('s'))) |