Commit 9705315b authored by Darren Hart's avatar Darren Hart Committed by Shuah Khan

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@osg.samsung.com>
Cc: linux-api@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 2aa8470f
SUBDIRS := functional SUBDIRS := functional
TEST_PROGS := run.sh
.PHONY: all clean .PHONY: all clean
all: all:
for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done
run_tests: all include ../lib.mk
override define RUN_TESTS
./run.sh ./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: clean:
for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done
...@@ -12,13 +12,14 @@ TARGETS := \ ...@@ -12,13 +12,14 @@ TARGETS := \
futex_wait_uninitialized_heap \ futex_wait_uninitialized_heap \
futex_wait_private_mapped_file futex_wait_private_mapped_file
TEST_PROGS := $(TARGETS) run.sh
.PHONY: all clean .PHONY: all clean
all: $(TARGETS) all: $(TARGETS)
$(TARGETS): $(HEADERS) $(TARGETS): $(HEADERS)
run_tests: all include ../../lib.mk
./run.sh
clean: clean:
rm -f $(TARGETS) rm -f $(TARGETS)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment