diff options
Diffstat (limited to 'test/py/tests/test_mmc_wr.py')
-rw-r--r-- | test/py/tests/test_mmc_wr.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/py/tests/test_mmc_wr.py b/test/py/tests/test_mmc_wr.py index 05e5c1ee85d..41a75f885e1 100644 --- a/test/py/tests/test_mmc_wr.py +++ b/test/py/tests/test_mmc_wr.py @@ -6,7 +6,7 @@ # to the eMMC or SD card, then reads it back and performs a comparison. import pytest -import u_boot_utils +import utils """ This test relies on boardenv_* to containing configuration values to define @@ -38,11 +38,11 @@ env__mmc_wr_configs = ( @pytest.mark.buildconfigspec('cmd_mmc') @pytest.mark.buildconfigspec('cmd_memory') @pytest.mark.buildconfigspec('cmd_random') -def test_mmc_wr(u_boot_console, env__mmc_wr_config): +def test_mmc_wr(ubman, env__mmc_wr_config): """Test the "mmc write" command. Args: - u_boot_console: A U-Boot console connection. + ubman: A U-Boot console connection. env__mmc_wr_config: The single MMC configuration on which to run the test. See the file-level comment above for details of the format. @@ -60,8 +60,8 @@ def test_mmc_wr(u_boot_console, env__mmc_wr_config): count_bytes = count_sectors * 512 - bcfg = u_boot_console.config.buildconfig - ram_base = u_boot_utils.find_ram_base(u_boot_console) + bcfg = ubman.config.buildconfig + ram_base = utils.find_ram_base(ubman) src_addr = '0x%08x' % ram_base dst_addr = '0x%08x' % (ram_base + count_bytes) @@ -69,7 +69,7 @@ def test_mmc_wr(u_boot_console, env__mmc_wr_config): for i in range(test_iterations): # Generate random data cmd = 'random %s %x' % (src_addr, count_bytes) - response = u_boot_console.run_command(cmd) + response = ubman.run_command(cmd) good_response = '%d bytes filled with random data' % (count_bytes) assert good_response in response @@ -77,7 +77,7 @@ def test_mmc_wr(u_boot_console, env__mmc_wr_config): cmd = 'mmc dev %d' % devid if is_emmc: cmd += ' %d' % partid - response = u_boot_console.run_command(cmd) + response = ubman.run_command(cmd) assert 'no card present' not in response if is_emmc: partid_response = "(part %d)" % partid @@ -88,18 +88,18 @@ def test_mmc_wr(u_boot_console, env__mmc_wr_config): # Write data cmd = 'mmc write %s %x %x' % (src_addr, sector, count_sectors) - response = u_boot_console.run_command(cmd) + response = ubman.run_command(cmd) good_response = 'MMC write: dev # %d, block # %d, count %d ... %d blocks written: OK' % (devid, sector, count_sectors, count_sectors) assert good_response in response # Read data cmd = 'mmc read %s %x %x' % (dst_addr, sector, count_sectors) - response = u_boot_console.run_command(cmd) + response = ubman.run_command(cmd) good_response = 'MMC read: dev # %d, block # %d, count %d ... %d blocks read: OK' % (devid, sector, count_sectors, count_sectors) assert good_response in response # Compare src and dst data cmd = 'cmp.b %s %s %x' % (src_addr, dst_addr, count_bytes) - response = u_boot_console.run_command(cmd) + response = ubman.run_command(cmd) good_response = 'Total of %d byte(s) were the same' % (count_bytes) assert good_response in response |