selftests: drv-net-hw: support using Python from net hw tests
authorJakub Kicinski <kuba@kernel.org>
Mon, 29 Apr 2024 14:44:22 +0000 (07:44 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 30 Apr 2024 15:15:31 +0000 (08:15 -0700)
commitff4b2bfa63bd07cca35f6e704dc5035650595950
tree477f867e43f040df1664202612270d384df078fb
parent12b6c3a0380a220edb03691689167be13faa4f45
selftests: drv-net-hw: support using Python from net hw tests

We created a separate directory for HW-only tests, recently.
Glue in the Python test library there, Python is a bit annoying
when it comes to using library code located "lower"
in the directory structure.

Reuse the Env class, but let tests require non-nsim setup.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20240429144426.743476-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/Makefile
tools/testing/selftests/drivers/net/hw/Makefile
tools/testing/selftests/drivers/net/hw/lib/py/__init__.py [new file with mode: 0644]
tools/testing/selftests/drivers/net/lib/py/env.py