diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2015-03-11 05:06:01 +0100 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2015-03-19 19:38:51 +0100 |
commit | 6faeeea44b84ce24fc6c1f1beb07ee5de9885dc8 (patch) | |
tree | ee9e473870eea00b5672564825bfab7e374fed3b /tools/testing/selftests/powerpc/Makefile | |
parent | selftests/timers: Use shared logic to run and install tests (diff) | |
download | linux-6faeeea44b84ce24fc6c1f1beb07ee5de9885dc8.tar.xz linux-6faeeea44b84ce24fc6c1f1beb07ee5de9885dc8.zip |
selftests: Add install support for the powerpc tests
The bulk of the selftests are actually below the powerpc sub directory.
This adds support for installing them, when on a powerpc machine, or if
ARCH and CROSS_COMPILE are set appropriately.
This is a little more complicated because of the sub directory structure
under powerpc, but much of the common logic in lib.mk is still used. The
net effect of the patch is still a reduction in code.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/powerpc/Makefile')
-rw-r--r-- | tools/testing/selftests/powerpc/Makefile | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index 1d5e7ad2c460..22c4f8ffa422 100644 --- a/tools/testing/selftests/powerpc/Makefile +++ b/tools/testing/selftests/powerpc/Makefile @@ -22,10 +22,25 @@ all: $(TARGETS) $(TARGETS): $(MAKE) -k -C $@ all -run_tests: all +include ../lib.mk + +override define RUN_TESTS @for TARGET in $(TARGETS); do \ $(MAKE) -C $$TARGET run_tests; \ done; +endef + +override define INSTALL_RULE + @for TARGET in $(TARGETS); do \ + $(MAKE) -C $$TARGET install; \ + done; +endef + +override define EMIT_TESTS + @for TARGET in $(TARGETS); do \ + $(MAKE) -s -C $$TARGET emit_tests; \ + done; +endef clean: @for TARGET in $(TARGETS); do \ @@ -36,4 +51,4 @@ clean: tags: find . -name '*.c' -o -name '*.h' | xargs ctags -.PHONY: all run_tests clean tags $(TARGETS) +.PHONY: tags $(TARGETS) |