]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oeqa/runtime: output more logging from systemd when services have failed
authorRoss Burton <ross.burton@intel.com>
Thu, 5 Dec 2013 12:56:01 +0000 (12:56 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Dec 2013 13:33:22 +0000 (13:33 +0000)
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>
meta/lib/oeqa/runtime/systemd.py

index e4f433632f77f765ae2c5041a8c26decb2dec3b3..17cc19f7a513e1b3a59ad735682bb91268c30941 100644 (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):