[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1ef53157f7fd8fbae3b3c549c517cc3ae29d2bf0.1431489408.git.dvhart@linux.intel.com>
Date: Tue, 12 May 2015 21:07:53 -0700
From: Darren Hart <dvhart@...ux.intel.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: chrubis@...e.cz, Darren Hart <dvhart@...ux.intel.com>,
Shuah Khan <shuahkh@....samsung.com>,
linux-api@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Davidlohr Bueso <dave@...olabs.net>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: [PATCH 2/6] 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 <shuahkh@....samsung.com>
Cc: linux-api@...r.kernel.org
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Davidlohr Bueso <dave@...olabs.net>
Cc: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Signed-off-by: Darren Hart <dvhart@...ux.intel.com>
---
tools/testing/selftests/futex/Makefile | 20 +++++++++++++++++++-
tools/testing/selftests/futex/functional/Makefile | 5 +++--
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index 2c26d59..6a17529 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 720023e..4b018fe 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)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists