blob: 61a39ec61393506bb123dc3a97c82a04d9b45885 [file] [log] [blame]
John Stultz034382122015-03-11 17:39:57 -07001CC = $(CROSS_COMPILE)gcc
2BUILD_FLAGS = -DKTEST
3CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS)
4LDFLAGS += -lrt -lpthread
John Stultz4e40d0a2015-03-11 17:40:03 -07005bins = posix_timers nanosleep inconsistency-check nsleep-lat raw_skew \
John Stultzb7bb8442015-03-11 17:40:07 -07006 set-timer-lat threadtest mqueue-lat valid-adjtimex \
7 alarmtimer-suspend
John Stultz034382122015-03-11 17:39:57 -07008
9all: ${bins}
Frederic Weisbecker0bc4b0c2013-06-28 00:06:43 +000010
John Stultzde521332015-03-11 17:40:06 -070011# these are all "safe" tests that don't modify
12# system time or require escalated privledges
Frederic Weisbecker0bc4b0c2013-06-28 00:06:43 +000013run_tests: all
14 ./posix_timers
John Stultz689f32f2015-03-11 17:39:59 -070015 ./nanosleep
John Stultzc5fffcb2015-03-11 17:40:01 -070016 ./nsleep-lat
John Stultz4e40d0a2015-03-11 17:40:03 -070017 ./set-timer-lat
John Stultz274d6312015-03-11 17:40:05 -070018 ./mqueue-lat
John Stultzed3fe342015-03-11 17:40:00 -070019 ./inconsistency-check
John Stultz51f91cb2015-03-11 17:40:02 -070020 ./raw_skew
John Stultze39b60f2015-03-11 17:40:04 -070021 ./threadtest -t 30 -n 8
John Stultzde521332015-03-11 17:40:06 -070022
23# these tests require escalated privledges
24# and may modify the system time or trigger
25# other behavior like suspend
John Stultzb7bb8442015-03-11 17:40:07 -070026run_destructive_tests: run_tests
27 ./alarmtimer-suspend
John Stultzde521332015-03-11 17:40:06 -070028 ./valid-adjtimex
29
Frederic Weisbecker0bc4b0c2013-06-28 00:06:43 +000030clean:
John Stultz034382122015-03-11 17:39:57 -070031 rm -f ${bins}