Merge patch series "test: Improvements to ut command and test-suite running"
authorTom Rini <trini@konsulko.com>
Fri, 24 Jan 2025 20:35:37 +0000 (14:35 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 24 Jan 2025 20:35:37 +0000 (14:35 -0600)
commit8162f35a108441b8d7a44ac9266c1a64dbf79fd5
tree257e589845877b4cd0eac6482d8b0563af151aaa
parentd51f35a553b0c40603c45a8d1d3110640fb119e3
parent229d145f2614c7da1ca046af35a7ccec2d688f60
Merge patch series "test: Improvements to ut command and test-suite running"

Simon Glass <sjg@chromium.org> says:

The current method of running unit tests relies on subcommands of the
ut command. Only the code in each subcommand knows how to find the tests
related to that subcomand.

This is not ideal and we now have quite a few subcommands which do
nothing but locate the relevant tests in a linker list, then call a
common function to run them.

This series adds a list of test suites, so that these subcommands can be
removed.

An issue with 'ut all' is that it doesn't record how many tests failed
overall, so it is necessary to examine copious amounts of output to look
for failures. This series adds a new 'total' feature allow recording the
total number of failed tests.

To help with 'ut all' a new pytest is created which runs it (as well as
'ut info') and makes sure that all is well. Due to the 'ut all' failures
this does not pass, so the test is disabled for now. It is here because
it provides security against misnaming a test suite and causing it not
to run.

Future work may:
- get 'ut all' passing
- enable test_suite() in CL, to ensure that 'ut all' keeps passing
- record duration of each suite
- allow running the tests in random order to tease out dependencies
- tweak the output to remove common prefixes
- getting rid of bootstd, optee and seame 'ut' subcommands

Link: https://lore.kernel.org/r/20250120212613.516664-1-sjg@chromium.org
test/common/Makefile
test/lib/Makefile
test/py/tests/test_upl.py