12 TARGETS
+= memory-hotplug
21 TARGETS
+= static_keys
23 ifneq (1, $(quicktest
))
30 #Please keep the TARGETS list alphabetically sorted
31 # Run "make quicktest=1 run_tests" or
32 # "make quicktest=1 kselftest from top level Makefile
34 TARGETS_HOTPLUG
= cpu-hotplug
35 TARGETS_HOTPLUG
+= memory-hotplug
37 # Clear LDFLAGS and MAKEFLAGS if called from main
38 # Makefile to avoid test build failures when test
39 # Makefile doesn't have explicit build rules.
46 for TARGET in
$(TARGETS
); do \
51 for TARGET in
$(TARGETS
); do \
52 make
-C
$$TARGET run_tests
; \
56 for TARGET in
$(TARGETS_HOTPLUG
); do \
61 for TARGET in
$(TARGETS_HOTPLUG
); do \
62 make
-C
$$TARGET run_full_test
; \
66 for TARGET in
$(TARGETS_HOTPLUG
); do \
67 make
-C
$$TARGET clean; \
71 make
-C pstore run_crash
73 INSTALL_PATH ?
= install
74 INSTALL_PATH
:= $(abspath
$(INSTALL_PATH
))
75 ALL_SCRIPT
:= $(INSTALL_PATH
)/run_kselftest.sh
79 @
# Ask all targets to install their files
80 mkdir
-p
$(INSTALL_PATH
)
81 for TARGET in
$(TARGETS
); do \
82 make
-C
$$TARGET INSTALL_PATH
=$(INSTALL_PATH
)/$$TARGET install; \
85 @
# Ask all targets to emit their test scripts
86 echo
"#!/bin/sh" > $(ALL_SCRIPT
)
87 echo
"cd \$$(dirname \$$0)" >> $(ALL_SCRIPT
)
88 echo
"ROOT=\$$PWD" >> $(ALL_SCRIPT
)
90 for TARGET in
$(TARGETS
); do \
91 echo
"echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT
); \
92 echo
"echo ========================================" >> $(ALL_SCRIPT
); \
93 echo
"[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT
); \
94 echo
"cd $$TARGET" >> $(ALL_SCRIPT
); \
95 make
-s
--no-print-directory
-C
$$TARGET emit_tests
>> $(ALL_SCRIPT
); \
96 echo
"cd \$$ROOT" >> $(ALL_SCRIPT
); \
99 chmod u
+x
$(ALL_SCRIPT
)
101 $(error Error
: set INSTALL_PATH to use
install)
105 for TARGET in
$(TARGETS
); do \
106 make
-C
$$TARGET clean; \