Thread (17 messages) flat view 17 messages, 5 authors, 2015-05-06

Re: [PATCH 2/5] selftest/futex: Update Makefile to use lib.mk

From: Michael Ellerman <hidden>
Date: 2015-03-29 23:49:42
Also in: lkml

On Fri, 2015-03-27 at 15:17 -0700, Darren Hart wrote:
quoted hunk ↗ jump to hunk
Adapt the futextest Makefiles to use lib.mk macros for RUN_TESTS and
EMIT_TESTS. For now, we reuse the run.sh mechanism provided by
futextest. This doesn't provide the standard selftests: [PASS|FAIL]
format, but the tests provide very similar output already.

This results in the run_kselftest.sh script for futexes including a
single line: ./run.sh

Cc: Shuah Khan <redacted>
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Ingo Molnar <redacted>
Cc: Peter Zijlstra <redacted>
Cc: Thomas Gleixner <redacted>
Cc: Davidlohr Bueso <redacted>
Cc: KOSAKI Motohiro <redacted>
Signed-off-by: Darren Hart <dvhart-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 tools/testing/selftests/futex/Makefile            | 21 +++++++++++++++++++++
 tools/testing/selftests/futex/functional/Makefile |  4 ++++
 2 files changed, 25 insertions(+)
diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index 8629187..6a17529 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -1,8 +1,29 @@
 SUBDIRS := functional
 
+TEST_PROGS := run.sh
+
 .PHONY: all clean
lib.mk defines all & clean as PHONY for you.
 all:
 	for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done
 
+include ../lib.mk
+
+override define RUN_TESTS
+	./run.sh
+endef
Do you need to do this override? The standard logic should work AFAICS, or do
you not want the echo logic?
+override define INSTALL_RULE
+	mkdir -p $(INSTALL_PATH)
+	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
+
+	@for SUBDIR in $(SUBDIRS); do \
+		$(MAKE) -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
+	done;
+endef
+
+override define EMIT_TESTS
+	echo "./run.sh"
+endef
Ditto.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help