Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932433AbbEHWKE (ORCPT ); Fri, 8 May 2015 18:10:04 -0400 Received: from casper.infradead.org ([85.118.1.10]:40920 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932228AbbEHWJy (ORCPT ); Fri, 8 May 2015 18:09:54 -0400 From: Darren Hart To: linux-api@vger.kernel.org, Linux Kernel Mailing List Cc: Darren Hart , Shuah Khan , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Davidlohr Bueso , KOSAKI Motohiro Subject: [PATCH 2/5] selftest/futex: Update Makefile to use lib.mk Date: Fri, 8 May 2015 15:09:44 -0700 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: <57d921b1c30e8258ca4b2f55637424527317e92f.1431121818.git.dvhart@linux.intel.com> References: <57d921b1c30e8258ca4b2f55637424527317e92f.1431121818.git.dvhart@linux.intel.com> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2495 Lines: 85 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 --- 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 4098340..fb96927 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/