[1/7] tests: Separate unit and integration suites
diff mbox series

Message ID 20261016202916.1405813-2-halfline@gmail.com
State New
Headers show
Series
  • tests: Separate suites and check software ISP crops
Related show

Commit Message

Ray Strode Oct. 16, 2026, 8:29 p.m. UTC
From: Ray Strode <rstrode@redhat.com>

This commit identifies the existing tests as unit or integration tests in
Meson.

The test option currently enables one collection containing both
self-contained component checks and tests that enumerate devices, capture
frames or load real IPA modules. The collection has component suites, but
no common way to select either kind of test.

Each test now belongs to the unit or integration suite. Existing component
suites, executable names and execution settings stay the same, preserving
existing test commands and component selection.

Signed-off-by: Ray Strode <rstrode@redhat.com>
---
 test/camera/meson.build                          |  2 +-
 test/controls/meson.build                        |  6 +++---
 test/gstreamer/meson.build                       |  2 +-
 test/ipa/libipa/meson.build                      |  2 +-
 test/ipa/meson.build                             |  2 +-
 test/ipc/meson.build                             |  4 ++--
 test/log/meson.build                             |  2 +-
 test/media_device/meson.build                    |  2 +-
 test/meson.build                                 | 16 ++++++++++------
 test/process/meson.build                         |  2 +-
 test/py/meson.build                              |  2 +-
 .../generated_serializer/meson.build             |  2 +-
 test/serialization/meson.build                   |  2 +-
 test/software_isp/meson.build                    |  2 +-
 test/stream/meson.build                          |  2 +-
 test/v4l2_compat/meson.build                     |  2 +-
 test/v4l2_subdevice/meson.build                  |  2 +-
 test/v4l2_videodevice/meson.build                |  2 +-
 18 files changed, 30 insertions(+), 26 deletions(-)

Patch
diff mbox series

diff --git a/test/camera/meson.build b/test/camera/meson.build
index 4f9f8c8c..b92e16de 100644
--- a/test/camera/meson.build
+++ b/test/camera/meson.build
@@ -16,5 +16,5 @@  foreach test : camera_tests
                      dependencies : libcamera_private,
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
-    test(test['name'], exe, suite : 'camera', is_parallel : false)
+    test(test['name'], exe, suite : ['integration', 'camera'], is_parallel : false)
 endforeach
diff --git a/test/controls/meson.build b/test/controls/meson.build
index 763f8905..cab33717 100644
--- a/test/controls/meson.build
+++ b/test/controls/meson.build
@@ -2,8 +2,8 @@ 
 
 control_tests = [
     {'name': 'control_info', 'sources': ['control_info.cpp']},
-    {'name': 'control_info_map', 'sources': ['control_info_map.cpp']},
-    {'name': 'control_list', 'sources': ['control_list.cpp']},
+    {'name': 'control_info_map', 'sources': ['control_info_map.cpp'], 'suite': 'integration'},
+    {'name': 'control_list', 'sources': ['control_list.cpp'], 'suite': 'integration'},
     {'name': 'control_value', 'sources': ['control_value.cpp']},
 ]
 
@@ -12,5 +12,5 @@  foreach test : control_tests
                      dependencies : libcamera_public,
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
-    test(test['name'], exe, suite : 'controls', is_parallel : false)
+    test(test['name'], exe, suite : [test.get('suite', 'unit'), 'controls'], is_parallel : false)
 endforeach
diff --git a/test/gstreamer/meson.build b/test/gstreamer/meson.build
index e066c582..249cf933 100644
--- a/test/gstreamer/meson.build
+++ b/test/gstreamer/meson.build
@@ -26,6 +26,6 @@  foreach test : gstreamer_tests
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
 
-    test(test['name'], exe, suite : 'gstreamer', is_parallel : false,
+    test(test['name'], exe, suite : ['integration', 'gstreamer'], is_parallel : false,
          env : gst_env, should_fail : test.get('should_fail', false))
 endforeach
diff --git a/test/ipa/libipa/meson.build b/test/ipa/libipa/meson.build
index c3e25587..c3c542b6 100644
--- a/test/ipa/libipa/meson.build
+++ b/test/ipa/libipa/meson.build
@@ -16,6 +16,6 @@  foreach test : libipa_test
                      include_directories : [test_includes_internal,
                                             '../../../src/ipa/libipa/'])
 
-    test(test['name'], exe, suite : 'ipa',
+    test(test['name'], exe, suite : ['unit', 'ipa'],
          should_fail : test.get('should_fail', false))
 endforeach
diff --git a/test/ipa/meson.build b/test/ipa/meson.build
index ceed15ba..08067092 100644
--- a/test/ipa/meson.build
+++ b/test/ipa/meson.build
@@ -13,5 +13,5 @@  foreach test : ipa_test
                      link_with : [test_libraries],
                      include_directories : [test_includes_internal])
 
