u-boot/arch/sandbox/cpu
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
..
cpu.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
eth-raw-os.c sandbox: Drop use of special os_malloc() where possible 2020-02-05 19:33:46 -07:00
Makefile sandbox: Use 'extras' to specify 'head' files 2018-12-05 06:01:34 -07:00
os.c sandbox: also restore terminal settings when killed by SIGINT 2020-04-16 08:07:57 -06:00
sdl.c sandbox: make SDL window resizable 2020-10-29 14:42:18 -06:00
spl.c dm: test: Add a way to run SPL tests 2020-10-29 14:42:18 -06:00
start.c dm: test: Add a way to run SPL tests 2020-10-29 14:42:18 -06:00
state.c sandbox: handling out of memory 2020-07-09 18:57:21 -06:00
u-boot-spl.lds sandbox: u-boot.lds: Remove bogus __bss_start symbol 2020-08-22 08:54:51 -06:00
u-boot.lds sandbox: u-boot.lds: Remove bogus __bss_start symbol 2020-08-22 08:54:51 -06:00