]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oeqa/runtime/systemd: Add a basic runtime test for the journal
authorRandy Witt <randy.e.witt@linux.intel.com>
Mon, 9 Mar 2015 20:04:14 +0000 (13:04 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Mar 2015 17:37:17 +0000 (17:37 +0000)
The test_systemd_journal() test will fail if journalctl exits with a
non-zero exit status. The exit status is non-zero even if there are no
journal files, which is what drove the creation of this test.

[Yocto #7388]

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/runtime/systemd.py

index 1451698bb39a2ae31ee49757560ea7d99cb7d256..5935edd5492248b137d09e5bbeb8324d82ee2993 100644 (file)
@@ -86,3 +86,9 @@ class SystemdServiceTests(SystemdTest):
         self.systemctl('is-enabled', 'avahi-daemon.service', expected=1)
         self.systemctl('enable', 'avahi-daemon.service')
         self.systemctl('is-enabled', 'avahi-daemon.service')
+
+class SystemdJournalTests(SystemdTest):
+    @skipUnlessPassed('test_ssh')
+    def test_systemd_journal(self):
+        (status, output) = self.target.run('journalctl')
+        self.assertEqual(status, 0, output)