[PATCH v3] test/py: i2c: Add tests for i2c command
Simon Glass
sjg at chromium.org
Tue Jan 2 15:06:29 CET 2024
Hi Love,
On Mon, Jan 1, 2024 at 11:47 PM Love Kumar <love.kumar at 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 at 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.
Regards,
Simon
More information about the U-Boot
mailing list