From patchwork Tue May 12 21:59:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Baker X-Patchwork-Id: 6392121 Return-Path: X-Original-To: patchwork-linux-arm@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 3548BBEEE1 for ; Tue, 12 May 2015 22:02:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6616E2038E for ; Tue, 12 May 2015 22:02:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 85AE320380 for ; Tue, 12 May 2015 22:02:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YsIDI-0001Wt-8P; Tue, 12 May 2015 21:59:44 +0000 Received: from mail-pd0-f177.google.com ([209.85.192.177]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YsID9-0001Lo-LL for linux-arm-kernel@lists.infradead.org; Tue, 12 May 2015 21:59:36 +0000 Received: by pdbqa5 with SMTP id qa5so28452461pdb.1 for ; Tue, 12 May 2015 14:59:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JojJWxIufczEjm2HrJgrp5+Q4r5wTY0eYrGGckOG7nM=; b=DxrE5qFN8ymN/6YXMm1JZu+GWnx1c1kVzkXx4cvbh/51Q/OKfVlj5b3sUEfNqvqiG4 ZcZRKoC3LSspVrz2mOT9Y3bZq7OGhZaOPAOe3LpK+lAtWEXYXDznzw0KhIGpOHfLXyQX dwCbQ4eTtMMmuZK/GxzC94QD1Lw6WDiVMvZxjnTXo2rVdMnJU7Czo0Bw49jdxdDVhnZk +RSexODQl1WPj+2OPQDuxEBWVCdtRWB6ouUPInkygDg82z7o1zGu80pn0iSbJOmeHTPE U7DwXu6vvJDJ1WbqczdG4CG25d5zfQrIBqXZdzsonWDXnA2SLNYlv4lyCSK9TPh2pFxN A00Q== X-Gm-Message-State: ALoCoQl//frkjK8F4bJkM8vi2NiST0FLCsfUWyn6WWJ/XWDvlMWjmche63xZVlwgwhNptrQclxKm X-Received: by 10.68.191.101 with SMTP id gx5mr32227299pbc.148.1431467956117; Tue, 12 May 2015 14:59:16 -0700 (PDT) Received: from localhost.localdomain ([173.14.250.228]) by mx.google.com with ESMTPSA id gj9sm17164270pbc.77.2015.05.12.14.59.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 May 2015 14:59:15 -0700 (PDT) From: tyler.baker@linaro.org To: Shuah Khan Subject: [PATCH 1/2] selftests/lib.mk: fix INSTALL_RULE Date: Tue, 12 May 2015 14:59:06 -0700 Message-Id: <1431467947-29847-2-git-send-email-tyler.baker@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1431467947-29847-1-git-send-email-tyler.baker@linaro.org> References: <1431467947-29847-1-git-send-email-tyler.baker@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150512_145935_760937_31B53202 X-CRM114-Status: GOOD ( 11.11 ) X-Spam-Score: -0.7 (/) Cc: Kevin Hilman , Michael Ellerman , Tyler Baker , "linux-kernel@vger.kernel.org" , Andy Lutomirski , John Stultz , David Herrmann , Darren Hart , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: Tyler Baker This patch fixes the INSTALL_RULE to gracefully handle the case where TEST_PROGS and TEST_PROGS_EXTENDED and TEST_FILES are not set. In this case, install is called without any SOURCE arguments causing make install to fail. The proposed fix is to loop over the items in these variables and only call install if there is a test artifact present. Signed-off-by: Tyler Baker --- tools/testing/selftests/lib.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index ee412ba..89dd785f 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -13,10 +13,12 @@ run_tests: all define INSTALL_RULE mkdir -p $(INSTALL_PATH) - @for TEST_DIR in $(TEST_DIRS); do\ + @for TEST_DIR in $(TEST_DIRS); do \ cp -r $$TEST_DIR $(INSTALL_PATH); \ done; - install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) + @for ARTIFACT in $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); do \ + install -t $(INSTALL_PATH) $$ARTIFACT; \ + done; endef install: all