jhi test validate that jhi daemon and jhi library can work to deliver
dynamic application loading.

Signed-off-by: Yeoh Ee Peng <[email protected]>
---
 lib/oeqa/runtime/cases/jhi.py | 67 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 lib/oeqa/runtime/cases/jhi.py

diff --git a/lib/oeqa/runtime/cases/jhi.py b/lib/oeqa/runtime/cases/jhi.py
new file mode 100644
index 0000000..10a4f88
--- /dev/null
+++ b/lib/oeqa/runtime/cases/jhi.py
@@ -0,0 +1,67 @@
+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_mei_driver(self):
+        # Check whether mei device is present or not
+        command = 'ls /dev/mei*'
+        (status, output) = self.target.run(command)
+        self.assertEqual(status, 0, msg="Error messages: %s" % output)
+
+    @OEHasPackage(['openssh-sshd'])
+    @OEHasPackage(['jhi'])
+    @OETestDepends(['jhi.JhiTest.test_mei_driver'])
+    def test_jhi_daemon_version(self):
+        # Check the jhi version of jhi daemon
+        command = 'jhid -v'
+        (status, output) = self.target.run(command)
+        self.assertEqual(status, 0, msg="Error messages: %s" % output)
+
+    @OEHasPackage(['openssh-sshd'])
+    @OEHasPackage(['jhi'])
+    @OETestDepends(['jhi.JhiTest.test_mei_driver'])
+    def test_jhi_daemon_can_initialized(self):
+        # initialize jhi background daemon
+        command = 'jhid -d'
+        (status, output) = self.target.run(command)
+        self.assertEqual(status, 0, msg="Error messages: %s" % output)
+
+    @OEHasPackage(['openssh-sshd'])
+    @OEHasPackage(['jhi'])
+    @OEHasPackage(['jhi-test'])
+    @OETestDepends(['jhi.JhiTest.test_jhi_daemon_can_initialized'])
+    def test_bist(self):
+        # Check the bist
+        command = 'bist'
+        (status, output) = self.target.run(command)
+        self.assertEqual(status, 0, msg="Error messages: %s" % output)
+
+    @OEHasPackage(['openssh-sshd'])
+    @OEHasPackage(['jhi'])
+    @OEHasPackage(['jhi-test'])
+    @OETestDepends(['jhi.JhiTest.test_jhi_daemon_can_initialized'])
+    def test_jhi_version_smoketest(self):
+        #JHI get version info test in smoketest. 
+        command = 'smoketest 8'
+        (status, output) = self.target.run(command)
+        self.assertEqual(status, 0, msg="Error messages: %s" % output)
+
+    @OEHasPackage(['openssh-sshd'])
+    @OEHasPackage(['jhi'])
+    @OEHasPackage(['jhi-test'])
+    @OETestDepends(['jhi.JhiTest.test_jhi_daemon_can_initialized'])
+    def test_negative_jhi_version(self):
+        #Negative JHI get version info test
+        command = 'smoketest 15'
+        (status, output) = self.target.run(command)
+        self.assertEqual(status, 0, msg="Error messages: %s" % output)
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#6424): 
https://lists.yoctoproject.org/g/meta-intel/message/6424
Mute This Topic: https://lists.yoctoproject.org/mt/72064406/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to