-    test(test['name'], exe, suite : 'ipa')
+    test(test['name'], exe, suite : ['integration', 'ipa'])
 endforeach
diff --git a/test/ipc/meson.build b/test/ipc/meson.build
index 8e447d22..394a87c1 100644
--- a/test/ipc/meson.build
+++ b/test/ipc/meson.build
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: CC0-1.0
 
 ipc_tests = [
-    {'name': 'unixsocket_ipc', 'sources': ['unixsocket_ipc.cpp']},
+    {'name': 'unixsocket_ipc', 'sources': ['unixsocket_ipc.cpp'], 'suite': 'integration'},
     {'name': 'unixsocket', 'sources': ['unixsocket.cpp']},
 ]
 
@@ -11,5 +11,5 @@  foreach test : ipc_tests
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
 
-    test(test['name'], exe, suite : 'ipc')
+    test(test['name'], exe, suite : [test.get('suite', 'unit'), 'ipc'])
 endforeach
diff --git a/test/log/meson.build b/test/log/meson.build
index f413c389..468e70db 100644
--- a/test/log/meson.build
+++ b/test/log/meson.build
@@ -11,6 +11,6 @@  foreach test : log_test
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
 
-    test(test['name'], exe, suite : 'log',
+    test(test['name'], exe, suite : ['unit', 'log'],
          should_fail : test.get('should_fail', false))
 endforeach
diff --git a/test/media_device/meson.build b/test/media_device/meson.build
index 84966c97..7a8a6520 100644
--- a/test/media_device/meson.build
+++ b/test/media_device/meson.build
@@ -20,5 +20,5 @@  foreach test : media_device_tests
                      link_with : [test_libraries, lib_mdev_test],
                      include_directories : test_includes_internal)
 
-    test(test['name'], exe, suite : 'media_device', is_parallel : false)
+    test(test['name'], exe, suite : ['integration', 'media_device'], is_parallel : false)
 endforeach
diff --git a/test/meson.build b/test/meson.build
index fc72d105..99ff5e84 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -52,15 +52,15 @@  public_tests = [
 internal_tests = [
     {'name': 'bayer-format', 'sources': ['bayer-format.cpp']},
     {'name': 'byte-stream-buffer', 'sources': ['byte-stream-buffer.cpp']},
-    {'name': 'camera-sensor', 'sources': ['camera-sensor.cpp']},
+    {'name': 'camera-sensor', 'sources': ['camera-sensor.cpp'], 'suite': 'integration'},
     {'name': 'debayer-geometry', 'sources': ['debayer-geometry.cpp']},
-    {'name': 'delayed_controls', 'sources': ['delayed_controls.cpp']},
+    {'name': 'delayed_controls', 'sources': ['delayed_controls.cpp'], 'suite': 'integration'},
     {'name': 'event', 'sources': ['event.cpp']},
     {'name': 'event-dispatcher', 'sources': ['event-dispatcher.cpp']},
     {'name': 'event-thread', 'sources': ['event-thread.cpp']},
     {'name': 'file', 'sources': ['file.cpp']},
     {'name': 'flags', 'sources': ['flags.cpp']},
-    {'name': 'hotplug-cameras', 'sources': ['hotplug-cameras.cpp']},
+    {'name': 'hotplug-cameras', 'sources': ['hotplug-cameras.cpp'], 'suite': 'integration'},
     {'name': 'matrix', 'sources': ['matrix.cpp']},
     {'name': 'message', 'sources': ['message.cpp']},
     {'name': 'object', 'sources': ['object.cpp']},
@@ -97,7 +97,9 @@  foreach test : public_tests
                      link_with : test_libraries,
                      include_directories : test_includes_public)
 
-    test(test['name'], exe, should_fail : test.get('should_fail', false))
+    test(test['name'], exe,
+         suite : test.get('suite', 'unit'),
+         should_fail : test.get('should_fail', false))
 endforeach
 
 foreach test : internal_tests
@@ -112,7 +114,9 @@  foreach test : internal_tests
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
 
-    test(test['name'], exe, should_fail : test.get('should_fail', false))
+    test(test['name'], exe,
+         suite : test.get('suite', 'unit'),
+         should_fail : test.get('should_fail', false))
 endforeach
 
 foreach test : internal_non_parallel_tests
@@ -127,7 +131,7 @@  foreach test : internal_non_parallel_tests
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
 
-    test(test['name'], exe,
+    test(test['name'], exe, suite : 'integration',
          is_parallel : false,
          should_fail : test.get('should_fail', false))
 endforeach
diff --git a/test/process/meson.build b/test/process/meson.build
index a80dc2d9..d40b3e74 100644
--- a/test/process/meson.build
+++ b/test/process/meson.build
@@ -10,5 +10,5 @@  foreach test : process_tests
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
 
-    test(test['name'], exe, suite : 'process', is_parallel : false)
+    test(test['name'], exe, suite : ['unit', 'process'], is_parallel : false)
 endforeach
diff --git a/test/py/meson.build b/test/py/meson.build
index d014aac4..c35209df 100644
--- a/test/py/meson.build
+++ b/test/py/meson.build
@@ -35,5 +35,5 @@  test('pyunittests',
      py3,
      args : files('unittests.py'),
      env : py_env,
-     suite : 'pybindings',
+     suite : ['integration', 'pybindings'],
      is_parallel : false)
diff --git a/test/serialization/generated_serializer/meson.build b/test/serialization/generated_serializer/meson.build
index 9fb9cd1d..6595164c 100644
--- a/test/serialization/generated_serializer/meson.build
+++ b/test/serialization/generated_serializer/meson.build
@@ -16,4 +16,4 @@  exe = executable('generated_serializer_test',
                  ])
 
 test('generated_serializer_test', exe,
-     suite : 'generated_serializer', is_parallel : false)
+     suite : ['unit', 'generated_serializer'], is_parallel : false)
diff --git a/test/serialization/meson.build b/test/serialization/meson.build
index a6e8d793..77cfa8c3 100644
--- a/test/serialization/meson.build
+++ b/test/serialization/meson.build
@@ -12,5 +12,5 @@  foreach test : serialization_tests
                      dependencies : libcamera_private,
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
-    test(test['name'], exe, suite : 'serialization', is_parallel : false)
+    test(test['name'], exe, suite : ['integration', 'serialization'], is_parallel : false)
 endforeach
