From: Michal Simek Date: Tue, 23 Jan 2018 12:35:09 +0000 (+0100) Subject: test: py: Move ram base address detection out of loop X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=654d5a68841afc987f221cb627d6d93678618347;p=thirdparty%2Fu-boot.git test: py: Move ram base address detection out of loop There is no reason to read base address in a loop. Do it just once. Signed-off-by: Michal Simek --- diff --git a/test/py/tests/test_qspi.py b/test/py/tests/test_qspi.py index b5138503d97..e495837f87e 100644 --- a/test/py/tests/test_qspi.py +++ b/test/py/tests/test_qspi.py @@ -147,6 +147,7 @@ def test_qspi_erase_block(u_boot_console): def qspi_write_twice(u_boot_console): qspi_erase_block(u_boot_console) + addr = u_boot_utils.find_ram_base(u_boot_console) expected_write = "Written: OK" expected_read = "Read: OK" @@ -154,7 +155,6 @@ def qspi_write_twice(u_boot_console): # TODO maybe add alignment and different start for pages for size in random.randint(4, page_size), random.randint(page_size, total_size), total_size: offset = random.randint(4, page_size) - 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)