diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-10-05 21:16:13 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-10-07 17:05:42 +0300 |
commit | 8abcce31ee2b528cba1798fbb738294e5760dccf (patch) | |
tree | a2c4651f3ccc546ea24b6e0f7919ed69f0427191 /test/media_device | |
parent | 2ee8faf3c89e8f5f3f7d9693d3ed8cd892bcb5ec (diff) |
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>
Diffstat (limited to 'test/media_device')
-rw-r--r-- | test/media_device/meson.build | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/media_device/meson.build b/test/media_device/meson.build index 7d34509d..84966c97 100644 --- a/test/media_device/meson.build +++ b/test/media_device/meson.build @@ -5,9 +5,9 @@ lib_mdev_test_sources = files([ ]) media_device_tests = [ - ['media_device_acquire', 'media_device_acquire.cpp'], - ['media_device_print_test', 'media_device_print_test.cpp'], - ['media_device_link_test', 'media_device_link_test.cpp'], + {'name': 'media_device_acquire', 'sources': ['media_device_acquire.cpp']}, + {'name': 'media_device_print_test', 'sources': ['media_device_print_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, @@ -15,10 +15,10 @@ lib_mdev_test = static_library('lib_mdev_test', lib_mdev_test_sources, include_directories : test_includes_internal) foreach test : media_device_tests - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_private, link_with : [test_libraries, lib_mdev_test], 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 |