From: Sam Day via B4 Relay <devnull+me.samcday.com@kernel.org>
To: u-boot@lists.denx.de
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
Alper Nebi Yasak <alpernebiyasak@gmail.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Bryan Brattlof <bb@ti.com>, Yannic Moog <y.moog@phytec.de>,
Wojciech Dubowik <Wojciech.Dubowik@mt.com>,
Yegor Yefremov <yegorslists@googlemail.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Rasmus Villemoes <ravi@prevas.dk>, Javier Tia <floss@jetm.me>,
Minkyu Kang <mk7.kang@samsung.com>,
Kaustabh Chakraborty <kauschluss@disroot.org>,
Henrik Grimler <henrik@grimler.se>,
yan wang <yan.wang@softathome.com>,
Marek Vasut <marex@nabladev.com>,
Denis Mukhin <dmukhin@ford.com>, Sam Day <me@samcday.com>
Subject: [PATCH v3 02/10] binman: test name globbing support
Date: Wed, 10 Jun 2026 11:27:40 +1000 [thread overview]
Message-ID: <20260610-android-binman-v3-2-710298a38fcc@samcday.com> (raw)
In-Reply-To: <20260610-android-binman-v3-0-710298a38fcc@samcday.com>
From: Sam Day <me@samcday.com>
This makes invocations like `binman test testAndroid*` possible. It also
composes well with the previous commit that adds support for multiple
test names: `binman test 'testAndroid*' 'testQcdt*'` also works as you'd
expect.
---
tools/binman/cmdline.py | 2 +-
tools/u_boot_pylib/test_util.py | 12 +++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/tools/binman/cmdline.py b/tools/binman/cmdline.py
index 9632ec115e5..b3be9f79b20 100644
--- a/tools/binman/cmdline.py
+++ b/tools/binman/cmdline.py
@@ -201,7 +201,7 @@ controlled by a description in the board device tree.'''
'preserve the output directory if a single test is run (pass '
'test name at the end of the command line')
test_parser.add_argument('tests', nargs='*',
- help='Test names to run (omit for all)')
+ help='Test names/patterns to run (omit for all)')
tool_parser = subparsers.add_parser('tool', help='Check bintools')
tool_parser.add_argument('-l', '--list', action='store_true',
diff --git a/tools/u_boot_pylib/test_util.py b/tools/u_boot_pylib/test_util.py
index ff275a7b7c0..2089b3574ca 100644
--- a/tools/u_boot_pylib/test_util.py
+++ b/tools/u_boot_pylib/test_util.py
@@ -4,6 +4,7 @@
#
import doctest
+import fnmatch
import glob
import multiprocessing
import os
@@ -186,7 +187,9 @@ def run_test_suites(toolname, debug, verbosity, no_capture, test_preserve_dirs,
test_names = [test_name]
else:
test_names = list(test_name or [])
- test_name_set = set(test_names)
+
+ def _match_name(name):
+ return any(fnmatch.fnmatchcase(name, pattern) for pattern in test_names)
if use_concurrent and processes != 1 and not test_names:
suite = ConcurrentTestSuite(suite,
@@ -194,7 +197,7 @@ def run_test_suites(toolname, debug, verbosity, no_capture, test_preserve_dirs,
for module in class_and_module_list:
if (isinstance(module, str) and
- (not test_names or module in test_name_set)):
+ (not test_names or _match_name(module))):
suite.addTests(doctest.DocTestSuite(module))
for module in class_and_module_list:
@@ -211,9 +214,8 @@ def run_test_suites(toolname, debug, verbosity, no_capture, test_preserve_dirs,
# while traversing a name then a synthetic test that raises that
# error when run will be returned. Check that the requested test
# exists, otherwise these errors are included in the results.
- module_test_names = loader.getTestCaseNames(module)
- for name in test_names:
- if name in module_test_names:
+ for name in loader.getTestCaseNames(module):
+ if _match_name(name):
suite.addTests(loader.loadTestsFromName(name, module))
else:
suite.addTests(loader.loadTestsFromTestCase(module))
--
2.54.0
next prev parent reply other threads:[~2026-06-10 1:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 1:27 [PATCH v3 00/10] Generate Android boot images with binman Sam Day via B4 Relay
2026-06-10 1:27 ` [PATCH v3 01/10] binman: support running multiple tests Sam Day via B4 Relay
2026-06-14 16:18 ` Simon Glass
2026-06-10 1:27 ` Sam Day via B4 Relay [this message]
2026-06-14 16:18 ` [PATCH v3 02/10] binman: test name globbing support Simon Glass
2026-06-10 1:27 ` [PATCH v3 03/10] binman: section: add AlignUp+PadToAlignment helpers Sam Day via B4 Relay
2026-06-14 16:18 ` Simon Glass
2026-06-10 1:27 ` [PATCH v3 04/10] binman: Android boot image support Sam Day via B4 Relay
2026-06-14 16:18 ` Simon Glass
2026-06-10 1:27 ` [PATCH v3 05/10] .gitignore: ignore binman-generated blobs Sam Day via B4 Relay
2026-06-10 1:27 ` [PATCH v3 06/10] binman: android_boot: vendor-dt support Sam Day via B4 Relay
2026-06-14 16:19 ` Simon Glass
2026-06-10 1:27 ` [PATCH v3 07/10] binman: Add QCDT support Sam Day via B4 Relay
2026-06-14 16:19 ` Simon Glass
2026-06-10 1:27 ` [PATCH v3 08/10] binman: Add DTBH support Sam Day via B4 Relay
2026-06-14 16:20 ` Simon Glass
2026-06-10 1:27 ` [PATCH v3 09/10] arch: arm: exynos: add j7xelte binman config Sam Day via B4 Relay
2026-06-13 11:45 ` Kaustabh Chakraborty
2026-06-13 12:03 ` Kaustabh Chakraborty
2026-06-14 16:03 ` Simon Glass
2026-06-14 18:57 ` Kaustabh Chakraborty
2026-06-10 1:27 ` [PATCH v3 10/10] configs: exynos-mobile: pull in binman Sam Day via B4 Relay
2026-06-13 11:59 ` Kaustabh Chakraborty
2026-06-14 16:21 ` [v3,00/10] Generate Android boot images with binman Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260610-android-binman-v3-2-710298a38fcc@samcday.com \
--to=devnull+me.samcday.com@kernel.org \
--cc=Wojciech.Dubowik@mt.com \
--cc=alpernebiyasak@gmail.com \
--cc=bb@ti.com \
--cc=dmukhin@ford.com \
--cc=floss@jetm.me \
--cc=henrik@grimler.se \
--cc=kauschluss@disroot.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=marex@nabladev.com \
--cc=me@samcday.com \
--cc=mk7.kang@samsung.com \
--cc=patrice.chotard@foss.st.com \
--cc=quentin.schulz@cherry.de \
--cc=ravi@prevas.dk \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
--cc=y.moog@phytec.de \
--cc=yan.wang@softathome.com \
--cc=yegorslists@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox