]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
py: test_qspi: Remove qspi_detected flag
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Fri, 1 Sep 2017 10:49:38 +0000 (16:19 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 8 Sep 2017 06:54:23 +0000 (08:54 +0200)
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 <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
test/py/tests/test_qspi.py

index b86d32fb0d0cb066c21c18319c297362b73f87d7..e26d48c72dd6a631438f44ad7e05cbbfee5d1eec 100644 (file)
@@ -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')