1CFLAGS += -O3 -Wl,-no-as-needed -Wall 2LDFLAGS += -lrt -lpthread -lm 3 4# these are all "safe" tests that don't modify 5# system time or require escalated privileges 6TEST_GEN_PROGS = posix_timers nanosleep nsleep-lat set-timer-lat mqueue-lat \ 7 inconsistency-check raw_skew threadtest rtctest 8 9TEST_GEN_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew \ 10 skew_consistency clocksource-switch freq-step leap-a-day \ 11 leapcrash set-tai set-2038 set-tz rtctest_setdate 12 13 14include ../lib.mk 15 16define RUN_DESTRUCTIVE_TESTS 17 @for TEST in $(TEST_GEN_PROGS_EXTENDED); do \ 18 BASENAME_TEST=`basename $$TEST`; \ 19 if [ ! -x $$BASENAME_TEST ]; then \ 20 echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\ 21 echo "selftests: $$BASENAME_TEST [FAIL]"; \ 22 else \ 23 cd `dirname $$TEST`; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests: $$BASENAME_TEST [FAIL]"; cd -;\ 24 fi; \ 25 done; 26endef 27 28# these tests require escalated privileges 29# and may modify the system time or trigger 30# other behavior like suspend 31run_destructive_tests: run_tests 32 $(RUN_DESTRUCTIVE_TESTS) 33