[Concept,5/9] test: ut: Add -m as alias for the -f flag
Commit Message
From: Simon Glass <simon.glass@canonical.com>
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 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
doc/usage/cmd/ut.rst | 10 ++++++----
test/cmd_ut.c | 5 +++--
2 files changed, 9 insertions(+), 6 deletions(-)
@@ -11,7 +11,7 @@ Synopsis
::
- ut [-r<runs>] [-f] [-R] [-I<n>:<one_test>] [<suite> | all [<test>]] [<args>...]
+ ut [-fmr<runs>] [-R] [-I<n>:<one_test>] [<suite> | all [<test>]] [<args>...]
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 <n>
- Specifies the number of types to run each test
+ Specifies the number of times to run each test
-I <n>:<one_test>
Test to run after <n> other tests have run. This is used to find which test
@@ -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<n>:<one_test>] <suite> [<test> [<args>...]] - run unit tests\n"
+ "[-fmrs] [-R] [-I<n>:<one_test>] <suite> [<test> [<args>...]] - run unit tests\n"
" -r<runs> 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 <n> other tests have run\n"
" -R Preserve console recording on test failure\n"
" -s Show all suites with ut info\n"