test: meson: Use dictionaries instead of arrays to store test information
Tests are listed in meson.build using arrays that contain the test name and source files at fixed positions. This isn't very readable, leading to code using test[0], test[1] and test[2]. Replace the arrays with dictionaries to improve readability. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
parent
2ee8faf3c8
commit
8abcce31ee
15 changed files with 110 additions and 110 deletions
|
@ -3,18 +3,18 @@
|
||||||
# Tests are listed in order of complexity.
|
# Tests are listed in order of complexity.
|
||||||
# They are not alphabetically sorted.
|
# They are not alphabetically sorted.
|
||||||
camera_tests = [
|
camera_tests = [
|
||||||
['configuration_default', 'configuration_default.cpp'],
|
{'name': 'configuration_default', 'sources': ['configuration_default.cpp']},
|
||||||
['configuration_set', 'configuration_set.cpp'],
|
{'name': 'configuration_set', 'sources': ['configuration_set.cpp']},
|
||||||
['buffer_import', 'buffer_import.cpp'],
|
{'name': 'buffer_import', 'sources': ['buffer_import.cpp']},
|
||||||
['statemachine', 'statemachine.cpp'],
|
{'name': 'statemachine', 'sources': ['statemachine.cpp']},
|
||||||
['capture', 'capture.cpp'],
|
{'name': 'capture', 'sources': ['capture.cpp']},
|
||||||
['camera_reconfigure', 'camera_reconfigure.cpp'],
|
{'name': 'camera_reconfigure', 'sources': ['camera_reconfigure.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : camera_tests
|
foreach test : camera_tests
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
test(test[0], exe, suite : 'camera', is_parallel : false)
|
test(test['name'], exe, suite : 'camera', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
control_tests = [
|
control_tests = [
|
||||||
['control_info', 'control_info.cpp'],
|
{'name': 'control_info', 'sources': ['control_info.cpp']},
|
||||||
['control_info_map', 'control_info_map.cpp'],
|
{'name': 'control_info_map', 'sources': ['control_info_map.cpp']},
|
||||||
['control_list', 'control_list.cpp'],
|
{'name': 'control_list', 'sources': ['control_list.cpp']},
|
||||||
['control_value', 'control_value.cpp'],
|
{'name': 'control_value', 'sources': ['control_value.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : control_tests
|
foreach test : control_tests
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_public,
|
dependencies : libcamera_public,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
test(test[0], exe, suite : 'controls', is_parallel : false)
|
test(test['name'], exe, suite : 'controls', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -5,16 +5,16 @@ if not gst_enabled
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gstreamer_tests = [
|
gstreamer_tests = [
|
||||||
['single_stream_test', 'gstreamer_single_stream_test.cpp'],
|
{'name': 'single_stream_test', 'sources': ['gstreamer_single_stream_test.cpp']},
|
||||||
['multi_stream_test', 'gstreamer_multi_stream_test.cpp'],
|
{'name': 'multi_stream_test', 'sources': ['gstreamer_multi_stream_test.cpp']},
|
||||||
]
|
]
|
||||||
gstreamer_dep = dependency('gstreamer-1.0', required: true)
|
gstreamer_dep = dependency('gstreamer-1.0', required: true)
|
||||||
|
|
||||||
foreach test : gstreamer_tests
|
foreach test : gstreamer_tests
|
||||||
exe = executable(test[0], test[1], 'gstreamer_test.cpp',
|
exe = executable(test['name'], test['sources'], 'gstreamer_test.cpp',
|
||||||
dependencies : [libcamera_private, gstreamer_dep],
|
dependencies : [libcamera_private, gstreamer_dep],
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe, suite : 'gstreamer', is_parallel : false)
|
test(test['name'], exe, suite : 'gstreamer', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
ipa_test = [
|
ipa_test = [
|
||||||
['ipa_module_test', 'ipa_module_test.cpp'],
|
{'name': 'ipa_module_test', 'sources': ['ipa_module_test.cpp']},
|
||||||
['ipa_interface_test', 'ipa_interface_test.cpp'],
|
{'name': 'ipa_interface_test', 'sources': ['ipa_interface_test.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : ipa_test
|
foreach test : ipa_test
|
||||||
exe = executable(test[0], [test[1], libcamera_generated_ipa_headers],
|
exe = executable(test['name'], test['sources'], libcamera_generated_ipa_headers,
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : [libipa, test_libraries],
|
link_with : [libipa, test_libraries],
|
||||||
include_directories : [libipa_includes, test_includes_internal])
|
include_directories : [libipa_includes, test_includes_internal])
|
||||||
|
|
||||||
test(test[0], exe, suite : 'ipa')
|
test(test['name'], exe, suite : 'ipa')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
ipc_tests = [
|
ipc_tests = [
|
||||||
['unixsocket_ipc', 'unixsocket_ipc.cpp'],
|
{'name': 'unixsocket_ipc', 'sources': ['unixsocket_ipc.cpp']},
|
||||||
['unixsocket', 'unixsocket.cpp'],
|
{'name': 'unixsocket', 'sources': ['unixsocket.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : ipc_tests
|
foreach test : ipc_tests
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe, suite : 'ipc')
|
test(test['name'], exe, suite : 'ipc')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
log_test = [
|
log_test = [
|
||||||
['log_api', 'log_api.cpp'],
|
{'name': 'log_api', 'sources': ['log_api.cpp']},
|
||||||
['log_process', 'log_process.cpp'],
|
{'name': 'log_process', 'sources': ['log_process.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : log_test
|
foreach test : log_test
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe, suite : 'log')
|
test(test['name'], exe, suite : 'log')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -5,9 +5,9 @@ lib_mdev_test_sources = files([
|
||||||
])
|
])
|
||||||
|
|
||||||
media_device_tests = [
|
media_device_tests = [
|
||||||
['media_device_acquire', 'media_device_acquire.cpp'],
|
{'name': 'media_device_acquire', 'sources': ['media_device_acquire.cpp']},
|
||||||
['media_device_print_test', 'media_device_print_test.cpp'],
|
{'name': 'media_device_print_test', 'sources': ['media_device_print_test.cpp']},
|
||||||
['media_device_link_test', 'media_device_link_test.cpp'],
|
{'name': 'media_device_link_test', 'sources': ['media_device_link_test.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
lib_mdev_test = static_library('lib_mdev_test', lib_mdev_test_sources,
|
lib_mdev_test = static_library('lib_mdev_test', lib_mdev_test_sources,
|
||||||
|
@ -15,10 +15,10 @@ lib_mdev_test = static_library('lib_mdev_test', lib_mdev_test_sources,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
foreach test : media_device_tests
|
foreach test : media_device_tests
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : [test_libraries, lib_mdev_test],
|
link_with : [test_libraries, lib_mdev_test],
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe, suite : 'media_device', is_parallel : false)
|
test(test['name'], exe, suite : 'media_device', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -26,82 +26,82 @@ subdir('v4l2_subdevice')
|
||||||
subdir('v4l2_videodevice')
|
subdir('v4l2_videodevice')
|
||||||
|
|
||||||
public_tests = [
|
public_tests = [
|
||||||
['color-space', 'color-space.cpp'],
|
{'name': 'color-space', 'sources': ['color-space.cpp']},
|
||||||
['geometry', 'geometry.cpp'],
|
{'name': 'geometry', 'sources': ['geometry.cpp']},
|
||||||
['public-api', 'public-api.cpp'],
|
{'name': 'public-api', 'sources': ['public-api.cpp']},
|
||||||
['signal', 'signal.cpp'],
|
{'name': 'signal', 'sources': ['signal.cpp']},
|
||||||
['span', 'span.cpp'],
|
{'name': 'span', 'sources': ['span.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
internal_tests = [
|
internal_tests = [
|
||||||
['bayer-format', 'bayer-format.cpp'],
|
{'name': 'bayer-format', 'sources': ['bayer-format.cpp']},
|
||||||
['byte-stream-buffer', 'byte-stream-buffer.cpp'],
|
{'name': 'byte-stream-buffer', 'sources': ['byte-stream-buffer.cpp']},
|
||||||
['camera-sensor', 'camera-sensor.cpp'],
|
{'name': 'camera-sensor', 'sources': ['camera-sensor.cpp']},
|
||||||
['delayed_controls', 'delayed_controls.cpp'],
|
{'name': 'delayed_controls', 'sources': ['delayed_controls.cpp']},
|
||||||
['event', 'event.cpp'],
|
{'name': 'event', 'sources': ['event.cpp']},
|
||||||
['event-dispatcher', 'event-dispatcher.cpp'],
|
{'name': 'event-dispatcher', 'sources': ['event-dispatcher.cpp']},
|
||||||
['event-thread', 'event-thread.cpp'],
|
{'name': 'event-thread', 'sources': ['event-thread.cpp']},
|
||||||
['file', 'file.cpp'],
|
{'name': 'file', 'sources': ['file.cpp']},
|
||||||
['flags', 'flags.cpp'],
|
{'name': 'flags', 'sources': ['flags.cpp']},
|
||||||
['hotplug-cameras', 'hotplug-cameras.cpp'],
|
{'name': 'hotplug-cameras', 'sources': ['hotplug-cameras.cpp']},
|
||||||
['message', 'message.cpp'],
|
{'name': 'message', 'sources': ['message.cpp']},
|
||||||
['object', 'object.cpp'],
|
{'name': 'object', 'sources': ['object.cpp']},
|
||||||
['object-delete', 'object-delete.cpp'],
|
{'name': 'object-delete', 'sources': ['object-delete.cpp']},
|
||||||
['object-invoke', 'object-invoke.cpp'],
|
{'name': 'object-invoke', 'sources': ['object-invoke.cpp']},
|
||||||
['pixel-format', 'pixel-format.cpp'],
|
{'name': 'pixel-format', 'sources': ['pixel-format.cpp']},
|
||||||
['shared-fd', 'shared-fd.cpp'],
|
{'name': 'shared-fd', 'sources': ['shared-fd.cpp']},
|
||||||
['signal-threads', 'signal-threads.cpp'],
|
{'name': 'signal-threads', 'sources': ['signal-threads.cpp']},
|
||||||
['threads', 'threads.cpp', [libthreads]],
|
{'name': 'threads', 'sources': 'threads.cpp', 'dependencies': [libthreads]},
|
||||||
['timer', 'timer.cpp'],
|
{'name': 'timer', 'sources': ['timer.cpp']},
|
||||||
['timer-thread', 'timer-thread.cpp'],
|
{'name': 'timer-thread', 'sources': ['timer-thread.cpp']},
|
||||||
['unique-fd', 'unique-fd.cpp'],
|
{'name': 'unique-fd', 'sources': ['unique-fd.cpp']},
|
||||||
['utils', 'utils.cpp'],
|
{'name': 'utils', 'sources': ['utils.cpp']},
|
||||||
['yaml-parser', 'yaml-parser.cpp'],
|
{'name': 'yaml-parser', 'sources': ['yaml-parser.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
internal_non_parallel_tests = [
|
internal_non_parallel_tests = [
|
||||||
['fence', 'fence.cpp'],
|
{'name': 'fence', 'sources': ['fence.cpp']},
|
||||||
['mapped-buffer', 'mapped-buffer.cpp'],
|
{'name': 'mapped-buffer', 'sources': ['mapped-buffer.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : public_tests
|
foreach test : public_tests
|
||||||
deps = [libcamera_public]
|
deps = [libcamera_public]
|
||||||
if test.length() > 2
|
if 'dependencies' in test
|
||||||
deps += test[2]
|
deps += test['dependencies']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : deps,
|
dependencies : deps,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_public)
|
include_directories : test_includes_public)
|
||||||
|
|
||||||
test(test[0], exe)
|
test(test['name'], exe)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
foreach test : internal_tests
|
foreach test : internal_tests
|
||||||
deps = [libcamera_private]
|
deps = [libcamera_private]
|
||||||
if test.length() > 2
|
if 'dependencies' in test
|
||||||
deps += test[2]
|
deps += test['dependencies']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : deps,
|
dependencies : deps,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe)
|
test(test['name'], exe)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
foreach test : internal_non_parallel_tests
|
foreach test : internal_non_parallel_tests
|
||||||
deps = [libcamera_private]
|
deps = [libcamera_private]
|
||||||
if test.length() > 2
|
if 'dependencies' in test
|
||||||
deps += test[2]
|
deps += test['dependencies']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : deps,
|
dependencies : deps,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe, is_parallel : false)
|
test(test['name'], exe, is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
ipu3_test = [
|
ipu3_test = [
|
||||||
['ipu3_pipeline_test', 'ipu3_pipeline_test.cpp'],
|
{'name': 'ipu3_pipeline_test', 'sources': ['ipu3_pipeline_test.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : ipu3_test
|
foreach test : ipu3_test
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe, suite : 'ipu3', is_parallel : false)
|
test(test['name'], exe, suite : 'ipu3', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
rkisp1_test = [
|
rkisp1_test = [
|
||||||
['rkisp1_pipeline_test', 'rkisp1_pipeline_test.cpp'],
|
{'name': 'rkisp1_pipeline_test', 'sources': ['rkisp1_pipeline_test.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : rkisp1_test
|
foreach test : rkisp1_test
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe, suite : 'rkisp1', is_parallel : false)
|
test(test['name'], exe, suite : 'rkisp1', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
process_tests = [
|
process_tests = [
|
||||||
['process_test', 'process_test.cpp'],
|
{'name': 'process_test', 'sources': ['process_test.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : process_tests
|
foreach test : process_tests
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
|
|
||||||
test(test[0], exe, suite : 'process', is_parallel : false)
|
test(test['name'], exe, suite : 'process', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
subdir('generated_serializer')
|
subdir('generated_serializer')
|
||||||
|
|
||||||
serialization_tests = [
|
serialization_tests = [
|
||||||
['control_serialization', 'control_serialization.cpp'],
|
{'name': 'control_serialization', 'sources': ['control_serialization.cpp']},
|
||||||
['ipa_data_serializer_test', 'ipa_data_serializer_test.cpp'],
|
{'name': 'ipa_data_serializer_test', 'sources': ['ipa_data_serializer_test.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : serialization_tests
|
foreach test : serialization_tests
|
||||||
exe = executable(test[0], [test[1], 'serialization_test.cpp'],
|
exe = executable(test['name'], test['sources'], 'serialization_test.cpp',
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
test(test[0], exe, suite : 'serialization', is_parallel : false)
|
test(test['name'], exe, suite : 'serialization', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
stream_tests = [
|
stream_tests = [
|
||||||
['stream_colorspace', 'stream_colorspace.cpp'],
|
{'name': 'stream_colorspace', 'sources': ['stream_colorspace.cpp']},
|
||||||
['stream_formats', 'stream_formats.cpp'],
|
{'name': 'stream_formats', 'sources': ['stream_formats.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : stream_tests
|
foreach test : stream_tests
|
||||||
exe = executable(test[0], test[1],
|
exe = executable(test['name'], test['sources'],
|
||||||
dependencies : libcamera_public,
|
dependencies : libcamera_public,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
test(test[0], exe, suite: 'stream')
|
test(test['name'], exe, suite: 'stream')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
v4l2_subdevice_tests = [
|
v4l2_subdevice_tests = [
|
||||||
['list_formats', 'list_formats.cpp'],
|
{'name': 'list_formats', 'sources': ['list_formats.cpp']},
|
||||||
['test_formats', 'test_formats.cpp'],
|
{'name': 'test_formats', 'sources': ['test_formats.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : v4l2_subdevice_tests
|
foreach test : v4l2_subdevice_tests
|
||||||
exe = executable(test[0], [test[1], 'v4l2_subdevice_test.cpp'],
|
exe = executable(test['name'], test['sources'], 'v4l2_subdevice_test.cpp',
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
test(test[0], exe, suite : 'v4l2_subdevice', is_parallel : false)
|
test(test['name'], exe, suite : 'v4l2_subdevice', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -3,22 +3,22 @@
|
||||||
# Tests are listed in order of complexity.
|
# Tests are listed in order of complexity.
|
||||||
# They are not alphabetically sorted.
|
# They are not alphabetically sorted.
|
||||||
v4l2_videodevice_tests = [
|
v4l2_videodevice_tests = [
|
||||||
['double_open', 'double_open.cpp'],
|
{'name': 'double_open', 'sources': ['double_open.cpp']},
|
||||||
['controls', 'controls.cpp'],
|
{'name': 'controls', 'sources': ['controls.cpp']},
|
||||||
['formats', 'formats.cpp'],
|
{'name': 'formats', 'sources': ['formats.cpp']},
|
||||||
['dequeue_watchdog', 'dequeue_watchdog.cpp'],
|
{'name': 'dequeue_watchdog', 'sources': ['dequeue_watchdog.cpp']},
|
||||||
['request_buffers', 'request_buffers.cpp'],
|
{'name': 'request_buffers', 'sources': ['request_buffers.cpp']},
|
||||||
['buffer_cache', 'buffer_cache.cpp'],
|
{'name': 'buffer_cache', 'sources': ['buffer_cache.cpp']},
|
||||||
['stream_on_off', 'stream_on_off.cpp'],
|
{'name': 'stream_on_off', 'sources': ['stream_on_off.cpp']},
|
||||||
['capture_async', 'capture_async.cpp'],
|
{'name': 'capture_async', 'sources': ['capture_async.cpp']},
|
||||||
['buffer_sharing', 'buffer_sharing.cpp'],
|
{'name': 'buffer_sharing', 'sources': ['buffer_sharing.cpp']},
|
||||||
['v4l2_m2mdevice', 'v4l2_m2mdevice.cpp'],
|
{'name': 'v4l2_m2mdevice', 'sources': ['v4l2_m2mdevice.cpp']},
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test : v4l2_videodevice_tests
|
foreach test : v4l2_videodevice_tests
|
||||||
exe = executable(test[0], [test[1], 'v4l2_videodevice_test.cpp'],
|
exe = executable(test['name'], [test['sources'], 'v4l2_videodevice_test.cpp'],
|
||||||
dependencies : libcamera_private,
|
dependencies : libcamera_private,
|
||||||
link_with : test_libraries,
|
link_with : test_libraries,
|
||||||
include_directories : test_includes_internal)
|
include_directories : test_includes_internal)
|
||||||
test(test[0], exe, suite : 'v4l2_videodevice', is_parallel : false)
|
test(test['name'], exe, suite : 'v4l2_videodevice', is_parallel : false)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue