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>
22 lines
612 B
Meson
22 lines
612 B
Meson
# 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.
|
|
#
|
|
# TODO: Find a way to LD_PRELOAD the ASan dynamic library instead, in a
|
|
# cross-platform way with support for both gcc and clang.
|
|
|
|
if get_option('b_sanitize').contains('address')
|
|
subdir_done()
|
|
endif
|
|
|
|
v4l2_compat_test = files('v4l2_compat_test.py')
|
|
|
|
test('v4l2_compat_test', v4l2_compat_test,
|
|
args : v4l2_compat,
|
|
suite : 'v4l2_compat',
|
|
timeout : 60)
|