summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2020-04-01 14:50:32 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-02 00:09:06 +0800
commit47659db192f1c397a906babc79edea7f7ec6c8cf (patch)
tree031c3cf491fe6b9e739136b4648f9f1236c838d3 /lib
parentee09a28adb2153bb5b9ef959dc2d39e12b340fd7 (diff)
downloadmeta-intel-47659db192f1c397a906babc79edea7f7ec6c8cf.tar.gz
runtime/libxcam: Enable sanity test
Enable sanity tests: - test libxcam soft sample app can perform image remap using libxcam library Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/oeqa/runtime/cases/libxcam.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/libxcam.py b/lib/oeqa/runtime/cases/libxcam.py
new file mode 100644
index 00000000..57192f07
--- /dev/null
+++ b/lib/oeqa/runtime/cases/libxcam.py
@@ -0,0 +1,37 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4
5class LibxcamTest(OERuntimeTestCase):
6 yuv_file = 'vtest.yuv'
7 soft_test_app_file = 'test-soft-image'
8 libxcam_test_app_dir = '/usr/bin/libxcam/'
9 libxcam_file_dir = '/tmp/'
10
11 @classmethod
12 def tearDownClass(cls):
13 cls.tc.target.run("rm %s%s" % (cls.libxcam_file_dir, cls.yuv_file))
14
15 @OEHasPackage(['gstreamer1.0-plugins-base'])
16 @OEHasPackage(['gstreamer1.0-plugins-good'])
17 @OEHasPackage(['gstreamer1.0-vaapi'])
18 @OEHasPackage(['intel-vaapi-driver'])
19 def test_libxcam_can_generate_yuv_file_with_gstreamer(self):
20 (status, output) = self.target.run('gst-inspect-1.0 vaapi')
21 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
22
23 (status, output) = self.target.run('gst-launch-1.0 -ev videotestsrc num-buffers=60 ! '
24 'timeoverlay ! filesink location=%s%s' %
25 (self.libxcam_file_dir, self.yuv_file))
26 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
27
28 @OEHasPackage(['libxcam'])
29 @OEHasPackage(['libxcam-test'])
30 @OETestDepends(['libxcam.LibxcamTest.test_libxcam_can_generate_yuv_file_with_gstreamer'])
31 def test_libxcam_can_execute_soft_image_sample_app(self):
32 (status, output) = self.target.run('%s%s --type remap --input0 %s%s --output soft_out.nv12 --save false' %
33 (self.libxcam_test_app_dir,
34 self.soft_test_app_file,
35 self.libxcam_file_dir,
36 self.yuv_file))
37 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))