[libcamera-devel] [PATCH 3/3] test: media_device: Use foreach iterator
Jacopo Mondi
jacopo at jmondi.org
Fri Jan 11 12:09:56 CET 2019
Use 'foreach' iterator construct to simplify adding test targets to the
media_device testing part.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
test/media_device/meson.build | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/test/media_device/meson.build b/test/media_device/meson.build
index b1294f6..9f55457 100644
--- a/test/media_device/meson.build
+++ b/test/media_device/meson.build
@@ -1,12 +1,12 @@
-media_device_print_test = executable('media_device_print_test',
- 'media_device_print_test.cpp',
- link_with : test_libraries,
- include_directories : test_includes_internal)
+media_device_tests = [
+ ['print media device', 'media_device_print_test.cpp'],
+ ['media device link handling', 'media_device_link_test.cpp'],
+]
-media_device_link_test = executable('media_device_link_test',
- 'media_device_link_test.cpp',
- link_with : test_libraries,
- include_directories : test_includes_internal)
+foreach t : media_device_tests
+ exe = executable(t[0], t[1],
+ link_with : test_libraries,
+ include_directories : test_includes_internal)
-test('Media Device Print Test', media_device_print_test)
-test('Media Device Link Test', media_device_link_test)
+ test(t[0], exe)
+endforeach
--
2.20.1
More information about the libcamera-devel
mailing list