If some services have failed to start, get the status of them and some of their
log to help debug the problem.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
@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):