From patchwork Fri Oct 16 20:29:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Strode X-Patchwork-Id: 28487 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B072DC324C for ; Fri, 16 Oct 2026 20:29:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2BDD368E84; Fri, 16 Oct 2026 22:29:33 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VqwY9iWR"; dkim-atps=neutral Received: from mail-vk1-xa29.google.com (mail-vk1-xa29.google.com [IPv6:2607:f8b0:4864:20::a29]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B8EF468E61 for ; Fri, 16 Oct 2026 22:29:29 +0200 (CEST) Received: by mail-vk1-xa29.google.com with SMTP id 71dfb90a1353d-5e948e56b9dso117808e0c.1 for ; Fri, 16 Oct 2026 13:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792182568; x=1792787368; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7JgRT+BX6Aya5EQRexwkz9yF0W7EjIR4PTkrhlEKUoQ=; b=VqwY9iWRWeVpco+D7dnVm5eEokOHh0xaivG63V6E0KhynOk/rrYY0ckgiUzpcINQNc WTTfLc6eH/65nyPLWBNQkLW+Qy9y1irTyDo/B56VjksI90W7Kf5TUe+4PUhnGSBn0rjQ lS36Nlb+A5OtVSVA3Hxjt/RWZX52DOskSuqJO0njsdkz8XfPsjvxnmlJWfeWUrrBYbpm +O94+g1xUDhm1Qx4yj6CxTeMTqxo732tYUUiwWN7GQylGEQ+gmtV2KX0PqAUtmEh4aSX hKsllh7I7jBb3dilryQXEBV8NtPQgw2IS9DoQngJ6yP/2dWr/UYCna/S2Objn5ltiA86 1d6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792182568; x=1792787368; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=7JgRT+BX6Aya5EQRexwkz9yF0W7EjIR4PTkrhlEKUoQ=; b=fNbu7mgS0uwKCBkNN1Kh+NjUEiF6+lBoYc/4CduUtE2rkyI+axQslhre8OBNkqcgsk l1lzItwZWv+AiVCWNVm+axwiBrQY9TIwqc5vT8UwWry6tSzFnk1pKj5IjrZRTtd5xO/Y t6ZDKtVgMTJ2V07adLBQ83LZxQPgMJ9xGW57+8wON0VoUid/NpthaLqJt8dvoUpYYT6R dIusQuYQ4bbverjyH+H+dRv/bh+8PCccB0qn/1IB+Fi4F4+EQ6wvGG3BhBb10c1LDIVX +jDpFXwYr3egW42AlfsLoZ00BeI/yXAA0Nj9pLFd0jpspLYxvWLznNq+rkEZp07BadLZ KM6g== X-Gm-Message-State: AFq9FYKo5ItNLIGYYKX6Uc6H9cGDrEG8PE39bTvfe8Kv6UD1mqziMns5 SVG0qbp4bYlBTMezdn4EKvvoyQJU37DJxWMUJg3CZdT6H0eiGHEVUdgLX/p/oKAIRMo= X-Gm-Gg: AYBFou01Hut2E4mJYLmjZjP7K07NRiUmyR3LwfJ8rdsJ6M8hdo9GvKBfskLkkdTG6iG n8CnAztooWcshGHuoPiFi++qgbSFveItexF2z+iX/PEZtkQAYjYWfxjea4ALDDsKT4QHOewF9fI BZa3CM8HjEX7NA4PvXJKB3KX08J/Im7peAXQ1jveBI9bqdX6n/w2ct2LZQLvhokmmTkY7hUJB73 heDcMebNk9K3rsN2ajjRFBozxC6zhwWQj+cg11mw9ER7GWf0W/F7H/norjiaNHi3/2UP/l+yFVK R/ZDOvUhdCkSaKL9poMcLyC+G5fXmwogY0aqeycko5dAhNCwmUtlX3xWsn+NLcX2Cj8IcOaa+a9 kfkXf1O33KpJNIBS1zR28dQl6UFcp/MXbrTPq8ANr+AE4RpLxPcCYoDzgSXuR+Uw2IVifgWbxLG N5tKPvBTa1fAiUUKkaQYnES1V44cHtiUymcWHz/yd1Hk159jayYb5MDN9QcfD2oWN1Iapqd0H5X 9c0/yHiQOkFv/DGM3geB1F+t2B/ X-Received: by 2002:a05:6102:2906:b0:7c3:43cd:6fa6 with SMTP id ada2fe7eead31-7cc3699f2f9mr219455137.18.1792182568437; Fri, 16 Oct 2026 13:29:28 -0700 (PDT) Received: from localhost ([2601:19c:4a00:897d:3391:ed89:5571:41a8]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-990835c29eesm2271202241.4.2026.10.16.13.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2026 13:29:27 -0700 (PDT) From: Ray Strode To: libcamera-devel@lists.libcamera.org Cc: johannes.goede@oss.qualcomm.com, laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com Subject: [PATCH 3/7] docs: Describe unit and integration test selection Date: Fri, 16 Oct 2026 16:29:12 -0400 Message-ID: <20261016202916.1405813-4-halfline@gmail.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261016202916.1405813-1-halfline@gmail.com> References: <8fd58439-d19e-4539-962f-a6110be5c971@oss.qualcomm.com> <20261016202916.1405813-1-halfline@gmail.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Ray Strode This commit documents the distinction between the existing test suites and how to build and run each group. The guide explains the fixtures used by each suite, the retained component suites, and the test-unit and test-integration options alongside the existing test option. It also explains the vimc pipeline dependency and how to change an existing build to select only one group. Signed-off-by: Ray Strode --- Documentation/index.rst | 1 + Documentation/meson.build | 1 + Documentation/testing.rst | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 Documentation/testing.rst diff --git a/Documentation/index.rst b/Documentation/index.rst index e40cd0c9..bc5f849e 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -25,6 +25,7 @@ Tracing guide Camera Sensor Model SoftwareISP Benchmarking + Testing Design document: AE Internal API Contribute diff --git a/Documentation/meson.build b/Documentation/meson.build index a156bd0b..69819776 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -175,6 +175,7 @@ if sphinx.found() 'sensor_driver_requirements.rst', 'sensor-support.rst', 'software-isp-benchmarking.rst', + 'testing.rst', '../README.rst', ] diff --git a/Documentation/testing.rst b/Documentation/testing.rst new file mode 100644 index 00000000..49c1f085 --- /dev/null +++ b/Documentation/testing.rst @@ -0,0 +1,35 @@ +.. SPDX-License-Identifier: CC-BY-SA-4.0 + +Testing libcamera +================= + +Test suites +----------- + +Unit tests check individual components with self-contained fixtures. They +include geometry, controls, serialization and the operating-system wrappers +for files, timers, threads, processes and sockets. + +Integration tests combine components with device, pipeline or external +backend fixtures. Existing checks cover camera capture, V4L2 devices, +media graphs, IPA loading and communication, and camera-backed controls +and serialization. Tests keep their component suites, such as ``camera`` +and ``ipa``, alongside the ``unit`` or ``integration`` suite. + +The ``test-unit`` and ``test-integration`` Meson options enable their +respective groups independently. The existing ``test`` option enables +both groups. All three options are disabled by default. + +.. code-block:: shell + + meson setup build-unit -Dtest-unit=true + ninja -C build-unit + meson test -C build-unit --suite unit --print-errorlogs + +Use ``-Dtest-integration=true`` to build integration tests, or ``-Dtest=true`` +to build both groups. To switch an existing build from both groups to one, +set ``-Dtest=false`` as well as enabling the desired group. + +Many integration tests need the kernel's vimc or vivid test devices. +Integration builds automatically include the vimc pipeline handler and its +IPA. Unit-only selection does not add that pipeline.