Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mail.openembedded.org (Postfix) with ESMTP id 948477398C for ; Wed, 11 Mar 2015 21:25:47 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 11 Mar 2015 14:25:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,384,1422950400"; d="scan'208";a="539582117" Received: from localhost.jf.intel.com ([10.7.201.37]) by orsmga003.jf.intel.com with ESMTP; 11 Mar 2015 14:25:10 -0700 From: Randy Witt To: openembedded-core@lists.openembedded.org Date: Wed, 11 Mar 2015 14:25:45 -0700 Message-Id: <1426109145-12904-1-git-send-email-randy.e.witt@linux.intel.com> X-Mailer: git-send-email 1.9.3 Subject: [PATCH] lib/oeqa/runtime/systemd: Add a basic runtime test for the journal X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2015 21:25:50 -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 --- meta/lib/oeqa/runtime/systemd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/lib/oeqa/runtime/systemd.py b/meta/lib/oeqa/runtime/systemd.py index 1451698..5935edd 100644 --- a/meta/lib/oeqa/runtime/systemd.py +++ b/meta/lib/oeqa/runtime/systemd.py @@ -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) -- 1.9.3