summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <usama.anjum@collabora.com>2022-02-17 03:38:17 +0500
committerShuah Khan <skhan@linuxfoundation.org>2022-03-03 15:18:13 -0700
commitf6d344cd5fa6a15e1ec2da350470b35a3f55f74c (patch)
tree2c616ff8e09bd111c4a264ef1e14b9ae2ca4509a
parenta50a88f026fb28ece512c50e8ef7cd4ef6d0a291 (diff)
downloadlinux-f6d344cd5fa6a15e1ec2da350470b35a3f55f74c.tar.bz2
selftests: Fix build when $(O) points to a relative path
Build of bpf and tc-testing selftests fails when the relative path of the build directory is specified. make -C tools/testing/selftests O=build0 make[1]: Entering directory '/linux_mainline/tools/testing/selftests/bpf' ../../../scripts/Makefile.include:4: *** O=build0 does not exist. Stop. make[1]: Entering directory '/linux_mainline/tools/testing/selftests/tc-testing' ../../../scripts/Makefile.include:4: *** O=build0 does not exist. Stop. Makefiles of bpf and tc-testing include scripts/Makefile.include file. This file has sanity checking inside it which checks the output path. The output path is not relative to the bpf or tc-testing. The sanity check fails. Expand the output path to get rid of this error. The fix is the same as mentioned in commit 150a27328b68 ("bpf, preload: Fix build when $(O) points to a relative path"). Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
-rw-r--r--tools/testing/selftests/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 5d9d4ddccccb..2319ec87f53d 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -177,6 +177,7 @@ all: khdr
BUILD_TARGET=$$BUILD/$$TARGET; \
mkdir $$BUILD_TARGET -p; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \
+ O=$(abs_objtree) \
$(if $(FORCE_TARGETS),|| exit); \
ret=$$((ret * $$?)); \
done; exit $$ret;
@@ -184,7 +185,8 @@ all: khdr
run_tests: all
@for TARGET in $(TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \
- $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests;\
+ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests \
+ O=$(abs_objtree); \
done;
hotplug:
@@ -235,6 +237,7 @@ ifdef INSTALL_PATH
for TARGET in $(TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install \
+ O=$(abs_objtree) \
$(if $(FORCE_TARGETS),|| exit); \
ret=$$((ret * $$?)); \
done; exit $$ret;