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: 48417 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8E5C32121F for ; Tue, 12 May 2015 21:59:55 +0000 (UTC) Received: by wgtl5 with SMTP id l5sf4842737wgt.1 for ; Tue, 12 May 2015 14:59:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=tJQ+Gan4H0qy7Y39astWoTbX7PoIv9AxTyriiw0mwqw=; b=RQad4I+tc7B74oil4glrTiRY6McsCEpSoNlGx2rmZpeewpMRz/e+9eJmpjVHZx55xK 38iHXh0AtEFiCISMloj6xn7fuvofl09Mf8P++mKQC4QA556CEx6Gs78I+/56u6famwWI uaKU0qasIHxRc/LmpvKJ4jkkmQETpbwVKAf7fTr/F5dkrSon+eNLuHCYlKXnZHHopTsC fds8KTBDJNYf9Wlp3wCCof0HvLchdtn+xUm3Ht5auM0ORhS6Bdh+cn765+nUHRO8lI8R +/xDLOcw5yx9LeW7c1HurUgwWFnzvEuEKd7TF0r7XuO3ieOF4otiCKnu3M5PJsbmYWaE wfGA== X-Gm-Message-State: ALoCoQmZzYMq2VbWq2iMfbcYDhrCWrL3HviHkfWvZ1nQ5SBOqOhU5Kw3vawGo85JseArOygPgExV X-Received: by 10.152.87.140 with SMTP id ay12mr11931968lab.8.1431467994819; Tue, 12 May 2015 14:59:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.167 with SMTP id dd7ls85197lad.28.gmail; Tue, 12 May 2015 14:59:54 -0700 (PDT) X-Received: by 10.153.6.6 with SMTP id cq6mr13747957lad.13.1431467994646; Tue, 12 May 2015 14:59:54 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id ks12si11129475lac.38.2015.05.12.14.59.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 14:59:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagv1 with SMTP id v1so16229652lag.3 for ; Tue, 12 May 2015 14:59:54 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr13704359lbc.19.1431467994509; Tue, 12 May 2015 14:59:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp171861lbb; Tue, 12 May 2015 14:59:51 -0700 (PDT) X-Received: by 10.66.167.232 with SMTP id zr8mr31636396pab.23.1431467990734; Tue, 12 May 2015 14:59:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si24282423pdd.38.2015.05.12.14.59.49; Tue, 12 May 2015 14:59:50 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934156AbbELV7p (ORCPT + 28 others); Tue, 12 May 2015 17:59:45 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:35475 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933733AbbELV7Q (ORCPT ); Tue, 12 May 2015 17:59:16 -0400 Received: by pdbqd1 with SMTP id qd1so28365578pdb.2 for ; Tue, 12 May 2015 14:59:16 -0700 (PDT) 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 Cc: Andy Lutomirski , Kevin Hilman , John Stultz , Darren Hart , Michael Ellerman , David Herrmann , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Tyler Baker 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tyler.baker@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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