Skip to contentSkip to conversation

test/py: Add support for loading image via tftp to specified location

PATCH New Michal Simek 3 participants 3 messages Apr 4, 2016 – Apr 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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",
}

---

Changes in v2:
- Remove quotes from addr field
- Remove int conversion
- Update example at the top of file

 test/py/tests/test_net.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
test/py/tests/test_net.py +5 -1
index 07393eb1fdf8..4ab58b44248a 100644
@@ -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 = '
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 test/py: Add support for loading image via tftp to specified location

Quoted 8 lines · Michal Simek

For example this setting:

env__net_tftp_readable_file = {
     "fn": "ep108/image.ub",
     "addr": 0x10000000,
     "size": 25846296,
     "crc32": "b726f9de",
}
#2 lore raw

PATCH v2 1/1 test/py: Add support for loading image via tftp to specified location

In reply to Michal Simek
Quoted 11 lines · Michal Simek

For example this setting:

env__net_tftp_readable_file = {
    "fn": "ep108/image.ub",
    "addr": 0x10000000,
    "size": 25846296,
    "crc32": "b726f9de",
}

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160411/ca942623/attachment.sig>