diff options
author | Sean Anderson <seanga2@gmail.com> | 2023-10-14 16:48:05 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-10-17 20:50:52 -0400 |
commit | 60d76e332d8031eab6937778b3ed7b6558c2b3f1 (patch) | |
tree | 8e63d4db50b7aef9db5b2106e5e6ec3780410ebc /test/py | |
parent | 65efaac425e948dc56db5cf315d0497faeddb5b0 (diff) |
test: spl: Add a test for the SPI load method
Add test for the SPI load method. This one is pretty straightforward. We
can't enable FIT_EXTERNAL with LOAD_FIT_FULL because spl_spi_load_image
doesn't know the total image size and has to guess from fdt_totalsize. This
doesn't include external data, so loading it will fail.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/tests/test_spl.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/py/tests/test_spl.py b/test/py/tests/test_spl.py index bd273dad893..42e4c4342b2 100644 --- a/test/py/tests/test_spl.py +++ b/test/py/tests/test_spl.py @@ -5,6 +5,16 @@ import os.path import pytest +@pytest.mark.buildconfigspec('spl_unit_test') +def test_ut_spl_init(u_boot_console): + """Initialize data for ut spl tests.""" + + fn = u_boot_console.config.source_dir + '/spi.bin' + if not os.path.exists(fn): + data = b'\x00' * (2 * 1024 * 1024) + with open(fn, 'wb') as fh: + fh.write(data) + def test_spl(u_boot_console, ut_spl_subtest): """Execute a "ut" subtest. |