lib/oeqa/runtime: output more logging from systemd when services have failed

If some services have failed to start, get the status of them and some of their
log to help debug the problem.

(From OE-Core rev: e371765431be25b81dbdb385233e3db5851e59d0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2013-12-05 12:56:01 +00:00 committed by Richard Purdie
parent 5c58ba9fca
commit 8dee33872b
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ class SystemdTests(oeRuntimeTest):
@skipUnlessPassed('test_systemd_version')
def test_systemd_failed(self):
(status, output) = self.target.run('systemctl --failed | grep "0 loaded units listed"')
self.assertEqual(status, 0, msg="Failed systemd services: %s" % self.target.run('systemctl --failed')[1])
if status != 0:
print self.target.run('systemctl status --failed -l')[1]
self.fail("Some systemd units failed.")
@skipUnlessPassed('test_systemd_version')
def test_systemd_service(self):