From: Darren Hart Date: Wed, 13 May 2015 04:07:53 +0000 (-0700) Subject: selftests/futex: Update Makefile to use lib.mk X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9705315b7562cfd2928ac2f3423ec122c3241037;p=linux-beck.git selftests/futex: Update Makefile to use lib.mk 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 Cc: linux-api@vger.kernel.org Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Davidlohr Bueso Cc: KOSAKI Motohiro Signed-off-by: Darren Hart Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile index 2c26d59aaaee..6a1752956283 100644 --- a/tools/testing/selftests/futex/Makefile +++ b/tools/testing/selftests/futex/Makefile @@ -1,11 +1,29 @@ SUBDIRS := functional +TEST_PROGS := run.sh + .PHONY: all clean all: for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done -run_tests: all +include ../lib.mk + +override define RUN_TESTS ./run.sh +endef + +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 clean: for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile index 720023e21781..4b018febf9f1 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -12,13 +12,14 @@ TARGETS := \ futex_wait_uninitialized_heap \ futex_wait_private_mapped_file +TEST_PROGS := $(TARGETS) run.sh + .PHONY: all clean all: $(TARGETS) $(TARGETS): $(HEADERS) -run_tests: all - ./run.sh +include ../../lib.mk clean: rm -f $(TARGETS)