diff options
author | Tom Rini <trini@konsulko.com> | 2025-04-07 16:40:02 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-08 11:43:23 -0600 |
commit | ff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch) | |
tree | dcfe4bc52848a5637c975a3352b57885e5b8a06d /test/py/tests/test_i2c.py | |
parent | 34820924edbc4ec7803eb89d9852f4b870fa760a (diff) | |
parent | f892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff) |
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86:
emulation: Disable bloblist for now") as that was intended only for the
release due to time.
Diffstat (limited to 'test/py/tests/test_i2c.py')
-rw-r--r-- | test/py/tests/test_i2c.py | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/test/py/tests/test_i2c.py b/test/py/tests/test_i2c.py index 825d0c2e6eb..69b11930ce7 100644 --- a/test/py/tests/test_i2c.py +++ b/test/py/tests/test_i2c.py @@ -31,8 +31,8 @@ env__i2c_eeprom_device_test = { } """ -def get_i2c_test_env(u_boot_console): - f = u_boot_console.config.env.get("env__i2c_device_test", None) +def get_i2c_test_env(ubman): + f = ubman.config.env.get("env__i2c_device_test", None) if not f: pytest.skip("No I2C device to test!") else: @@ -43,34 +43,34 @@ def get_i2c_test_env(u_boot_console): return bus_list, probe_all @pytest.mark.buildconfigspec("cmd_i2c") -def test_i2c_bus(u_boot_console): - bus_list, probe = get_i2c_test_env(u_boot_console) +def test_i2c_bus(ubman): + bus_list, probe = get_i2c_test_env(ubman) bus = random.choice(bus_list) expected_response = f"Bus {bus}:" - response = u_boot_console.run_command("i2c bus") + response = ubman.run_command("i2c bus") assert expected_response in response @pytest.mark.buildconfigspec("cmd_i2c") -def test_i2c_dev(u_boot_console): - bus_list, probe = get_i2c_test_env(u_boot_console) +def test_i2c_dev(ubman): + bus_list, probe = get_i2c_test_env(ubman) expected_response = "Current bus is" - response = u_boot_console.run_command("i2c dev") + response = ubman.run_command("i2c dev") assert expected_response in response @pytest.mark.buildconfigspec("cmd_i2c") -def test_i2c_probe(u_boot_console): - bus_list, probe = get_i2c_test_env(u_boot_console) +def test_i2c_probe(ubman): + bus_list, probe = get_i2c_test_env(ubman) bus = random.choice(bus_list) expected_response = f"Setting bus to {bus}" - response = u_boot_console.run_command(f"i2c dev {bus}") + response = ubman.run_command(f"i2c dev {bus}") assert expected_response in response expected_response = "Valid chip addresses:" - response = u_boot_console.run_command("i2c probe") + response = ubman.run_command("i2c probe") assert expected_response in response @pytest.mark.buildconfigspec("cmd_i2c") -def test_i2c_eeprom(u_boot_console): - f = u_boot_console.config.env.get("env__i2c_eeprom_device_test", None) +def test_i2c_eeprom(ubman): + f = ubman.config.env.get("env__i2c_eeprom_device_test", None) if not f: pytest.skip("No I2C eeprom to test!") @@ -89,17 +89,17 @@ def test_i2c_eeprom(u_boot_console): ) # Enable i2c mux bridge - u_boot_console.run_command("i2c dev %x" % bus) - u_boot_console.run_command("i2c probe") - output = u_boot_console.run_command("i2c md %x 0 5" % addr) + ubman.run_command("i2c dev %x" % bus) + ubman.run_command("i2c probe") + output = ubman.run_command("i2c md %x 0 5" % addr) assert value in output @pytest.mark.buildconfigspec("cmd_i2c") -def test_i2c_probe_all_buses(u_boot_console): - bus_list, probe = get_i2c_test_env(u_boot_console) +def test_i2c_probe_all_buses(ubman): + bus_list, probe = get_i2c_test_env(ubman) bus = random.choice(bus_list) expected_response = f"Bus {bus}:" - response = u_boot_console.run_command("i2c bus") + response = ubman.run_command("i2c bus") assert expected_response in response # Get all the bus list @@ -109,8 +109,8 @@ def test_i2c_probe_all_buses(u_boot_console): for dev in bus_list: expected_response = f"Setting bus to {dev}" - response = u_boot_console.run_command(f"i2c dev {dev}") + response = ubman.run_command(f"i2c dev {dev}") assert expected_response in response expected_response = "Valid chip addresses:" - response = u_boot_console.run_command("i2c probe") + response = ubman.run_command("i2c probe") assert expected_response in response |