Message ID | 20241219085803.1145606-2-lizhijian@fujitsu.com |
---|---|
State | New |
Headers | show |
Series | selftests: Fix run_tests and install for net TARGET | expand |
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 2401e973c359..fcaebd122d64 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -263,6 +263,7 @@ ifdef INSTALL_PATH @ret=1; \ for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ + mkdir $$BUILD_TARGET -p; \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install \ INSTALL_PATH=$(INSTALL_PATH)/$$TARGET \ SRC_PATH=$(shell readlink -e $$(pwd)) \
Similar to 'all' which will create BUILD_TARGET for TARGETS, we should create BUILD_TARGET directory for INSTALL_DEP_TARGETS before generate the binaries. This helps to fix the following error for net target during kselftest-install: $ make O=$build/ kselftest-install TARGETS=net V=1 ... /usr/bin/ld: cannot open output file $O/kselftest/net/lib/csum: No such file or directory Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> --- tools/testing/selftests/Makefile | 1 + 1 file changed, 1 insertion(+)