| Message ID | 20251229160611.3899708-1-sjg@u-boot.org |
|---|---|
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767024387; bh=lLKIq+EkVRGm7m8MvqyFga6WEAerWDInR2qqd45vFDg=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=itiNlLWLAKGHCU2OKsK7n+rzu+kkRiBeOQb+a6/4ESZFekVhe5D6krz0x8Ok0ZRCH 721PO7tEMPHwkBQbpOwbcyzxgPgyzHF4SqLS2jLyh4qMQVkvtp7b/rE+lJoQ97801F HGrTzZYU/H+byuwsDk9ET1FIV3eow5f2HE84ulJd0Ci221hWnQXX4P4Ff+U+DV3DfP tk6BZDIbZ7Ytr/qJlOwSI6LC1tgOgQkMbOPIKrnxG08JCsfdc4Uq+gopKWJFmxbTTo qikfmfJQiYwglCm8HyIQrt3Lx2yzO5C9dX9rvGdnIBTw+8oAiziALDVtgC06u+VRpq VpDJXPm1i0Z+w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1C0F868F2E for <u-boot-concept@u-boot.org>; Mon, 29 Dec 2025 09:06:27 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2OHJQ2XBMPQX for <u-boot-concept@u-boot.org>; Mon, 29 Dec 2025 09:06:27 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767024387; bh=lLKIq+EkVRGm7m8MvqyFga6WEAerWDInR2qqd45vFDg=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=itiNlLWLAKGHCU2OKsK7n+rzu+kkRiBeOQb+a6/4ESZFekVhe5D6krz0x8Ok0ZRCH 721PO7tEMPHwkBQbpOwbcyzxgPgyzHF4SqLS2jLyh4qMQVkvtp7b/rE+lJoQ97801F HGrTzZYU/H+byuwsDk9ET1FIV3eow5f2HE84ulJd0Ci221hWnQXX4P4Ff+U+DV3DfP tk6BZDIbZ7Ytr/qJlOwSI6LC1tgOgQkMbOPIKrnxG08JCsfdc4Uq+gopKWJFmxbTTo qikfmfJQiYwglCm8HyIQrt3Lx2yzO5C9dX9rvGdnIBTw+8oAiziALDVtgC06u+VRpq VpDJXPm1i0Z+w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0832168CAC for <u-boot-concept@u-boot.org>; Mon, 29 Dec 2025 09:06:27 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767024384; bh=/1DMNhEGAC+IBhYHgZ1v+MC6ZIXPpFKekGsl27YiB9w=; h=From:To:Cc:Subject:Date:From; b=srYR7ik9MHkUkthYlrUIj/l86JMbJe4ddgXd9rh6Ts0RFQXq6s+xHLon2WrpCuVze q9/836zYEScSRR91Vj96ReAXTF7aSZhzASsXdk8mFjAhz4QqDwqtMEohxcWToyhdP8 u0PIaRYuea6u1boiFLE4nNxk5ALB5JjV6Seq2fsl7Bk2VcRrR7eqe4zXLlGPYoHMDw 1kA2Kr1KrrDkCBip8zjhPjrxs5IEcQfA4P0Y5iRO7HnldpcWnKdDxoOmHiA3twe88Z jd4neJiHG6PqPEaKvhyI1kLWhrpS1NPbTXwUABpac9uFOlJh6nfZYl33q4p/lKodtY TPpSpmvM3vQDA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7845D64C0C; Mon, 29 Dec 2025 09:06:24 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 5zpXQDtj9pdA; Mon, 29 Dec 2025 09:06:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767024380; bh=ERcDYy+I2LdGHjrzKApTsmlZttOAHfDNobKOnpQgDTY=; h=From:To:Cc:Subject:Date:From; b=wYaCieOfT88m/71+K/RM3CVDYUDUCMdJrdafMiNpdr/7GnWQoW3d3RdR60sYH67do /Ct+b9duNEMntx1TbQXQ7wtCxrMY0UqCbGQy38XONKlynkAtl7zFrIKiwYScHewXr4 mjPL7f0ZynJOLlDCOmcvgyk/P7E33NrQ64f3Wu6IgYHAExb+dCWV8PvqxcnRhH7175 vOhU41ZXyfp8i3Xgc7aObadPdc1urJhrgf4WMCrYXMg1S9YV4bXl5tqAIMJbSRPQDg 1gRTIIp7AkbOOPnxkdBuNxjjVO2infHsDnZTpabaJWe9owbjZLkDDiz8BS7Fr2bVrX QSe8NhZnrSiBA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1BA9264E2A; Mon, 29 Dec 2025 09:06:20 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Mon, 29 Dec 2025 09:05:58 -0700 Message-ID: <20251229160611.3899708-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: 3T4HBW7RZ3X26PXFWK2XTO35NRK3CCZR X-Message-ID-Hash: 3T4HBW7RZ3X26PXFWK2XTO35NRK3CCZR X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <simon.glass@canonical.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 0/9] test: Various improvements to unit-test infrastructure List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/3T4HBW7RZ3X26PXFWK2XTO35NRK3CCZR/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
test: Various improvements to unit-test infrastructure
|
|
Message
Simon Glass
Dec. 29, 2025, 4:05 p.m. UTC
From: Simon Glass <simon.glass@canonical.com>
This series adds several improvements to the unit-test infrastructure:
- Move disk images to the persistent-data directory so they don't
pollute the source tree
- Add a way to keep pytest-created artefacts for faster iteration on
C tests
- Add a helper to simplify running manual unit tests from Python
- Allow combined flags with the ut command (e.g. -Efm)
- Add a -E flag to emit machine-readable result lines
- Add a -P flag to distribute tests across parallel workers
- Add -m as an alias for -f (force manual tests)
These changes make it easier to run and debug tests, especially when
iterating on C test code.
Simon Glass (9):
test: Move disk images to persistent-data directory
test: Write the SPI image to the persistent-data directory
test: py: Add --persist flag to keep test artefacts
test: py: Add run_ut() helper for manual unit tests
test: ut: Add -m as alias for the -f flag
test: ut: Refactor argument processing to use a loop
test: Add a flag to emit per-test result lines
doc: ut: Document return value
test: Add parallel test execution support
doc/develop/py_testing.rst | 35 ++++++++++++
doc/usage/cmd/ut.rst | 38 +++++++++++--
drivers/mmc/sandbox_mmc.c | 13 ++++-
drivers/mtd/spi/sandbox.c | 14 ++++-
drivers/scsi/sandbox_scsi.c | 13 ++++-
drivers/usb/emul/sandbox_flash.c | 12 +++-
include/test/test.h | 6 ++
test/cmd_ut.c | 64 ++++++++++++++-------
test/dm/sf.c | 4 +-
test/py/conftest.py | 3 +
test/py/console_base.py | 27 +++++++++
test/py/img/armbian.py | 2 +-
test/py/img/common.py | 2 +-
test/py/img/efi.py | 2 +-
test/py/tests/test_fit_print.py | 8 +--
test/py/tests/test_fs/test_basic.py | 87 +++++++++--------------------
test/py/tests/test_fs/test_ext4l.py | 4 +-
test/py/tests/test_upl.py | 3 +-
test/py/tests/test_ut.py | 13 +++--
test/py/tests/test_vbe.py | 8 +--
test/test-main.c | 13 +++++
21 files changed, 252 insertions(+), 119 deletions(-)