
On Tue, Jan 02, 2024 at 07:06:29AM -0700, Simon Glass wrote:
Hi Love,
On Mon, Jan 1, 2024 at 11:47 PM Love Kumar love.kumar@amd.com wrote:
Add below test cases for i2c commands: i2c_bus - To show i2c bus info, i2c_dev - To set or show the current bus, i2c_probe - To probe the i2c device, i2c_eeprom - To test i2c eeprom device, i2c_probe_all_buses - To list down all the buses and probes it
Signed-off-by: Love Kumar love.kumar@amd.com
Changes in v2:
- Take the configured eeprom value from env to read back and compare
Changes in v3:
- Add test env dependency to run it for provided i2c bus list
test/py/tests/test_i2c.py | 116 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 test/py/tests/test_i2c.py
It is OK to write these in Python, but you might also consider some C tests for the commands. See test/dm/i2c.c for some examples which use an eeprom.
But part of the problem is that test/dm/ is only run on sandbox, and these tests are being run on real hardware.