diff options
| author | Yeoh Ee Peng <ee.peng.yeoh@intel.com> | 2020-04-06 10:57:47 +0800 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2020-04-07 08:39:51 +0800 |
| commit | bd539ea962ee285eb71053583e3c17fa166fc610 (patch) | |
| tree | ee579a0352f2985329effbf1cba89d46ec2865b6 /lib/oeqa/runtime/cases | |
| parent | 22349bb35049b96f6e4e0b1342212950a7e551a9 (diff) | |
| download | meta-intel-bd539ea962ee285eb71053583e3c17fa166fc610.tar.gz | |
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>
Diffstat (limited to 'lib/oeqa/runtime/cases')
| -rw-r--r-- | lib/oeqa/runtime/cases/jhi.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/jhi.py b/lib/oeqa/runtime/cases/jhi.py new file mode 100644 index 00000000..7a24b6da --- /dev/null +++ b/lib/oeqa/runtime/cases/jhi.py | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | import os | ||
| 2 | from oeqa.runtime.decorator.package import OEHasPackage | ||
| 3 | from oeqa.runtime.case import OERuntimeTestCase | ||
| 4 | from oeqa.core.decorator.depends import OETestDepends | ||
| 5 | |||
| 6 | class JhiTest(OERuntimeTestCase): | ||
| 7 | |||
| 8 | @classmethod | ||
| 9 | def tearDownClass(cls): | ||
| 10 | _, output = cls.tc.target.run('pidof jhid') | ||
| 11 | cls.tc.target.run('kill %s' % output) | ||
| 12 | |||
| 13 | @OEHasPackage(['openssh-sshd']) | ||
| 14 | @OEHasPackage(['jhi']) | ||
| 15 | def test_jhi_mei_driver(self): | ||
| 16 | command = 'ls /dev/mei*' | ||
| 17 | (status, output) = self.target.run(command) | ||
| 18 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
| 19 | |||
| 20 | @OETestDepends(['jhi.JhiTest.test_jhi_mei_driver']) | ||
| 21 | def test_jhi_daemon_version(self): | ||
| 22 | command = 'jhid -v' | ||
| 23 | (status, output) = self.target.run(command) | ||
| 24 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
| 25 | |||
| 26 | @OETestDepends(['jhi.JhiTest.test_jhi_mei_driver']) | ||
| 27 | def test_jhi_daemon_can_initialized(self): | ||
| 28 | command = 'jhid -d' | ||
| 29 | (status, output) = self.target.run(command) | ||
| 30 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
| 31 | |||
| 32 | @OEHasPackage(['jhi-test']) | ||
| 33 | @OETestDepends(['jhi.JhiTest.test_jhi_daemon_can_initialized']) | ||
| 34 | def test_jhi_bist(self): | ||
| 35 | (status, output) = self.target.run('uname -m') | ||
| 36 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
| 37 | if 'x86_64' not in output: | ||
| 38 | self.skipTest("Skipped jhi bist test if not x86_64 machine (current machine: %s)." % output) | ||
| 39 | command = 'bist' | ||
| 40 | (status, output) = self.target.run(command) | ||
| 41 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
