diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-04-14 08:54:15 +0200 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-04-15 16:24:37 +0200 |
commit | 236f94cc0bc98d700525b6efc82ee5a26b32d77c (patch) | |
tree | e3711dc08c508f34e8f80685c762cf2063f34b61 /test/test-session | |
parent | a5cb20902fb792eec0d9d3926d6293defe705cd9 (diff) | |
download | connman-236f94cc0bc98d700525b6efc82ee5a26b32d77c.tar.gz connman-236f94cc0bc98d700525b6efc82ee5a26b32d77c.tar.bz2 connman-236f94cc0bc98d700525b6efc82ee5a26b32d77c.zip |
test-session: Allow multi test sessions
Diffstat (limited to 'test/test-session')
-rwxr-xr-x | test/test-session | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test-session b/test/test-session index 21a2019a..2ded3d97 100755 --- a/test/test-session +++ b/test/test-session @@ -2,6 +2,7 @@ import sys import gobject +import string import dbus import dbus.service @@ -255,8 +256,10 @@ def main(): app_path = sys.argv[2] bus = dbus.SessionBus() + app_name = "com.example.SessionApplication.%s" % (string.strip(app_path, "/")) + if sys.argv[1] == "run": - name = dbus.service.BusName("com.example.SessionApplication", bus) + name = dbus.service.BusName(app_name, bus) mainloop = gobject.MainLoop() app = SessionApplication(bus, app_path, mainloop) @@ -264,7 +267,7 @@ def main(): mainloop.run() return - app = dbus.Interface(bus.get_object("com.example.SessionApplication", app_path), + app = dbus.Interface(bus.get_object(app_name, app_path), "com.example.TestSession") if sys.argv[1] == "create": |