u-boot/include/test
Simon Glass b25ff5cbaa dm: test: Add a way to run SPL tests
Add a -u flag for U-Boot SPL which requests that unit tests be run. To
make this work, export dm_test_main() and update it to skip test features
that are not used with of-platdata.

To run the tests:

   $ spl/u-boot-spl -u
   U-Boot SPL 2020.10-rc5 (Oct 01 2020 - 07:35:39 -0600)
   Running 0 driver model tests
   Failures: 0

At present there are no SPL unit tests.

Note that there is one wrinkle with these tests. SPL has limited memory
available for allocation. Also malloc_simple does not free memory
(free() is a nop) and running tests repeatedly causes driver-model to
reinit multiple times and allocate memory. Therefore it is not possible
to run more than a few tests at a time. One solution is to increase the
amount of malloc space in sandbox_spl. This is not a problem for pytest,
since it runs each test individually, so for now this is left as is.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-29 14:42:18 -06:00
..
compression.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
env.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
export.h clk: Add K210 pll support 2020-07-01 15:01:21 +08:00
lib.h test: provide unit test for memory functions 2019-02-09 07:50:53 -05:00
log.h test: log functions with CONFIG_LOG=n 2020-04-16 08:07:58 -06:00
optee.h tests: add OP-TEE test suite 2019-11-14 07:09:34 -06:00
overlay.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
suites.h cmd: Update the memory-search command 2020-08-07 22:31:32 -04:00
test.h dm: test: Add a way to run SPL tests 2020-10-29 14:42:18 -06:00
ut.h bloblist: Compare addresses rather than pointers in tests 2020-10-06 09:07:54 -06:00