summaryrefslogtreecommitdiffstats
path: root/lib/oeqa/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oeqa/runtime')
-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))