From b476f7e51b6c9c7a2a72cdc1ea8488d1810610c3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 28 Dec 2025 20:50:41 -0700 Subject: [PATCH] test: ut: Add -m as alias for the -f flag Add -m as an alias for the -f flag which forces manual tests to run. This provides consistency with external test runners that will use -m for "manual" tests. Also update the documentation to explain what manual tests are, and fix a typo ("types" -> "times") in the -r description. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- doc/usage/cmd/ut.rst | 10 ++++++---- test/cmd_ut.c | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/usage/cmd/ut.rst b/doc/usage/cmd/ut.rst index a26ee6ad7de..07cd970da6c 100644 --- a/doc/usage/cmd/ut.rst +++ b/doc/usage/cmd/ut.rst @@ -11,7 +11,7 @@ Synopsis :: - ut [-r] [-f] [-R] [-I:] [ | all []] [...] + ut [-fmr] [-R] [-I:] [ | all []] [...] ut [-s] info Description @@ -26,11 +26,13 @@ suite test Speciifes a particular test to run, within a suite, or all suites --f - Forces running of a manual test. +-f, -m + Force running of manual tests. Manual tests have the `_norun` suffix and + are normally skipped because they require external setup (e.g., creating + disk images from Python/pytest). -r - Specifies the number of types to run each test + Specifies the number of times to run each test -I : Test to run after other tests have run. This is used to find which test diff --git a/test/cmd_ut.c b/test/cmd_ut.c index 8d8a2d763a2..050f7ee6caf 100644 --- a/test/cmd_ut.c +++ b/test/cmd_ut.c @@ -272,6 +272,7 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) runs_per_text = dectoul(str + 2, NULL); break; case 'f': + case 'm': force_run = true; break; case 'I': @@ -340,9 +341,9 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } U_BOOT_LONGHELP(ut, - "[-rs] [-f] [-R] [-I:] [ [...]] - run unit tests\n" + "[-fmrs] [-R] [-I:] [ [...]] - run unit tests\n" " -r Number of times to run each test\n" - " -f Force 'manual' tests to run as well\n" + " -f/-m Force 'manual' tests to run as well\n" " -I Test to run after other tests have run\n" " -R Preserve console recording on test failure\n" " -s Show all suites with ut info\n"