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