From patchwork Wed Dec 24 16:27:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 5539921 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4EBDE9F326 for ; Wed, 24 Dec 2014 16:36:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82388201CD for ; Wed, 24 Dec 2014 16:36:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F284201DD for ; Wed, 24 Dec 2014 16:36:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752673AbaLXQgZ (ORCPT ); Wed, 24 Dec 2014 11:36:25 -0500 Received: from resqmta-po-12v.sys.comcast.net ([96.114.154.171]:47463 "EHLO resqmta-po-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752199AbaLXQgW (ORCPT ); Wed, 24 Dec 2014 11:36:22 -0500 Received: from resomta-po-06v.sys.comcast.net ([96.114.154.230]) by resqmta-po-12v.sys.comcast.net with comcast id XUSc1p0024yXVJQ01UU4V4; Wed, 24 Dec 2014 16:28:04 +0000 Received: from mail.gonehiking.org ([50.134.149.16]) by resomta-po-06v.sys.comcast.net with comcast id XUU31p00D0MU7Qa01UU32W; Wed, 24 Dec 2014 16:28:04 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 11D523FED4; Wed, 24 Dec 2014 09:28:03 -0700 (MST) From: Shuah Khan To: mmarek@suse.cz, gregkh@linuxfoundation.org, akpm@linux-foundation.org, rostedt@goodmis.org, mingo@redhat.com, davem@davemloft.net, keescook@chromium.org, tranmanphong@gmail.com, mpe@ellerman.id.au, cov@codeaurora.org, dh.herrmann@gmail.com, hughd@google.com, bobby.prani@gmail.com, serge.hallyn@ubuntu.com, ebiederm@xmission.com, tim.bird@sonymobile.com, josh@joshtriplett.org, koct9i@gmail.com Cc: Shuah Khan , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v3 04/20] selftests/firmware: add install target to enable test install Date: Wed, 24 Dec 2014 09:27:40 -0700 Message-Id: X-Mailer: git-send-email 2.1.0 In-Reply-To: References: In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1419438484; bh=rBwwmvrxWzmUP8cIpmHUulUbWlv/IBUFT+RmxgxJGa8=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=eX7Tpj/0MHjBo8SPNGxuNQctn/6IvuuV2Z5T9dztmGnk8tLo8PyGUSfuYaiqDNbV9 NNQMPz5HJ0SbHur+bWWgWfGEHQ32W4AlF3xgfQNr3xhbTe1YRse9w9r78oqnRcTHfP PjkTrT7wFdVm8XLozSrKwjHulk5D3+nk88uHBoMkVnLHFf06Jr0TaovdCViaxYP2Y0 2deI890ZAEtIKowUKhd8SKKffBTt9pc45yMADTpWreE5e7TmK8h2fxbXyTlOBX7L/t tqSnulP0G0fCr2KRzDcsRWgKZQVW3FDMA6DkQFauolog6hP5hDLBTP8AtCZcT/zIjU 4LKFHedg4sCYA== Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a new make target to enable installing test. This target installs test in the kselftest install location and add to the kselftest script to run the test. Install target can be run only from top level kernel source directory. Signed-off-by: Shuah Khan --- tools/testing/selftests/firmware/Makefile | 43 +++++++++++++++++++------------ 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/tools/testing/selftests/firmware/Makefile b/tools/testing/selftests/firmware/Makefile index e23cce0..7ac1cf3 100644 --- a/tools/testing/selftests/firmware/Makefile +++ b/tools/testing/selftests/firmware/Makefile @@ -1,25 +1,34 @@ # Makefile for firmware loading selftests # No binaries, but make sure arg-less "make" doesn't trigger "run_tests" + +__fw_filesystem: +fw_filesystem = if /bin/sh ./fw_filesystem.sh ; then +fw_filesystem += echo fw_filesystem: ok; +fw_filesystem += else echo fw_filesystem: [FAIL]; +fw_filesystem += fi + +__fw_userhelper: +fw_userhelper = if /bin/sh ./fw_userhelper.sh ; then +fw_userhelper += echo fw_userhelper: ok; +fw_userhelper += else +fw_userhelper += echo fw_userhelper: [FAIL]; +fw_userhelper += fi + all: -fw_filesystem: - @if /bin/sh ./fw_filesystem.sh ; then \ - echo "fw_filesystem: ok"; \ - else \ - echo "fw_filesystem: [FAIL]"; \ - exit 1; \ - fi - -fw_userhelper: - @if /bin/sh ./fw_userhelper.sh ; then \ - echo "fw_userhelper: ok"; \ - else \ - echo "fw_userhelper: [FAIL]"; \ - exit 1; \ - fi - -run_tests: all fw_filesystem fw_userhelper +install: +ifdef INSTALL_KSFT_PATH + install ./fw_filesystem.sh ./fw_userhelper.sh $(INSTALL_KSFT_PATH) + @echo "$(fw_filesystem)" >> $(KSELFTEST) + @echo "$(fw_userhelper)" >> $(KSELFTEST) +else + @echo Run make kselftest_install in top level source directory +endif + +run_tests: + @$(fw_filesystem) + @$(fw_userhelper) # Nothing to clean up. clean: