From ed69de1d3dd0140cf1910bd9df149dd8b112b5b7 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 21 Dec 2017 14:11:56 +0100 Subject: [PATCH] py: test: Set device before running probe Several zynq/zynqmp boards are reading mac address from eeprom that's why device is already selected. For zc1751-dc1 this is not used that's why i2c dev needs to be called. In general setting the first controller is good thing to do. Signed-off-by: Michal Simek --- test/py/tests/test_i2c.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/py/tests/test_i2c.py b/test/py/tests/test_i2c.py index d423c36fb3f..723eb0552c3 100644 --- a/test/py/tests/test_i2c.py +++ b/test/py/tests/test_i2c.py @@ -29,6 +29,9 @@ def test_i2c_dev(u_boot_console): @pytest.mark.buildconfigspec("cmd_i2c") def test_i2c_probe(u_boot_console): + expected_response = "Setting bus to 0" + response = u_boot_console.run_command("i2c dev 0") + assert(expected_response in response) expected_response = "Valid chip addresses:" response = u_boot_console.run_command("i2c probe") assert(expected_response in response) -- 2.47.3