mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-05 05:04:45 +02:00
runtime/jhi: Enable sanity test
jhi test validate that jhi daemon and jhi library can work to deliver dynamic application loading. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
parent
22349bb350
commit
bd539ea962
41
lib/oeqa/runtime/cases/jhi.py
Normal file
41
lib/oeqa/runtime/cases/jhi.py
Normal file
|
@ -0,0 +1,41 @@
|
|||
import os
|
||||
from oeqa.runtime.decorator.package import OEHasPackage
|
||||
from oeqa.runtime.case import OERuntimeTestCase
|
||||
from oeqa.core.decorator.depends import OETestDepends
|
||||
|
||||
class JhiTest(OERuntimeTestCase):
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
_, output = cls.tc.target.run('pidof jhid')
|
||||
cls.tc.target.run('kill %s' % output)
|
||||
|
||||
@OEHasPackage(['openssh-sshd'])
|
||||
@OEHasPackage(['jhi'])
|
||||
def test_jhi_mei_driver(self):
|
||||
command = 'ls /dev/mei*'
|
||||
(status, output) = self.target.run(command)
|
||||
self.assertEqual(status, 0, msg="Error messages: %s" % output)
|
||||
|
||||
@OETestDepends(['jhi.JhiTest.test_jhi_mei_driver'])
|
||||
def test_jhi_daemon_version(self):
|
||||
command = 'jhid -v'
|
||||
(status, output) = self.target.run(command)
|
||||
self.assertEqual(status, 0, msg="Error messages: %s" % output)
|
||||
|
||||
@OETestDepends(['jhi.JhiTest.test_jhi_mei_driver'])
|
||||
def test_jhi_daemon_can_initialized(self):
|
||||
command = 'jhid -d'
|
||||
(status, output) = self.target.run(command)
|
||||
self.assertEqual(status, 0, msg="Error messages: %s" % output)
|
||||
|
||||
@OEHasPackage(['jhi-test'])
|
||||
@OETestDepends(['jhi.JhiTest.test_jhi_daemon_can_initialized'])
|
||||
def test_jhi_bist(self):
|
||||
(status, output) = self.target.run('uname -m')
|
||||
self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
|
||||
if 'x86_64' not in output:
|
||||
self.skipTest("Skipped jhi bist test if not x86_64 machine (current machine: %s)." % output)
|
||||
command = 'bist'
|
||||
(status, output) = self.target.run(command)
|
||||
self.assertEqual(status, 0, msg="Error messages: %s" % output)
|
Loading…
Reference in New Issue
Block a user