[PATCH v3] test/py: i2c: Add tests for i2c command
Tom Rini
trini at konsulko.com
Wed Jan 3 18:57:51 CET 2024
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 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.
But part of the problem is that test/dm/ is only run on sandbox, and
these tests are being run on real hardware.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240103/54072304/attachment.sig>
More information about the U-Boot
mailing list