From: Siva Durga Prasad Paladugu Date: Fri, 1 Sep 2017 10:49:38 +0000 (+0530) Subject: py: test_qspi: Remove qspi_detected flag X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d42a78eb006fa68109ba3269b5f1684415005e3e;p=thirdparty%2Fu-boot.git py: test_qspi: Remove qspi_detected flag This patch removes qspi_detected flag because if a test has been failed then pytest framework will reset board and continue with other test. In this case from pytest point of view it already probed the device but from device side it hasnt probed after reset. So removing this flag allows device to probe the qspi for every test and works even if one test failed in between. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/test/py/tests/test_qspi.py b/test/py/tests/test_qspi.py index b86d32fb0d0..e26d48c72dd 100644 --- a/test/py/tests/test_qspi.py +++ b/test/py/tests/test_qspi.py @@ -9,15 +9,12 @@ import u_boot_utils import test_net -qspi_detected = False page_size = 0 erase_size = 0 total_size = 0 # Find out qspi memory parameters def qspi_pre_commands(u_boot_console): - if qspi_detected: - return output = u_boot_console.run_command('sf probe') if not "SF: Detected" in output: @@ -55,9 +52,6 @@ def qspi_pre_commands(u_boot_console): total_size *= 1024 * 1024 print 'Total size is: ' + str(total_size) + " B" - global qspi_detected - qspi_detected = True - # Read the whole QSPI flash twice, random_size till full flash size, random till page size @pytest.mark.buildconfigspec('cmd_bdi') @pytest.mark.buildconfigspec('cmd_sf')