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.
This commit is contained in:
Patrick Ohly 2013-03-04 07:29:10 -08:00
parent 1995bd6184
commit 87177c71c9
1 changed files with 9 additions and 7 deletions

View File

@ -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'),