Message ID | 20241219085803.1145606-3-lizhijian@fujitsu.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | selftests: Fix run_tests and install for net TARGET | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index fcaebd122d64..326dfd6ec497 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -206,8 +206,9 @@ all: done; exit $$ret; run_tests: all - @for TARGET in $(TARGETS); do \ + @for TARGET in $(INSTALL_DEP_TARGETS) $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ + mkdir -p $$BUILD_TARGET; \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests \ SRC_PATH=$(shell readlink -e $$(pwd)) \ OBJ_PATH=$(BUILD) \
Similar to the installation process, run_tests out-of-tree requires copying TEST_FILES and TEST_INCLUDES to the OUTPUT directory. The `net/lib` directory is a special case because it is a dependency for `net`. Therefore, it should be processed before `net`. This patch fixes the following error: $ make O=$build/ TARGETS=net kselftest V=1 # selftests: net: rtnetlink.sh # lib.sh: line 5: $O/kselftest/net/lib/sh/defer.sh: No such file or directory # FAIL: cannot add dummy interface not ok 20 selftests: net: rtnetlink.sh # exit=1 # timeout set to 3600 # selftests: net: xfrm_policy.sh # lib.sh: line 5: $O/kselftest/net/lib/sh/defer.sh: No such file or directory Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> --- tools/testing/selftests/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)