[OE-core] [PATCH 3/3] lib/oeqa/runtime: output more logging from systemd when services have failed

Ross Burton ross.burton at intel.com
Thu Dec 5 12:56:01 UTC 2013


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 at intel.com>
---
 meta/lib/oeqa/runtime/systemd.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/runtime/systemd.py b/meta/lib/oeqa/runtime/systemd.py
index e4f4336..17cc19f 100644
--- a/meta/lib/oeqa/runtime/systemd.py
+++ b/meta/lib/oeqa/runtime/systemd.py
@@ -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):
-- 
1.7.10.4




More information about the Openembedded-core mailing list