John Stultz | 03438212 | 2015-03-11 17:39:57 -0700 | [diff] [blame] | 1 | CC = $(CROSS_COMPILE)gcc |
| 2 | BUILD_FLAGS = -DKTEST |
| 3 | CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS) |
| 4 | LDFLAGS += -lrt -lpthread |
John Stultz | 4e40d0a | 2015-03-11 17:40:03 -0700 | [diff] [blame] | 5 | bins = posix_timers nanosleep inconsistency-check nsleep-lat raw_skew \ |
John Stultz | b7bb844 | 2015-03-11 17:40:07 -0700 | [diff] [blame^] | 6 | set-timer-lat threadtest mqueue-lat valid-adjtimex \ |
| 7 | alarmtimer-suspend |
John Stultz | 03438212 | 2015-03-11 17:39:57 -0700 | [diff] [blame] | 8 | |
| 9 | all: ${bins} |
Frederic Weisbecker | 0bc4b0c | 2013-06-28 00:06:43 +0000 | [diff] [blame] | 10 | |
John Stultz | de52133 | 2015-03-11 17:40:06 -0700 | [diff] [blame] | 11 | # these are all "safe" tests that don't modify |
| 12 | # system time or require escalated privledges |
Frederic Weisbecker | 0bc4b0c | 2013-06-28 00:06:43 +0000 | [diff] [blame] | 13 | run_tests: all |
| 14 | ./posix_timers |
John Stultz | 689f32f | 2015-03-11 17:39:59 -0700 | [diff] [blame] | 15 | ./nanosleep |
John Stultz | c5fffcb | 2015-03-11 17:40:01 -0700 | [diff] [blame] | 16 | ./nsleep-lat |
John Stultz | 4e40d0a | 2015-03-11 17:40:03 -0700 | [diff] [blame] | 17 | ./set-timer-lat |
John Stultz | 274d631 | 2015-03-11 17:40:05 -0700 | [diff] [blame] | 18 | ./mqueue-lat |
John Stultz | ed3fe34 | 2015-03-11 17:40:00 -0700 | [diff] [blame] | 19 | ./inconsistency-check |
John Stultz | 51f91cb | 2015-03-11 17:40:02 -0700 | [diff] [blame] | 20 | ./raw_skew |
John Stultz | e39b60f | 2015-03-11 17:40:04 -0700 | [diff] [blame] | 21 | ./threadtest -t 30 -n 8 |
John Stultz | de52133 | 2015-03-11 17:40:06 -0700 | [diff] [blame] | 22 | |
| 23 | # these tests require escalated privledges |
| 24 | # and may modify the system time or trigger |
| 25 | # other behavior like suspend |
John Stultz | b7bb844 | 2015-03-11 17:40:07 -0700 | [diff] [blame^] | 26 | run_destructive_tests: run_tests |
| 27 | ./alarmtimer-suspend |
John Stultz | de52133 | 2015-03-11 17:40:06 -0700 | [diff] [blame] | 28 | ./valid-adjtimex |
| 29 | |
Frederic Weisbecker | 0bc4b0c | 2013-06-28 00:06:43 +0000 | [diff] [blame] | 30 | clean: |
John Stultz | 03438212 | 2015-03-11 17:39:57 -0700 | [diff] [blame] | 31 | rm -f ${bins} |