From patchwork Tue Nov 4 17:10:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 5229961 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1FA1FC11AC for ; Tue, 4 Nov 2014 17:20:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5290B20172 for ; Tue, 4 Nov 2014 17:20:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7270B2011E for ; Tue, 4 Nov 2014 17:20:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752045AbaKDRSb (ORCPT ); Tue, 4 Nov 2014 12:18:31 -0500 Received: from mailout.easymail.ca ([64.68.201.169]:50551 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752164AbaKDRSV (ORCPT ); Tue, 4 Nov 2014 12:18:21 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 2ED55E17D; Tue, 4 Nov 2014 12:11:29 -0500 (EST) X-Quarantine-ID: X-Virus-Scanned: Debian amavisd-new at mailout.easymail.ca X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Score: -4.399 X-Spam-Level: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (easymail-mailout.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZU4zpBbs4tHZ; Tue, 4 Nov 2014 12:11:28 -0500 (EST) Received: from mail.gonehiking.org (c-50-134-149-16.hsd1.co.comcast.net [50.134.149.16]) by mailout.easymail.ca (Postfix) with ESMTPA id 07997E16E; Tue, 4 Nov 2014 12:11:28 -0500 (EST) Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 9611B3FE4A; Tue, 4 Nov 2014 10:11:27 -0700 (MST) From: Shuah Khan To: gregkh@linuxfoundation.org, akpm@linux-foundation.org, mmarek@suse.cz, davem@davemloft.net, keescook@chromium.org, tranmanphong@gmail.com, dh.herrmann@gmail.com, hughd@google.com, bobby.prani@gmail.com, ebiederm@xmission.com, serge.hallyn@ubuntu.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 03/20] kbuild: kselftest_install - add a new make target to install selftests Date: Tue, 4 Nov 2014 10:10:59 -0700 Message-Id: <66ccc558465313d98f3742c7b428efa0efdfbc3f.1415117102.git.shuahkh@osg.samsung.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 install to install kernel selftests. This new target will build and install selftests. Approach: make kselftest_target: -- exports kselftest INSTALL_KSFT_PATH default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE) -- exports path for ksefltest.sh -- runs selftests make install target: selftests make install target -- creates kselftest.sh script in install install dir -- runs install targets for all INSTALL_TARGETS Individual test make install targets: -- install test programs and/or scripts in install dir -- append to the ksefltest.sh file to add commands to run test Signed-off-by: Shuah Khan --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 05d67af..291aff7 100644 --- a/Makefile +++ b/Makefile @@ -1078,6 +1078,20 @@ kselftest: $(Q)$(MAKE) -C tools/testing/selftests run_tests # --------------------------------------------------------------------------- +# Kernel selftest install +INSTALL_KSFT_PATH=$(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE) +export INSTALL_KSFT_PATH +KSELFTEST=$(INSTALL_KSFT_PATH)/kselftest.sh +export KSELFTEST + +PHONY += kselftest_install +kselftest_install: + @rm -rf $(INSTALL_KSFT_PATH) + @mkdir -p $(INSTALL_KSFT_PATH) + $(Q)$(MAKE) -C tools/testing/selftests install + chmod +x $(KSELFTEST) + +# --------------------------------------------------------------------------- # Modules ifdef CONFIG_MODULES @@ -1285,6 +1299,9 @@ help: @echo ' Build, install, and boot kernel before' @echo ' running kselftest on it' @echo '' + @echo ' kselftest_install - Install Kselftests to INSTALL_KSFT_PATH' + @echo ' default: $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)' + @echo '' @echo 'Kernel packaging:' @$(MAKE) $(build)=$(package-dir) help @echo ''