Andrew Morton | 66a01b9 | 2013-02-27 17:05:56 -0800 | [diff] [blame] | 1 | TARGETS = breakpoints |
Andrew Morton | 66a01b9 | 2013-02-27 17:05:56 -0800 | [diff] [blame] | 2 | TARGETS += cpu-hotplug |
Andrew Morton | 66a01b9 | 2013-02-27 17:05:56 -0800 | [diff] [blame] | 3 | TARGETS += efivarfs |
Andrew Morton | 96e869d | 2014-12-18 16:17:43 -0800 | [diff] [blame] | 4 | TARGETS += exec |
| 5 | TARGETS += firmware |
| 6 | TARGETS += ftrace |
Pavel Emelyanov | 58c7be8 | 2013-04-30 15:27:06 -0700 | [diff] [blame] | 7 | TARGETS += kcmp |
David Herrmann | 4f5ce5e | 2014-08-08 14:25:32 -0700 | [diff] [blame] | 8 | TARGETS += memfd |
Pavel Emelyanov | 58c7be8 | 2013-04-30 15:27:06 -0700 | [diff] [blame] | 9 | TARGETS += memory-hotplug |
Eric W. Biederman | db181ce | 2014-07-29 15:50:44 -0700 | [diff] [blame] | 10 | TARGETS += mount |
Andrew Morton | 96e869d | 2014-12-18 16:17:43 -0800 | [diff] [blame] | 11 | TARGETS += mqueue |
David S. Miller | a6f6803 | 2013-03-20 15:07:56 -0400 | [diff] [blame] | 12 | TARGETS += net |
Michael Ellerman | 0e56dac | 2013-08-06 17:42:35 +1000 | [diff] [blame] | 13 | TARGETS += powerpc |
Andrew Morton | 96e869d | 2014-12-18 16:17:43 -0800 | [diff] [blame] | 14 | TARGETS += ptrace |
Tim Bird | 3ce5105 | 2014-12-03 10:42:21 -0800 | [diff] [blame] | 15 | TARGETS += size |
Andrew Morton | 96e869d | 2014-12-18 16:17:43 -0800 | [diff] [blame] | 16 | TARGETS += sysctl |
| 17 | TARGETS += timers |
| 18 | TARGETS += user |
| 19 | TARGETS += vm |
| 20 | #Please keep the TARGETS list alphabetically sorted |
Frederic Weisbecker | 274343a | 2012-01-12 17:20:44 -0800 | [diff] [blame] | 21 | |
Shuah Khan | ddddda9 | 2014-07-02 09:51:38 -0600 | [diff] [blame] | 22 | TARGETS_HOTPLUG = cpu-hotplug |
| 23 | TARGETS_HOTPLUG += memory-hotplug |
| 24 | |
Frederic Weisbecker | 274343a | 2012-01-12 17:20:44 -0800 | [diff] [blame] | 25 | all: |
| 26 | for TARGET in $(TARGETS); do \ |
| 27 | make -C $$TARGET; \ |
| 28 | done; |
| 29 | |
Andrew Morton | cab6b05 | 2012-03-28 14:42:54 -0700 | [diff] [blame] | 30 | run_tests: all |
Frederic Weisbecker | f467f71 | 2012-03-28 14:42:54 -0700 | [diff] [blame] | 31 | for TARGET in $(TARGETS); do \ |
| 32 | make -C $$TARGET run_tests; \ |
| 33 | done; |
| 34 | |
Shuah Khan | ddddda9 | 2014-07-02 09:51:38 -0600 | [diff] [blame] | 35 | hotplug: |
| 36 | for TARGET in $(TARGETS_HOTPLUG); do \ |
| 37 | make -C $$TARGET; \ |
| 38 | done; |
| 39 | |
| 40 | run_hotplug: hotplug |
| 41 | for TARGET in $(TARGETS_HOTPLUG); do \ |
| 42 | make -C $$TARGET run_full_test; \ |
| 43 | done; |
| 44 | |
| 45 | clean_hotplug: |
| 46 | for TARGET in $(TARGETS_HOTPLUG); do \ |
| 47 | make -C $$TARGET clean; \ |
| 48 | done; |
| 49 | |
Michael Ellerman | 32dcfba | 2015-03-11 15:06:00 +1100 | [diff] [blame^] | 50 | INSTALL_PATH ?= install |
| 51 | INSTALL_PATH := $(abspath $(INSTALL_PATH)) |
| 52 | ALL_SCRIPT := $(INSTALL_PATH)/run_kselftest.sh |
| 53 | |
| 54 | install: |
| 55 | ifdef INSTALL_PATH |
| 56 | @# Ask all targets to install their files |
| 57 | mkdir -p $(INSTALL_PATH) |
| 58 | for TARGET in $(TARGETS); do \ |
| 59 | mkdir -p $(INSTALL_PATH)/$$TARGET ; \ |
| 60 | make -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \ |
| 61 | done; |
| 62 | |
| 63 | @# Ask all targets to emit their test scripts |
| 64 | echo "#!/bin/bash" > $(ALL_SCRIPT) |
| 65 | echo "cd \$$(dirname \$$0)" >> $(ALL_SCRIPT) |
| 66 | echo "ROOT=\$$PWD" >> $(ALL_SCRIPT) |
| 67 | |
| 68 | for TARGET in $(TARGETS); do \ |
| 69 | echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \ |
| 70 | echo "echo ========================================" >> $(ALL_SCRIPT); \ |
| 71 | echo "cd $$TARGET" >> $(ALL_SCRIPT); \ |
| 72 | make -s --no-print-directory -C $$TARGET emit_tests >> $(ALL_SCRIPT); \ |
| 73 | echo "cd \$$ROOT" >> $(ALL_SCRIPT); \ |
| 74 | done; |
| 75 | |
| 76 | chmod u+x $(ALL_SCRIPT) |
| 77 | else |
| 78 | $(error Error: set INSTALL_PATH to use install) |
| 79 | endif |
| 80 | |
Frederic Weisbecker | 274343a | 2012-01-12 17:20:44 -0800 | [diff] [blame] | 81 | clean: |
| 82 | for TARGET in $(TARGETS); do \ |
| 83 | make -C $$TARGET clean; \ |
| 84 | done; |
Michael Ellerman | 32dcfba | 2015-03-11 15:06:00 +1100 | [diff] [blame^] | 85 | |
| 86 | .PHONY: install |