diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2013-03-04 07:29:10 -0800 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2013-03-04 07:36:22 -0800 |
commit | 87177c71c96ff137ec5dc2e71803390b810881a6 (patch) | |
tree | 01d239c0780fd25bf293d87c7f341f7bc09541ef | |
parent | 1995bd618483306f418233c74c14160495a6f803 (diff) |
D-Bus testing: more logging in auto start test
Capture output and include it error report. Helped to track
down the reason why startup failed in the jhbuild environment.
-rwxr-xr-x | test/test-dbus.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/test-dbus.py b/test/test-dbus.py index bbd96364..df22112b 100755 --- a/test/test-dbus.py +++ b/test/test-dbus.py @@ -1450,18 +1450,20 @@ Exec=%s del env[key] # First run something which just starts the daemon. - dbus = subprocess.Popen((os.path.join(os.path.dirname(sys.argv[0]), 'dbus-session.sh'), - 'dbus-send', - '--print-reply', - '--dest=org.syncevolution', - '/', - 'org.freedesktop.DBus.Introspectable.Introspect'), + cmd = (os.path.join(os.path.dirname(sys.argv[0]), 'dbus-session.sh'), + 'dbus-send', + '--print-reply', + '--dest=org.syncevolution', + '/', + 'org.freedesktop.DBus.Introspectable.Introspect') + dbus = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) (out, err) = dbus.communicate() self.assertEqual(0, dbus.returncode, - msg='introspection of syncevo-dbus-server failed:\n' + out) + msg='introspection of syncevo-dbus-server failed:\nenv = %s\ncmd = %s:\output:\n%s' % + (env, cmd, out)) # Now try some real command. dbus = subprocess.Popen((os.path.join(os.path.dirname(sys.argv[0]), 'dbus-session.sh'), |