summaryrefslogtreecommitdiff
path: root/test/v4l2_compat/meson.build
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-12-22 01:16:41 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-12-24 03:29:41 +0200
commit9f06cd50cce95ffb5bdcf57b5a162a400212d2c0 (patch)
treec70bfbc6922a740ab40b265fba299f6dc8b593ac /test/v4l2_compat/meson.build
parentf5bfa33f59184a6a914f9c8e04c667dc1cd78997 (diff)
test: v4l2_compat: Reduce indentation
Return early with subdir_done() to reduce indentation in case the v4l2_compat layer is not enabled. This matches our usual code patterns in meson.build files, and prepares for enabling the v4l2_compat test with ASan. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'test/v4l2_compat/meson.build')
-rw-r--r--test/v4l2_compat/meson.build16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/v4l2_compat/meson.build b/test/v4l2_compat/meson.build
index 87809589..10c46752 100644
--- a/test/v4l2_compat/meson.build
+++ b/test/v4l2_compat/meson.build
@@ -1,5 +1,9 @@
# SPDX-License-Identifier: CC0-1.0
+if not is_variable('v4l2_compat')
+ subdir_done()
+endif
+
# If ASan is enabled, the link order runtime check will fail as v4l2-ctl and
# v4l2-compliance are not linked to ASan. Skip the test in that case.
#
@@ -10,11 +14,9 @@ if get_option('b_sanitize').contains('address')
subdir_done()
endif
-if is_variable('v4l2_compat')
- v4l2_compat_test = files('v4l2_compat_test.py')
+v4l2_compat_test = files('v4l2_compat_test.py')
- test('v4l2_compat_test', v4l2_compat_test,
- args : v4l2_compat,
- suite : 'v4l2_compat',
- timeout : 60)
-endif
+test('v4l2_compat_test', v4l2_compat_test,
+ args : v4l2_compat,
+ suite : 'v4l2_compat',
+ timeout : 60)