From patchwork Fri Aug 14 13:43:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bamvor Zhang Jian X-Patchwork-Id: 52442 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id D5E932031F for ; Fri, 14 Aug 2015 13:48:11 +0000 (UTC) Received: by labd1 with SMTP id d1sf28054665lab.0 for ; Fri, 14 Aug 2015 06:48:10 -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=ylpcf4PrECC7HZ8YPrXyV1GZ9RyAX4nsCwE/sglB574=; b=Pd6pN4YjuPTkTjtirZwEiN7OaV9N9e3I6QEc7HoHJe7naX7QHc6+Dc7zIYjeXlhluI 4ZS8siEB0SHD6doyKBrTSN/dGk0mDvBdeF1XoiOI3BY+QyFDZMFCOuzLDlIRjFRXQtyv JbIyMzfex9J8Y5NZcEJYjM6hysiu52Un5KPD7H5NqoAoXtn9BokzdYlNQ4Ud8jywlopq cjBbN9R76p3hFrRQnYrn9SwoaHcDkBksx05LnFUi2/HkNewVXBzQJI+F2l6ZlLmojiRW ACfZRTGz7WjxS+GJA5WNfWl9NDnxn/g5nzxRna7h82pTv+1UiKL66LmYJp97SLPbmrXA T+ww== X-Gm-Message-State: ALoCoQmQcHynQTZhFEKboRHCuYNXrubJu1ioOTOvzdIsZwqFKgxmLWqNXIb43UK8EGMGGPU/Wgv9 X-Received: by 10.152.28.100 with SMTP id a4mr12942953lah.4.1439560090831; Fri, 14 Aug 2015 06:48:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.105 with SMTP id i9ls391772laa.72.gmail; Fri, 14 Aug 2015 06:48:10 -0700 (PDT) X-Received: by 10.112.77.10 with SMTP id o10mr16356997lbw.73.1439560090638; Fri, 14 Aug 2015 06:48:10 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id pp10si5994685lbc.132.2015.08.14.06.48.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2015 06:48:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbtg9 with SMTP id tg9so46137980lbb.1 for ; Fri, 14 Aug 2015 06:48:10 -0700 (PDT) X-Received: by 10.152.44.196 with SMTP id g4mr26169333lam.56.1439560089879; Fri, 14 Aug 2015 06:48:09 -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.7.198 with SMTP id l6csp1634882lba; Fri, 14 Aug 2015 06:48:08 -0700 (PDT) X-Received: by 10.70.92.47 with SMTP id cj15mr18996095pdb.37.1439560088452; Fri, 14 Aug 2015 06:48:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ek5si9102174pdb.242.2015.08.14.06.48.07; Fri, 14 Aug 2015 06:48:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755297AbbHNNsF (ORCPT + 28 others); Fri, 14 Aug 2015 09:48:05 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:35510 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755267AbbHNNsA (ORCPT ); Fri, 14 Aug 2015 09:48:00 -0400 Received: by obbop1 with SMTP id op1so62011658obb.2 for ; Fri, 14 Aug 2015 06:48:00 -0700 (PDT) X-Received: by 10.60.34.104 with SMTP id y8mr40994005oei.77.1439560079924; Fri, 14 Aug 2015 06:47:59 -0700 (PDT) Received: from linux-j170.site ([107.191.45.96]) by smtp.gmail.com with ESMTPSA id fx10sm2844558obb.27.2015.08.14.06.47.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Aug 2015 06:47:58 -0700 (PDT) From: Bamvor Jian Zhang To: linux-kernel@vger.kernel.org Cc: broonie@linaro.org, khilman@linaro.org, tyler.baker@linaro.org, bamvor.zhangjian@linaro.org, shuahkh@osg.samsung.com Subject: [PATCH 4/7] selftests: check before install Date: Fri, 14 Aug 2015 21:43:35 +0800 Message-Id: <1439559818-21666-5-git-send-email-bamvor.zhangjian@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439559818-21666-1-git-send-email-bamvor.zhangjian@linaro.org> References: <1439559818-21666-1-git-send-email-bamvor.zhangjian@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: bamvor.zhangjian@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.217.170 as permitted sender) smtp.mailfrom=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: , When the test cases is not supported by the current architecture the install files(TEST_PROGS, TEST_PROGS_EXTENDED and TEST_FILES) will be empty. Check it before installation to dismiss a failure reported by install program. Signed-off-by: Bamvor Jian Zhang --- tools/testing/selftests/Makefile | 1 - tools/testing/selftests/lib.mk | 13 ++++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 5f1d643..1d4a29a 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -73,7 +73,6 @@ ifdef INSTALL_PATH @# Ask all targets to install their files mkdir -p $(INSTALL_PATH) for TARGET in $(TARGETS); do \ - mkdir -p $(INSTALL_PATH)/$$TARGET ; \ make -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \ done; diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 1acfd02..4e14665 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -14,11 +14,14 @@ run_tests: all $(RUN_TESTS) define INSTALL_RULE - mkdir -p $(INSTALL_PATH) - @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) + @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \ + mkdir -p $(INSTALL_PATH); \ + for TEST_DIR in $(TEST_DIRS); do \ + cp -r $$TEST_DIR $(INSTALL_PATH); \ + done; \ + echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)"; \ + install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); \ + fi endef install: all