integration-test: Fix parsing of daemon path in system mode
authorMartin Pitt <martinpitt@gnome.org>
Wed, 13 Jun 2012 14:44:54 +0000 (16:44 +0200)
committerMartin Pitt <martinpitt@gnome.org>
Wed, 13 Jun 2012 14:44:54 +0000 (16:44 +0200)
Only take the first word of the Exec= line in the udisks D-BUS service file, so
that extra arguments like --no-debug get ignored.

With that, integration-test runs fine against the system installed binaries
again.

src/tests/integration-test

index dd9f62e..c09c367 100755 (executable)
@@ -111,7 +111,7 @@ class UDisksTestCase(unittest.TestCase):
             daemon_path = None
             for l in open('/usr/share/dbus-1/system-services/org.freedesktop.UDisks2.service'):
                 if l.startswith('Exec='):
-                    daemon_path = l.split('=', 1)[1].strip()
+                    daemon_path = l.split('=', 1)[1].split()[0]
                     break
             assert daemon_path, 'could not determine daemon path from D-BUS .service file'