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