summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCristian Marussi <cristian.marussi@arm.com>2019-09-26 20:52:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-06 15:08:02 +0300
commit4807934211330b9e0da58d62bfe9783ae935b150 (patch)
tree709c2b8add892018f09bd8cf9e818c5bbc821246 /tools
parent230c3b901f08bb9ac0d01136e8c28879af1aeb8e (diff)
downloadlinux-4807934211330b9e0da58d62bfe9783ae935b150.tar.xz
kselftest: exclude failed TARGETS from runlist
[ Upstream commit 131b30c94fbc0adb15f911609884dd39dada8f00 ] A TARGET which failed to be built/installed should not be included in the runlist generated inside the run_kselftest.sh script. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 25b43a8c2b15..1779923d7a7b 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -198,8 +198,12 @@ ifdef INSTALL_PATH
echo " cat /dev/null > \$$logfile" >> $(ALL_SCRIPT)
echo "fi" >> $(ALL_SCRIPT)
+ @# While building run_kselftest.sh skip also non-existent TARGET dirs:
+ @# they could be the result of a build failure and should NOT be
+ @# included in the generated runlist.
for TARGET in $(TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \
+ [ ! -d $$INSTALL_PATH/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \
echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
echo "cd $$TARGET" >> $(ALL_SCRIPT); \
echo -n "run_many" >> $(ALL_SCRIPT); \