diff --git a/test/software_isp/meson.build b/test/software_isp/meson.build
index ebabde59..539278ad 100644
--- a/test/software_isp/meson.build
+++ b/test/software_isp/meson.build
@@ -16,5 +16,5 @@  foreach test : software_isp_tests
                      include_directories : [test_includes_internal,
                                             '../../src/libcamera/software_isp/'])
 
-    test(test['name'], exe, suite : 'software_isp')
+    test(test['name'], exe, suite : ['unit', 'software_isp'])
 endforeach
diff --git a/test/stream/meson.build b/test/stream/meson.build
index dd77f2f7..dc9468c7 100644
--- a/test/stream/meson.build
+++ b/test/stream/meson.build
@@ -10,5 +10,5 @@  foreach test : stream_tests
                      dependencies : libcamera_public,
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
-    test(test['name'], exe, suite : 'stream')
+    test(test['name'], exe, suite : ['unit', 'stream'])
 endforeach
diff --git a/test/v4l2_compat/meson.build b/test/v4l2_compat/meson.build
index 2691eacf..01045a83 100644
--- a/test/v4l2_compat/meson.build
+++ b/test/v4l2_compat/meson.build
@@ -25,5 +25,5 @@  v4l2_compat_args += [v4l2_compat]
 
 test('v4l2_compat_test', v4l2_compat_test,
      args : v4l2_compat_args,
-     suite : 'v4l2_compat',
+     suite : ['integration', 'v4l2_compat'],
      timeout : 60)
diff --git a/test/v4l2_subdevice/meson.build b/test/v4l2_subdevice/meson.build
index 277f29bb..68255717 100644
--- a/test/v4l2_subdevice/meson.build
+++ b/test/v4l2_subdevice/meson.build
@@ -10,5 +10,5 @@  foreach test : v4l2_subdevice_tests
         dependencies : libcamera_private,
         link_with : test_libraries,
         include_directories : test_includes_internal)
-    test(test['name'], exe, suite : 'v4l2_subdevice', is_parallel : false)
+    test(test['name'], exe, suite : ['integration', 'v4l2_subdevice'], is_parallel : false)
 endforeach
diff --git a/test/v4l2_videodevice/meson.build b/test/v4l2_videodevice/meson.build
index 87ea4f96..486e831c 100644
--- a/test/v4l2_videodevice/meson.build
+++ b/test/v4l2_videodevice/meson.build
@@ -20,5 +20,5 @@  foreach test : v4l2_videodevice_tests
                      dependencies : libcamera_private,
                      link_with : test_libraries,
                      include_directories : test_includes_internal)
-    test(test['name'], exe, suite : 'v4l2_videodevice', is_parallel : false)
+    test(test['name'], exe, suite : ['integration', 'v4l2_videodevice'], is_parallel : false)
 endforeach