[U-Boot] [PATCH] test: py: Extend fpga test with fit image with external data
Michal Simek
michal.simek at xilinx.com
Mon Feb 18 12:35:24 UTC 2019
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 at xilinx.com>
---
test/py/tests/test_fpga.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/test/py/tests/test_fpga.py b/test/py/tests/test_fpga.py
index 798f6eed3dc9..e3bb7b41c749 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
+
+ at pytest.mark.buildconfigspec('cmd_fpga')
+ at pytest.mark.buildconfigspec('cmd_fpga_loadmk')
+ at pytest.mark.buildconfigspec('fit')
+ at 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')
--
1.9.1
More information about the U-Boot
mailing list