From 36b7c0a3c6eaa2216e599cd0c2a4aa93b0595997 Mon Sep 17 00:00:00 2001 From: Yeoh Ee Peng Date: Fri, 20 Mar 2020 17:02:30 +0800 Subject: 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 Signed-off-by: Anuj Mittal --- lib/oeqa/runtime/cases/isal.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/oeqa/runtime/cases/isal.py 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 @@ +import os +from oeqa.runtime.decorator.package import OEHasPackage +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends + +class IsalTest(OERuntimeTestCase): + + @OEHasPackage(['isa-l']) + def test_isal_igzip_version(self): + command = 'igzip -V' + (status, output) = self.target.run(command) + self.assertEqual(status, 0, msg="Error messages: %s" % output) + + @OETestDepends(['isal.IsalTest.test_isal_igzip_version']) + def test_isal_igzip_can_compress(self): + command = 'echo "hello" > /tmp/igzip_sample' + (status, output) = self.target.run(command) + self.assertEqual(status, 0, msg="Error messages: %s" % output) + command = 'igzip -z /tmp/igzip_sample' + (status, output) = self.target.run(command) + self.assertEqual(status, 0, msg="Error messages: %s" % output) + command = 'rm /tmp/igzip_sample*' + (status, output) = self.target.run(command) + self.assertEqual(status, 0, msg="Error messages: %s" % output) -- cgit v1.2.3-54-g00ecf