]>
Commit | Line | Data |
---|---|---|
66a01b96 | 1 | TARGETS = breakpoints |
f4ecb322 | 2 | TARGETS += capabilities |
58c7be84 PE |
3 | TARGETS += cpu-hotplug |
4 | TARGETS += efivarfs | |
96e869d8 AM |
5 | TARGETS += exec |
6 | TARGETS += firmware | |
7 | TARGETS += ftrace | |
ecac1a75 | 8 | TARGETS += futex |
7e722473 | 9 | TARGETS += ipc |
66a01b96 | 10 | TARGETS += kcmp |
317dc34a | 11 | TARGETS += lib |
b6d97344 | 12 | TARGETS += membarrier |
4f5ce5e8 | 13 | TARGETS += memfd |
58c7be84 | 14 | TARGETS += memory-hotplug |
db181ce0 | 15 | TARGETS += mount |
96e869d8 | 16 | TARGETS += mqueue |
a6f68034 | 17 | TARGETS += net |
96e869d8 | 18 | TARGETS += powerpc |
cc04a46f | 19 | TARGETS += pstore |
17afab1d | 20 | TARGETS += ptrace |
c99ee51a | 21 | TARGETS += seccomp |
19fd2868 | 22 | TARGETS += sigaltstack |
96e869d8 | 23 | TARGETS += size |
1087d019 | 24 | TARGETS += static_keys |
96e869d8 | 25 | TARGETS += sysctl |
2278e5ed | 26 | ifneq (1, $(quicktest)) |
0bc4b0cf | 27 | TARGETS += timers |
2278e5ed | 28 | endif |
3e2a4c18 | 29 | TARGETS += user |
96e869d8 | 30 | TARGETS += vm |
3f705dfd | 31 | TARGETS += x86 |
f21fb798 | 32 | TARGETS += zram |
96e869d8 | 33 | #Please keep the TARGETS list alphabetically sorted |
2278e5ed SK |
34 | # Run "make quicktest=1 run_tests" or |
35 | # "make quicktest=1 kselftest from top level Makefile | |
274343ad | 36 | |
ddddda9b SK |
37 | TARGETS_HOTPLUG = cpu-hotplug |
38 | TARGETS_HOTPLUG += memory-hotplug | |
39 | ||
67d8712d SK |
40 | # Clear LDFLAGS and MAKEFLAGS if called from main |
41 | # Makefile to avoid test build failures when test | |
42 | # Makefile doesn't have explicit build rules. | |
43 | ifeq (1,$(MAKELEVEL)) | |
60df4642 | 44 | override LDFLAGS = |
67d8712d SK |
45 | override MAKEFLAGS = |
46 | endif | |
47 | ||
274343ad FW |
48 | all: |
49 | for TARGET in $(TARGETS); do \ | |
50 | make -C $$TARGET; \ | |
51 | done; | |
52 | ||
cab6b056 | 53 | run_tests: all |
f467f714 FW |
54 | for TARGET in $(TARGETS); do \ |
55 | make -C $$TARGET run_tests; \ | |
56 | done; | |
57 | ||
ddddda9b SK |
58 | hotplug: |
59 | for TARGET in $(TARGETS_HOTPLUG); do \ | |
60 | make -C $$TARGET; \ | |
61 | done; | |
62 | ||
63 | run_hotplug: hotplug | |
64 | for TARGET in $(TARGETS_HOTPLUG); do \ | |
65 | make -C $$TARGET run_full_test; \ | |
66 | done; | |
67 | ||
68 | clean_hotplug: | |
69 | for TARGET in $(TARGETS_HOTPLUG); do \ | |
70 | make -C $$TARGET clean; \ | |
71 | done; | |
72 | ||
f615e2bb HT |
73 | run_pstore_crash: |
74 | make -C pstore run_crash | |
75 | ||
32dcfba6 ME |
76 | INSTALL_PATH ?= install |
77 | INSTALL_PATH := $(abspath $(INSTALL_PATH)) | |
78 | ALL_SCRIPT := $(INSTALL_PATH)/run_kselftest.sh | |
79 | ||
80 | install: | |
81 | ifdef INSTALL_PATH | |
82 | @# Ask all targets to install their files | |
83 | mkdir -p $(INSTALL_PATH) | |
84 | for TARGET in $(TARGETS); do \ | |
32dcfba6 ME |
85 | make -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \ |
86 | done; | |
87 | ||
88 | @# Ask all targets to emit their test scripts | |
89 | echo "#!/bin/bash" > $(ALL_SCRIPT) | |
90 | echo "cd \$$(dirname \$$0)" >> $(ALL_SCRIPT) | |
91 | echo "ROOT=\$$PWD" >> $(ALL_SCRIPT) | |
92 | ||
93 | for TARGET in $(TARGETS); do \ | |
94 | echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \ | |
95 | echo "echo ========================================" >> $(ALL_SCRIPT); \ | |
96 | echo "cd $$TARGET" >> $(ALL_SCRIPT); \ | |
97 | make -s --no-print-directory -C $$TARGET emit_tests >> $(ALL_SCRIPT); \ | |
98 | echo "cd \$$ROOT" >> $(ALL_SCRIPT); \ | |
99 | done; | |
100 | ||
101 | chmod u+x $(ALL_SCRIPT) | |
102 | else | |
103 | $(error Error: set INSTALL_PATH to use install) | |
104 | endif | |
105 | ||
274343ad FW |
106 | clean: |
107 | for TARGET in $(TARGETS); do \ | |
108 | make -C $$TARGET clean; \ | |
109 | done; | |
32dcfba6 ME |
110 | |
111 | .PHONY: install |