aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/Makefile
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-03-11 15:06:01 +1100
committerShuah Khan <shuahkh@osg.samsung.com>2015-03-19 12:38:51 -0600
commit6faeeea44b84ce24fc6c1f1beb07ee5de9885dc8 (patch)
treeee9e473870eea00b5672564825bfab7e374fed3b /tools/testing/selftests/powerpc/Makefile
parentselftests/timers: Use shared logic to run and install tests (diff)
downloadlinux-dev-6faeeea44b84ce24fc6c1f1beb07ee5de9885dc8.tar.xz
linux-dev-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/Makefile19
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)