X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=tools%2Ftesting%2Fselftests%2Ftimers%2FMakefile;h=4a006d7ba21799ac1d27a634293001d5efc31346;hb=7290ce1423c38108027ae90116ece6618db32bc3;hp=eb2859f4ad2113576831e5f8ee420cf514f5194d;hpb=4824b69a928b6609cfb1cf232ef32d4a8125a371;p=cascardo%2Flinux.git diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile index eb2859f4ad21..4a006d7ba217 100644 --- a/tools/testing/selftests/timers/Makefile +++ b/tools/testing/selftests/timers/Makefile @@ -1,8 +1,34 @@ -all: - gcc posix_timers.c -o posix_timers -lrt +CC = $(CROSS_COMPILE)gcc +BUILD_FLAGS = -DKTEST +CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS) +LDFLAGS += -lrt -lpthread +bins = posix_timers nanosleep inconsistency-check nsleep-lat raw_skew \ + set-timer-lat threadtest mqueue-lat valid-adjtimex \ + alarmtimer-suspend change_skew skew_consistency clocksource-switch \ +all: ${bins} + +# these are all "safe" tests that don't modify +# system time or require escalated privledges run_tests: all ./posix_timers + ./nanosleep + ./nsleep-lat + ./set-timer-lat + ./mqueue-lat + ./inconsistency-check + ./raw_skew + ./threadtest -t 30 -n 8 + +# these tests require escalated privledges +# and may modify the system time or trigger +# other behavior like suspend +run_destructive_tests: run_tests + ./alarmtimer-suspend + ./valid-adjtimex + ./change_skew + ./skew_consistency + ./clocksource-switch clean: - rm -f ./posix_timers + rm -f ${bins}