xref: /linux/tools/testing/selftests/Makefile (revision 30fdd373f24cc50e250c71a6e2df89505e267804)
1TARGETS = breakpoints
2TARGETS += cpu-hotplug
3TARGETS += efivarfs
4TARGETS += exec
5TARGETS += firmware
6TARGETS += ftrace
7TARGETS += kcmp
8TARGETS += memfd
9TARGETS += memory-hotplug
10TARGETS += mount
11TARGETS += mqueue
12TARGETS += net
13TARGETS += powerpc
14TARGETS += ptrace
15TARGETS += size
16TARGETS += sysctl
17TARGETS += timers
18TARGETS += user
19TARGETS += vm
20#Please keep the TARGETS list alphabetically sorted
21
22TARGETS_HOTPLUG = cpu-hotplug
23TARGETS_HOTPLUG += memory-hotplug
24
25# Clear LDFLAGS and MAKEFLAGS if called from main
26# Makefile to avoid test build failures when test
27# Makefile doesn't have explicit build rules.
28ifeq (1,$(MAKELEVEL))
29undefine LDFLAGS
30override MAKEFLAGS =
31endif
32
33all:
34	for TARGET in $(TARGETS); do \
35		make -C $$TARGET; \
36	done;
37
38run_tests: all
39	for TARGET in $(TARGETS); do \
40		make -C $$TARGET run_tests; \
41	done;
42
43hotplug:
44	for TARGET in $(TARGETS_HOTPLUG); do \
45		make -C $$TARGET; \
46	done;
47
48run_hotplug: hotplug
49	for TARGET in $(TARGETS_HOTPLUG); do \
50		make -C $$TARGET run_full_test; \
51	done;
52
53clean_hotplug:
54	for TARGET in $(TARGETS_HOTPLUG); do \
55		make -C $$TARGET clean; \
56	done;
57
58clean:
59	for TARGET in $(TARGETS); do \
60		make -C $$TARGET clean; \
61	done;
62