diff options
| author | Yeoh Ee Peng <ee.peng.yeoh@intel.com> | 2020-03-20 17:02:30 +0800 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2020-03-23 07:55:54 +0800 |
| commit | 36b7c0a3c6eaa2216e599cd0c2a4aa93b0595997 (patch) | |
| tree | 8a3bc3cf3172578d8eefae4f636c35469245c19c /lib/oeqa | |
| parent | e7520b119cf148989239cda40cac736c3acfcf34 (diff) | |
| download | meta-intel-36b7c0a3c6eaa2216e599cd0c2a4aa93b0595997.tar.gz | |
runtime/isal: Enable sanity test
isal test validate that intel intelligent storage acceleration library
can provide accelerated compression using igzip executable.
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')
| -rw-r--r-- | lib/oeqa/runtime/cases/isal.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/isal.py b/lib/oeqa/runtime/cases/isal.py new file mode 100644 index 00000000..5025f986 --- /dev/null +++ b/lib/oeqa/runtime/cases/isal.py | |||
| @@ -0,0 +1,24 @@ | |||
| 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 IsalTest(OERuntimeTestCase): | ||
| 7 | |||
| 8 | @OEHasPackage(['isa-l']) | ||
| 9 | def test_isal_igzip_version(self): | ||
| 10 | command = 'igzip -V' | ||
| 11 | (status, output) = self.target.run(command) | ||
| 12 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
| 13 | |||
| 14 | @OETestDepends(['isal.IsalTest.test_isal_igzip_version']) | ||
| 15 | def test_isal_igzip_can_compress(self): | ||
| 16 | command = 'echo "hello" > /tmp/igzip_sample' | ||
| 17 | (status, output) = self.target.run(command) | ||
| 18 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
| 19 | command = 'igzip -z /tmp/igzip_sample' | ||
| 20 | (status, output) = self.target.run(command) | ||
| 21 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
| 22 | command = 'rm /tmp/igzip_sample*' | ||
| 23 | (status, output) = self.target.run(command) | ||
| 24 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
