summaryrefslogtreecommitdiff
path: root/test/gstreamer/meson.build
diff options
context:
space:
mode:
authorVedant Paranjape <vedantparanjape160201@gmail.com>2021-08-13 16:13:02 +0530
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-14 22:58:46 +0300
commit25462474f8bb56153995f44f2f2996673321f871 (patch)
tree9ac4778abaa0374ed7d4d7247bcde1ae4e3d03bd /test/gstreamer/meson.build
parent8afa1224d70c8cd9990fc2ffedfc9b36e0003660 (diff)
test: gstreamer: Add test for gstreamer single stream
This patch adds a test to test if single stream using libcamera's gstreamer element works. We need to work around two distinct issues with ASan when enabled in the build: - glib has a known leak at initialization time. This is covered by the suppression file shipped with glib, but it's not clear how to use it automatically. For now, disable leak detection to avoid test failures. - GStreamer spawns a child process to scan plugins. If GStreamer is compiled without ASan (which is likely) but libcamera is, dlopen()ing the libcamera plugin will cause an ASan link order verification failure. Disable the verification child processes to work around the problem. This requires gcc 8 or newer. Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Tested-by: Kieran Bingham <kieran.bingham@@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/gstreamer/meson.build')
-rw-r--r--test/gstreamer/meson.build19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/gstreamer/meson.build b/test/gstreamer/meson.build
new file mode 100644
index 00000000..b99aa0da
--- /dev/null
+++ b/test/gstreamer/meson.build
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: CC0-1.0
+
+if not gst_enabled
+ subdir_done()
+endif
+
+gstreamer_tests = [
+ ['single_stream_test', 'gstreamer_single_stream_test.cpp'],
+]
+gstreamer_dep = dependency('gstreamer-1.0', required: true)
+
+foreach t : gstreamer_tests
+ exe = executable(t[0], t[1],
+ dependencies : [libcamera_private, gstreamer_dep],
+ link_with : test_libraries,
+ include_directories : test_includes_internal)
+
+ test(t[0], exe, suite : 'gstreamer', is_parallel : false)
+endforeach