xref: /openbmc/linux/tools/testing/selftests/timers/Makefile (revision 6e8b285bcdd1834a18fd264c88a15418091c4015)
1CC = $(CROSS_COMPILE)gcc
2BUILD_FLAGS = -DKTEST
3CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS)
4LDFLAGS += -lrt -lpthread
5bins = posix_timers nanosleep inconsistency-check nsleep-lat raw_skew \
6	set-timer-lat threadtest mqueue-lat valid-adjtimex \
7	alarmtimer-suspend change_skew skew_consistency
8
9all: ${bins}
10
11# these are all "safe" tests that don't modify
12# system time or require escalated privledges
13run_tests: all
14	./posix_timers
15	./nanosleep
16	./nsleep-lat
17	./set-timer-lat
18	./mqueue-lat
19	./inconsistency-check
20	./raw_skew
21	./threadtest -t 30 -n 8
22
23# these tests require escalated privledges
24# and may modify the system time or trigger
25# other behavior like suspend
26run_destructive_tests: run_tests
27	./alarmtimer-suspend
28	./valid-adjtimex
29	./change_skew
30	./skew_consistency
31
32clean:
33	rm -f ${bins}
34