From patchwork Thu Sep 14 10:51:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naresh Kamboju X-Patchwork-Id: 112525 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp596266qgf; Thu, 14 Sep 2017 03:51:23 -0700 (PDT) X-Received: by 10.84.252.144 with SMTP id y16mr24578890pll.113.1505386283564; Thu, 14 Sep 2017 03:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505386283; cv=none; d=google.com; s=arc-20160816; b=qSzqR3qCyEt4bU5egVTgVtqEpgHc4YsuX1qsaclRVsGnPacUh6LXIRXvcJepqbamYb 45QgjhHO5DnjbooVO+OIr/+G59Qt2UT/EPr0R0sUJGKR7Pzw01CVIsDJ/TB1jaLy6VUO Im/6UzNLhOkaYtnik8K4oWwBCuhBAWkLRUSdXioTvqYT0lstmrlBSWc40y8JqTcy2+c3 +Qh+JynAoMEIqVlRmn5vReD9vHhdY6ZG9+tmSw0NX9Vp5ayW+JvN2MKMTCCbiEcNRrJF fCha8HW+yeBOcfTraVlUtpt8t5sPROMuK4TKTYH93M8M0i7u5gUa8/hv6qBDM2Lz2sbW ex7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jVnOOe2r5aMEDxaoJ7YyVtvO3ClzEaefIYKXXzuvQD8=; b=hWOEg7LLzMYp0a6duiA9YePED89DVfc1CRspyXrK12Rs/TqBSX1Z/ineFmM67x5bKU SkWsBtxm5X9kdivTEszJYaQs+B9nwLTFTloPHM7sA09zzd/J3ur1VbmvF79SNwX2K1qP OlET94i5KAewLTjW+Pc7MM5IGIfILZKCzNA1hnu/OFEBrgQ38Wz+AlyGl0VTGOOHHDqC CFYpcGJz6h8FyF0HrpNoYEo6DWWomU3nCnYgyqy29+YRCLKprpaKd2npH31kor5PoIHz AyImH35qStBl/QEtpExtufLESI6oVKIp9FJq7ZPDZy3TWGDgCRDXbka7Ibt2foC0wvqw X+Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WStBkvhh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si12130885plc.620.2017.09.14.03.51.23; Thu, 14 Sep 2017 03:51:23 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WStBkvhh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbdINKvV (ORCPT + 26 others); Thu, 14 Sep 2017 06:51:21 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:55140 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500AbdINKvR (ORCPT ); Thu, 14 Sep 2017 06:51:17 -0400 Received: by mail-pf0-f182.google.com with SMTP id d187so69769pfg.11 for ; Thu, 14 Sep 2017 03:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jVnOOe2r5aMEDxaoJ7YyVtvO3ClzEaefIYKXXzuvQD8=; b=WStBkvhhXGz8/W1SVvaw5eBo/cQa1WH8+bmCq2dxbmW8Cc5PL/J6aOliB1Wj7YOmXr 05ADVMUbsUwjOr7wgEVc3Q/wwyJxuzRGekv7i8tCg5zmZtf4MCb+9W9IOZ0T4Y1qjGop JfdFZYtPv1NQhlQyz9jjyjs9/rS4LlBnL4xuY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jVnOOe2r5aMEDxaoJ7YyVtvO3ClzEaefIYKXXzuvQD8=; b=et11bN9I3CdkozmH21EM/XWVm0ko7VdUzihgnjAcfWbMDBrgv/uhtV/GYEwtqRK3/e 5lzaWd3YLQbk2AXBX7/EAlzO+ulhvo3/5Atz39WnhPHoPMt9hY3Tq+KS1yhb+ogmmEWY gyu9d6ZsI9UfoY0bVvMWDcVyKw1QVob/kzW5fGJpoExLcgBSIFz397kfhHV/It6TCLWA pktEXUymAYbhHZ4SyMdPP98/379quBuYy4mfiy/P2RGoT1jOm8xs7zSWBL1IvIwr780A uNk8dpXScAmdGTGvNDivHwf9wgOSGpy+Xo1a6sMJukzjtDsNIQCJWw2oUAqoy1mzSsWH 9HfA== X-Gm-Message-State: AHPjjUh7LA+C7x3hZveo8jepKUwKvugiG0kkbjeMi0dQXbbTakdo2uvl RgCoV5WjqV4b9m3C X-Google-Smtp-Source: ADKCNb4VH8zF/AtQxRG2vbwSByKkr8lOa0Bm9Dd+Wj20+zASYHwN4r3gGw/YB4uAXH6KFcU+xRIYBA== X-Received: by 10.99.96.75 with SMTP id u72mr18661468pgb.178.1505386276681; Thu, 14 Sep 2017 03:51:16 -0700 (PDT) Received: from localhost.localdomain ([122.175.18.191]) by smtp.gmail.com with ESMTPSA id r3sm24430897pgf.48.2017.09.14.03.51.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Sep 2017 03:51:15 -0700 (PDT) From: naresh.kamboju@linaro.org To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org, prarit@redhat.com Cc: linux-kernel@vger.kernel.org, sumit.semwal@linaro.org, milosz.wasilewski@linaro.org Subject: [PATCH] selftests: intel_pstate: compile programs if executable not found Date: Thu, 14 Sep 2017 16:21:09 +0530 Message-Id: <1505386269-15774-1-git-send-email-naresh.kamboju@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Naresh Kamboju Test exit due to aperf.c: No such file or directory ./run.sh gcc: error: aperf.c: No such file or directory Problem compiling aperf.c. The Makefile installs executable programs "aperf" and "msr" so skip compile on target. Signed-off-by: Naresh Kamboju --- tools/testing/selftests/intel_pstate/run.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) -- 2.13.0 diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh index 7868c106b8b1..2149b9b5876a 100755 --- a/tools/testing/selftests/intel_pstate/run.sh +++ b/tools/testing/selftests/intel_pstate/run.sh @@ -31,11 +31,16 @@ EVALUATE_ONLY=0 max_cpus=$(($(nproc)-1)) -# compile programs -gcc aperf.c -Wall -D_GNU_SOURCE -o aperf -lm -[ $? -ne 0 ] && echo "Problem compiling aperf.c." && exit 1 -gcc -o msr msr.c -lm -[ $? -ne 0 ] && echo "Problem compiling msr.c." && exit 1 +# Compile programs if executable not found +if [ ! -x aperf ]; then + gcc aperf.c -Wall -D_GNU_SOURCE -o aperf -lm + [ $? -ne 0 ] && echo "Problem compiling aperf.c." && exit 1 +fi + +if [ ! -x msr ]; then + gcc -o msr msr.c -lm + [ $? -ne 0 ] && echo "Problem compiling msr.c." && exit 1 +fi function run_test () {