@@ -12,15 +12,28 @@ test_includes_internal = [
libcamera_internal_includes,
]
-test_init = executable('test_init', 'init.cpp',
- link_with : test_libraries,
- include_directories : test_includes_public)
+subdir('media_device')
-list = executable('list', 'list.cpp',
- link_with : test_libraries,
- include_directories : test_includes_public)
+public_tests = [
+ ['test_init', 'init.cpp'],
+ ['list', 'list.cpp'],
+]
-subdir('media_device')
+internal_tests = [
+]
+
+foreach t : public_tests
+ exe = executable(t[0], t[1],
+ link_with : test_libraries,
+ include_directories : test_includes_public)
+
+ test(t[0], exe)
+endforeach
+
+foreach t : internal_tests
+ exe = executable(t[0], t[1],
+ link_with : test_libraries,
+ include_directories : test_includes_internal)
-test('Initialisation test', test_init)
-test('List Camera API tests', list)
+ test(t[0], exe)
+endforeach