summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2016-04-04 20:06:14 +0200
committerTom Rini <trini@konsulko.com>2016-04-11 20:48:22 -0400
commit3ba1352b97999546610cc9b8708281b60d660e48 (patch)
tree9f23c756d15b84ae7719400830fceb9ee493d581 /test
parentaafa64827f30a7d2aa2c2cc2a60906eabd0272b8 (diff)
test/py: Add support for loading image via tftp to specified location
For example this setting: env__net_tftp_readable_file = { "fn": "ep108/image.ub", "addr": 0x10000000, "size": 25846296, "crc32": "b726f9de", } Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_net.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/py/tests/test_net.py b/test/py/tests/test_net.py
index 07393eb1fdf..4ab58b44248 100644
--- a/test/py/tests/test_net.py
+++ b/test/py/tests/test_net.py
@@ -43,6 +43,7 @@ env__net_static_env_vars = [
# may be omitted or set to None if TFTP testing is not possible or desired.
env__net_tftp_readable_file = {
"fn": "ubtest-readable.bin",
+ "addr": 0x10000000,
"size": 5058624,
"crc32": "c2244b26",
}
@@ -135,7 +136,10 @@ def test_net_tftpboot(u_boot_console):
if not f:
pytest.skip('No TFTP readable file to read')
- addr = u_boot_utils.find_ram_base(u_boot_console)
+ addr = f.get('addr', None)
+ if not addr:
+ addr = u_boot_utils.find_ram_base(u_boot_console)
+
fn = f['fn']
output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn))
expected_text = 'Bytes transferred = '