diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-05-08 14:08:54 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-05-08 14:08:54 +0000 |
commit | fcba5ddbba50277ab533ac9efc8414f8b839ec8e (patch) | |
tree | 7075396ea70e58209a49ed7bf3f1cd1060acd366 /network | |
parent | 89aa5447d1310dc3b9a8591dbe80abac9239a114 (diff) |
Add service test scripts
Diffstat (limited to 'network')
-rw-r--r-- | network/Makefile.am | 2 | ||||
-rwxr-xr-x | network/test-network | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/network/Makefile.am b/network/Makefile.am index e01bd4b9..17869043 100644 --- a/network/Makefile.am +++ b/network/Makefile.am @@ -23,6 +23,6 @@ AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @HAL_CFLAGS@ @GLIB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common -EXTRA_DIST = network.service network-api.txt +EXTRA_DIST = network.service network-api.txt test-network MAINTAINERCLEANFILES = Makefile.in diff --git a/network/test-network b/network/test-network new file mode 100755 index 00000000..8860003b --- /dev/null +++ b/network/test-network @@ -0,0 +1,27 @@ +#!/usr/bin/python + +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), + 'org.bluez.Manager') + +conn = manager.ActivateService('network') + +network = dbus.Interface(bus.get_object(conn, '/org/bluez/network'), + 'org.bluez.network.Manager') + +try: + nap = dbus.Interface(bus.get_object('org.bluez.network', + network.FindAdapter('nap')), + 'org.bluez.network.Server') +except: + pass + +try: + gn = dbus.Interface(bus.get_object('org.bluez.network', + network.FindAdapter('gn')), + 'org.bluez.network.Server') +except: + pass |