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>
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user