From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752620AbbC2Xtm (ORCPT ); Sun, 29 Mar 2015 19:49:42 -0400 Received: from ozlabs.org ([103.22.144.67]:56845 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752311AbbC2Xtk (ORCPT ); Sun, 29 Mar 2015 19:49:40 -0400 Message-ID: <1427672978.4218.3.camel@ellerman.id.au> Subject: Re: [PATCH 2/5] selftest/futex: Update Makefile to use lib.mk From: Michael Ellerman To: Darren Hart Cc: Linux Kernel Mailing List , Shuah Khan , linux-api@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Davidlohr Bueso , KOSAKI Motohiro Date: Mon, 30 Mar 2015 10:49:38 +1100 In-Reply-To: <95d599bc531666252f8e3f4e467d5f94af2a7ad2.1427493640.git.dvhart@linux.intel.com> References: <597c9eabcac5da9456d6cfd6de9117591d73385e.1427493640.git.dvhart@linux.intel.com> <95d599bc531666252f8e3f4e467d5f94af2a7ad2.1427493640.git.dvhart@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2015-03-27 at 15:17 -0700, Darren Hart wrote: > 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 | 21 +++++++++++++++++++++ > tools/testing/selftests/futex/functional/Makefile | 4 ++++ > 2 files changed, 25 insertions(+) > > diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile > index 8629187..6a17529 100644 > --- a/tools/testing/selftests/futex/Makefile > +++ b/tools/testing/selftests/futex/Makefile > @@ -1,8 +1,29 @@ > SUBDIRS := functional > > +TEST_PROGS := run.sh > + > .PHONY: all clean lib.mk defines all & clean as PHONY for you. > all: > for DIR in $(SUBDIRS); do $(MAKE) -C $$DIR $@ ; done > > +include ../lib.mk > + > +override define RUN_TESTS > + ./run.sh > +endef Do you need to do this override? The standard logic should work AFAICS, or do you not want the echo logic? > +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 Ditto. cheers