test: Support tests which can only be run manually
authorSimon Glass <sjg@chromium.org>
Fri, 21 Oct 2022 00:22:50 +0000 (18:22 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 31 Oct 2022 15:02:44 +0000 (11:02 -0400)
commitcbd71fad6d468018727ab04b2bb912989aec0785
tree64787584abda89116e91efe410fcce1ab326935d
parentc43635bdbc6cb1e4ba2d9e2f28f7f3cb3b287bf8
test: Support tests which can only be run manually

At present we normally write tests either in Python or in C. But most
Python tests end up doing a lot of checks which would be better done in C.
Checks done in C are orders of magnitude faster and it is possible to get
full access to U-Boot's internal workings, rather than just relying on
the command line.

The model is to have a Python test set up some things and then use C code
(in a unit test) to check that they were done correctly. But we don't want
those checks to happen as part of normal test running, since each C unit
tests is dependent on the associate Python tests, so cannot run without
it.

To acheive this, add a new UT_TESTF_MANUAL flag to use with the C 'check'
tests, so that they can be skipped by default when the 'ut' command is
used. Require that tests have a name ending with '_norun', so that pytest
knows to skip them.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/spl.c
doc/develop/tests_writing.rst
include/test/test.h
include/test/ut.h
test/cmd_ut.c
test/dm/test-dm.c
test/py/conftest.py
test/test-main.c