From patchwork Tue Jan 6 19:43:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 5576521 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 559A7BF6C3 for ; Tue, 6 Jan 2015 19:49:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88AA120221 for ; Tue, 6 Jan 2015 19:49:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0287200E9 for ; Tue, 6 Jan 2015 19:49:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932966AbbAFTtb (ORCPT ); Tue, 6 Jan 2015 14:49:31 -0500 Received: from resqmta-ch2-09v.sys.comcast.net ([69.252.207.41]:46239 "EHLO resqmta-ch2-09v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbbAFTs4 (ORCPT ); Tue, 6 Jan 2015 14:48:56 -0500 Received: from resomta-ch2-03v.sys.comcast.net ([69.252.207.99]) by resqmta-ch2-09v.sys.comcast.net with comcast id cjio1p00829Cfhx01jjvaX; Tue, 06 Jan 2015 19:43:55 +0000 Received: from mail.gonehiking.org ([50.134.149.16]) by resomta-ch2-03v.sys.comcast.net with comcast id cjjt1p00e0MU7Qa01jjuQh; Tue, 06 Jan 2015 19:43:55 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 6FF724179F; Tue, 6 Jan 2015 12:43:53 -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, masami.hiramatsu.pt@hitachi.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 v4 11/20] selftests/mqueue: add install target to enable test install Date: Tue, 6 Jan 2015 12:43:25 -0700 Message-Id: <9d5b3b0d9331dc373942f62633c0a5263c40943b.1420571615.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=1420573435; bh=FdwTUu0l2ReNR0l6hDaoX4vS5lhmiKArx6tszmeec18=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=Oc1/nTDfdX+VTcKmdXbaPo8iEavd1tMDbIzUPBI+zLhKlvUOpibz6pNxpFp3ANmqu ufdsnF2h8S1OKfgUlUVhK53pUPutRkOIGlQDx/Z5ufAY/ET1l394ge5klVbptlmzXe ybjtAD5oUfMFXOy4ZDxpOQhtjJxSetCO2mtUIUsZGJknIDtoW7XDxS6nXhTszyWczV huAs1uaMbp6w5GrIYL24Fk3WH+f+QWDicrjTbrLkHAjSam5pEDqfPqmEBLhqDhmSSj nK2xYGaG3HoSwzinWgSJzwoqpvhyP7Wkr1hdGxpWb9HlkymxEtNmPpAWgwAG9XyOZd JtenK/pgYCBjQ== 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..813c9e2 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