diff options
author | 2024-04-04 19:45:22 -0700 | |
---|---|---|
committer | 2024-04-08 11:40:41 +0100 | |
commit | b86761ff6374813cdf64ffd6b95ddd1813c435d8 (patch) | |
tree | 5654585e5afc663cc5fa8b991f62cb102e186ee4 /tools/testing/selftests/Makefile | |
parent | Merge tag 'batadv-next-pullrequest-20240405' of git://git.open-mesh.org/linux... (diff) | |
download | linux-b86761ff6374813cdf64ffd6b95ddd1813c435d8.tar.gz linux-b86761ff6374813cdf64ffd6b95ddd1813c435d8.tar.bz2 linux-b86761ff6374813cdf64ffd6b95ddd1813c435d8.zip |
selftests: net: add scaffolding for Netlink tests in Python
Add glue code for accessing the YNL library which lives under
tools/net and YAML spec files from under Documentation/.
Automatically figure out if tests are run in tree or not.
Since we'll want to use this library both from net and
drivers/net test targets make the library a target as well,
and automatically include it when net or drivers/net are
included. Making net/lib a target ensures that we end up
with only one copy of it, and saves us some path guessing.
Add a tiny bit of formatting support to be able to output KTAP
from the start.
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/Makefile')
-rw-r--r-- | tools/testing/selftests/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index e1504833654d..f533eb7054fe 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -116,6 +116,13 @@ TARGETS += zram TARGETS_HOTPLUG = cpu-hotplug TARGETS_HOTPLUG += memory-hotplug +# Networking tests want the net/lib target, include it automatically +ifneq ($(filter net,$(TARGETS)),) +ifeq ($(filter net/lib,$(TARGETS)),) + INSTALL_DEP_TARGETS := net/lib +endif +endif + # User can optionally provide a TARGETS skiplist. By default we skip # BPF since it has cutting edge build time dependencies which require # more effort to install. @@ -245,7 +252,7 @@ ifdef INSTALL_PATH install -m 744 run_kselftest.sh $(INSTALL_PATH)/ rm -f $(TEST_LIST) @ret=1; \ - for TARGET in $(TARGETS); do \ + for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install \ INSTALL_PATH=$(INSTALL_PATH)/$$TARGET \ |