diff options
author | Michal Simek <michal.simek@xilinx.com> | 2019-02-18 13:22:56 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2019-04-16 11:51:34 +0200 |
commit | 963482120d182835e58d234961c5f7c3d5f78202 (patch) | |
tree | 9da19fcdf859001bc7140406c7d10fa7f2cbb034 /test | |
parent | 3003c445b3cb1d1ca7e2304bfa3e2faf2ae02f80 (diff) | |
download | u-boot-963482120d182835e58d234961c5f7c3d5f78202.tar.gz u-boot-963482120d182835e58d234961c5f7c3d5f78202.tar.bz2 u-boot-963482120d182835e58d234961c5f7c3d5f78202.zip |
test: py: Extend fpga test with fit image with external data
Images are created
mkimage -f fit.its -E download-fit-external.ub
and test expects these entries.
env__fpga_under_test = {
...
"mkimage_fit_external": download-fit-external.ub",
"mkimage_fit_external_size": xxxxx,
...
}
Test download file and loads it to fpga.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/py/tests/test_fpga.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/py/tests/test_fpga.py b/test/py/tests/test_fpga.py index 798f6eed3d..e3bb7b41c7 100644 --- a/test/py/tests/test_fpga.py +++ b/test/py/tests/test_fpga.py @@ -357,6 +357,19 @@ def test_fpga_loadmk_legacy_gz(u_boot_console): @pytest.mark.buildconfigspec('cmd_fpga_loadmk') @pytest.mark.buildconfigspec('fit') @pytest.mark.buildconfigspec('cmd_echo') +def test_fpga_loadmk_fit_external(u_boot_console): + f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'mkimage_fit_external') + + u_boot_console.run_command('imi %x' % (addr)) + + expected_text = 'FPGA loaded successfully' + output = u_boot_console.run_command('fpga loadmk %x %x:fpga && echo %s' % (dev, addr, expected_text)) + assert expected_text in output + +@pytest.mark.buildconfigspec('cmd_fpga') +@pytest.mark.buildconfigspec('cmd_fpga_loadmk') +@pytest.mark.buildconfigspec('fit') +@pytest.mark.buildconfigspec('cmd_echo') def test_fpga_loadmk_fit(u_boot_console): f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'mkimage_fit') |