2015-03-12 08:39:57 +08:00
|
|
|
CC = $(CROSS_COMPILE)gcc
|
|
|
|
BUILD_FLAGS = -DKTEST
|
|
|
|
CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS)
|
|
|
|
LDFLAGS += -lrt -lpthread
|
2015-03-12 08:40:03 +08:00
|
|
|
bins = posix_timers nanosleep inconsistency-check nsleep-lat raw_skew \
|
2015-03-12 08:40:07 +08:00
|
|
|
set-timer-lat threadtest mqueue-lat valid-adjtimex \
|
2015-03-12 08:40:10 +08:00
|
|
|
alarmtimer-suspend change_skew skew_consistency clocksource-switch \
|
2015-03-12 08:40:12 +08:00
|
|
|
leap-a-day leapcrash
|
2015-03-12 08:39:57 +08:00
|
|
|
|
|
|
|
all: ${bins}
|
2013-06-28 08:06:43 +08:00
|
|
|
|
2015-03-12 08:40:06 +08:00
|
|
|
# these are all "safe" tests that don't modify
|
|
|
|
# system time or require escalated privledges
|
2013-06-28 08:06:43 +08:00
|
|
|
run_tests: all
|
|
|
|
./posix_timers
|
2015-03-12 08:39:59 +08:00
|
|
|
./nanosleep
|
2015-03-12 08:40:01 +08:00
|
|
|
./nsleep-lat
|
2015-03-12 08:40:03 +08:00
|
|
|
./set-timer-lat
|
2015-03-12 08:40:05 +08:00
|
|
|
./mqueue-lat
|
2015-03-12 08:40:00 +08:00
|
|
|
./inconsistency-check
|
2015-03-12 08:40:02 +08:00
|
|
|
./raw_skew
|
2015-03-12 08:40:04 +08:00
|
|
|
./threadtest -t 30 -n 8
|
2015-03-12 08:40:06 +08:00
|
|
|
|
|
|
|
# these tests require escalated privledges
|
|
|
|
# and may modify the system time or trigger
|
|
|
|
# other behavior like suspend
|
2015-03-12 08:40:07 +08:00
|
|
|
run_destructive_tests: run_tests
|
|
|
|
./alarmtimer-suspend
|
2015-03-12 08:40:06 +08:00
|
|
|
./valid-adjtimex
|
2015-03-12 08:40:08 +08:00
|
|
|
./change_skew
|
2015-03-12 08:40:09 +08:00
|
|
|
./skew_consistency
|
2015-03-12 08:40:10 +08:00
|
|
|
./clocksource-switch
|
2015-03-12 08:40:11 +08:00
|
|
|
./leap-a-day -s -i 10
|
2015-03-12 08:40:12 +08:00
|
|
|
./leapcrash
|
2015-03-12 08:40:06 +08:00
|
|
|
|
2013-06-28 08:06:43 +08:00
|
|
|
clean:
|
2015-03-12 08:39:57 +08:00
|
|
|
rm -f ${bins}
|