From patchwork Wed Dec 24 16:27:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 5539741 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 AAA20BEEA8 for ; Wed, 24 Dec 2014 16:33:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9CDF201C7 for ; Wed, 24 Dec 2014 16:33:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01D2D201CD for ; Wed, 24 Dec 2014 16:33:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579AbaLXQdS (ORCPT ); Wed, 24 Dec 2014 11:33:18 -0500 Received: from resqmta-po-07v.sys.comcast.net ([96.114.154.166]:48199 "EHLO resqmta-po-07v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752560AbaLXQdM (ORCPT ); Wed, 24 Dec 2014 11:33:12 -0500 Received: from resomta-po-11v.sys.comcast.net ([96.114.154.235]) by resqmta-po-07v.sys.comcast.net with comcast id XUTV1p00354zqzk01UU9GD; Wed, 24 Dec 2014 16:28:09 +0000 Received: from mail.gonehiking.org ([50.134.149.16]) by resomta-po-11v.sys.comcast.net with comcast id XUU81p00M0MU7Qa01UU8Cc; Wed, 24 Dec 2014 16:28:09 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 36AA340A27; Wed, 24 Dec 2014 09:28:08 -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 11/20] selftests/mqueue: add install target to enable test install Date: Wed, 24 Dec 2014 09:27:47 -0700 Message-Id: <1e4aa40c42e886d36ae1bfcb93e4b8d696fa6c39.1419387513.git.shuahkh@osg.samsung.com> 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=1419438489; bh=2OFQXzgt8OSY/k7hYuosCQyg9nl+LJonjvZXTY8dgdc=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=L5wz2QBucSUztwbdzEaylt1CAgTMrLZ11pVunXIS1DOJ1CyLNB7js+MGt27N1VNJI t0comdb2Mwq7wyeQDr4mUSccpt69/67IEnJWluikEUvly2mfEbps8L8amfGWMiH/94 S0Y56iXjlTJVdsmCj2XltLgSHiB0DVm6CqSDiJxRjVn7SOtF9j6KgPNWMoIr1aTo5+ 48e0BKnHvK1rY5RjqP57zs3oClMWBSqdhtuZm+iK8ayD8QwOPs7gQm5R9ry6UF5Wkd qKTfk8vHt+NY4QrdGhRvM6m2UGhZa7v6a1TwNlYZy6RrfkC3J+RGjl/QVtdc8r9GWJ oQg5oa5RCub+A== 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=ham 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/mqueue/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile index 8056e2e..27757b9 100644 --- a/tools/testing/selftests/mqueue/Makefile +++ b/tools/testing/selftests/mqueue/Makefile @@ -1,10 +1,22 @@ +MQ_OPEN_TEST_STR = ./mq_open_tests /test1 || echo mq_open_tests: [FAIL] +MQ_PERF_TEST_STR = ./mq_perf_tests || echo mq_perf_tests: [FAIL] + all: gcc -O2 mq_open_tests.c -o mq_open_tests -lrt gcc -O2 -o mq_perf_tests mq_perf_tests.c -lrt -lpthread -lpopt -run_tests: - @./mq_open_tests /test1 || echo "mq_open_tests: [FAIL]" - @./mq_perf_tests || echo "mq_perf_tests: [FAIL]" +install: +ifdef INSTALL_KSFT_PATH + install ./mq_open_tests ./mq_perf_tests $(INSTALL_KSFT_PATH) + @echo "$(MQ_OPEN_TEST_STR)" >> $(KSELFTEST) + @echo "$(MQ_PERF_TEST_STR)" >> $(KSELFTEST) +else + @echo Run make kselftest_install in top level source directory +endif + +run_tests: all + @$(MQ_OPEN_TEST_STR) + @$(MQ_PERF_TEST_STR) clean: rm -f mq_open_tests mq_perf_tests