Skip to content

Commit

Permalink
selftests/futex: Update Makefile to use lib.mk
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Signed-off-by: Darren Hart <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
  • Loading branch information
dvhart authored and Shuah Khan committed May 26, 2015
1 parent 2aa8470 commit 9705315
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
20 changes: 19 additions & 1 deletion tools/testing/selftests/futex/Makefile
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions tools/testing/selftests/futex/functional/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 9705315

Please sign in to comment.