alistair23-linux/tools/testing/selftests/futex/Makefile
Shuah Khan 78972f51cc selftests: futex Makefile add top level TAP header echo to RUN_TESTS
Add top level TAP header echo, testname and separator line to make
the output consistent with the common run_tests target.

This change prevents nested TAP13 headers output from individual tests.
Nested TAP13 headers could cause problems for some parsers.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reviewed-by: Darren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2018-03-07 08:33:35 -07:00

50 lines
1.1 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
SUBDIRS := functional
TEST_PROGS := run.sh
.PHONY: all clean
include ../lib.mk
all:
@for DIR in $(SUBDIRS); do \
BUILD_TARGET=$(OUTPUT)/$$DIR; \
mkdir $$BUILD_TARGET -p; \
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
if [ -e $$DIR/$(TEST_PROGS) ]; then \
rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/; \
fi \
done
override define RUN_TESTS
@export KSFT_TAP_LEVEL=`echo 1`;
@echo "TAP version 13";
@echo "selftests: futex";
@echo "========================================";
@cd $(OUTPUT); ./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 \
BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \
mkdir $$BUILD_TARGET -p; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
done;
endef
override define EMIT_TESTS
echo "./run.sh"
endef
override define CLEAN
@for DIR in $(SUBDIRS); do \
BUILD_TARGET=$(OUTPUT)/$$DIR; \
mkdir $$BUILD_TARGET -p; \
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
done
endef