]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
py: test: Fix qspi crc handling
authorMichal Simek <michal.simek@xilinx.com>
Fri, 19 Jan 2018 09:20:09 +0000 (10:20 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 31 Jan 2018 12:15:50 +0000 (13:15 +0100)
Read the whole CRC string not just one char.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
test/py/tests/test_qspi.py

index 5882d6c4c80006b36c3b2feaba6ad019c30428e9..474446165907bd9e43715ee83026225eb1b3a78c 100644 (file)
@@ -106,7 +106,7 @@ def qspi_read_twice(u_boot_console):
         output = u_boot_console.run_command('sf read %x 0 %x' % (addr + total_size, size))
         assert expected_read in output
         output = u_boot_console.run_command('crc32 %x %x' % (addr + total_size, size))
-        m = re.search('==> (.+?)', output)
+        m = re.search('==> (.+?)$', output)
         if not m:
             pytest.fail("CRC32 failed")
         expected_crc32 = m.group(1)
@@ -155,7 +155,7 @@ def qspi_write_twice(u_boot_console):
         addr = u_boot_utils.find_ram_base(u_boot_console)
         size = size - old_size
         output = u_boot_console.run_command('crc32 %x %x' % (addr + total_size, size))
-        m = re.search('==> (.+?)', output)
+        m = re.search('==> (.+?)$', output)
         if not m:
             pytest.fail("CRC32 failed")