| 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 |
| Frederic Weisbecker | 0bc4b0c | 2013-06-28 00:06:43 +0000 | [diff] [blame] | 5 | |
| John Stultz | de52133 | 2015-03-11 17:40:06 -0700 | [diff] [blame] | 6 | # these are all "safe" tests that don't modify |
| 7 | # system time or require escalated privledges |
| Michael Ellerman | 5744de5 | 2015-03-19 11:20:40 +1100 | [diff] [blame] | 8 | TEST_PROGS = posix_timers nanosleep nsleep-lat set-timer-lat mqueue-lat \ |
| Prarit Bhargava | 4a5fd81 | 2015-03-23 16:32:09 -0400 | [diff] [blame] | 9 | inconsistency-check raw_skew threadtest rtctest |
| Michael Ellerman | 5744de5 | 2015-03-19 11:20:40 +1100 | [diff] [blame] | 10 | |
| John Stultz | 6035519 | 2015-10-05 18:16:57 -0700 | [diff] [blame] | 11 | TEST_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew \ |
| Michael Ellerman | 5744de5 | 2015-03-19 11:20:40 +1100 | [diff] [blame] | 12 | skew_consistency clocksource-switch leap-a-day \ |
| 13 | leapcrash set-tai set-2038 |
| 14 | |
| 15 | bins = $(TEST_PROGS) $(TEST_PROGS_EXTENDED) |
| 16 | |
| 17 | all: ${bins} |
| 18 | |
| 19 | include ../lib.mk |
| John Stultz | de52133 | 2015-03-11 17:40:06 -0700 | [diff] [blame] | 20 | |
| 21 | # these tests require escalated privledges |
| 22 | # and may modify the system time or trigger |
| 23 | # other behavior like suspend |
| John Stultz | b7bb844 | 2015-03-11 17:40:07 -0700 | [diff] [blame] | 24 | run_destructive_tests: run_tests |
| 25 | ./alarmtimer-suspend |
| John Stultz | de52133 | 2015-03-11 17:40:06 -0700 | [diff] [blame] | 26 | ./valid-adjtimex |
| John Stultz | 6035519 | 2015-10-05 18:16:57 -0700 | [diff] [blame] | 27 | ./adjtick |
| John Stultz | d869424 | 2015-03-11 17:40:08 -0700 | [diff] [blame] | 28 | ./change_skew |
| John Stultz | 6e8b285 | 2015-03-11 17:40:09 -0700 | [diff] [blame] | 29 | ./skew_consistency |
| John Stultz | 7290ce1 | 2015-03-11 17:40:10 -0700 | [diff] [blame] | 30 | ./clocksource-switch |
| John Stultz | 5bccfe4 | 2015-03-11 17:40:11 -0700 | [diff] [blame] | 31 | ./leap-a-day -s -i 10 |
| John Stultz | d7b2902 | 2015-03-11 17:40:12 -0700 | [diff] [blame] | 32 | ./leapcrash |
| John Stultz | 3a92a15 | 2015-03-11 17:40:13 -0700 | [diff] [blame] | 33 | ./set-tai |
| John Stultz | 0d02a75 | 2015-03-11 17:40:14 -0700 | [diff] [blame] | 34 | ./set-2038 |
| John Stultz | de52133 | 2015-03-11 17:40:06 -0700 | [diff] [blame] | 35 | |
| Frederic Weisbecker | 0bc4b0c | 2013-06-28 00:06:43 +0000 | [diff] [blame] | 36 | clean: |
| John Stultz | 03438212 | 2015-03-11 17:39:57 -0700 | [diff] [blame] | 37 | rm -f ${bins} |