From patchwork Wed May 11 01:07:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 67482 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2411691qge; Tue, 10 May 2016 18:07:37 -0700 (PDT) X-Received: by 10.140.254.85 with SMTP id z82mr656763qhc.0.1462928857897; Tue, 10 May 2016 18:07:37 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t1si3355784qkt.22.2016.05.10.18.07.37; Tue, 10 May 2016 18:07:37 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 22FA6615FC; Wed, 11 May 2016 01:07:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 115C5611FB; Wed, 11 May 2016 01:07:33 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B2DFE61103; Wed, 11 May 2016 01:07:30 +0000 (UTC) Received: from mail-qg0-f51.google.com (mail-qg0-f51.google.com [209.85.192.51]) by lists.linaro.org (Postfix) with ESMTPS id 1055161103 for ; Wed, 11 May 2016 01:07:30 +0000 (UTC) Received: by mail-qg0-f51.google.com with SMTP id w36so16468510qge.3 for ; Tue, 10 May 2016 18:07:30 -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; bh=ycWIHTwsHFNBsMPWH+AfDgECSNnxTUGyQ1PBQ5ZVT6g=; b=m0sAz7l4BPCfL6ZoyTsWLNBgkemyutNNz6w8tKaQfx1R/llry50+MnXdPnkAtMm3M8 yUevfcAZI6o07Gaq+/Fjw5Tud0oCDe7/LGkUO/5OQpTQoeNdXrt4FI6b2pa+5Q1QMEaK rGPulQl7Nmlx1tpfHnC16CTUd8JQewAOFDOVbJG8OV2tfoASj3g0ZGkLDMvRNYBFRgFm MzHtc9hc7IY7GmGbATAh8ZDLge4UrmcNIBnUbu4cvveOvP/p2Q/mcILk+XwWNGedOFo9 5RFzdaYjt8e2YfH2VZChgpYg8xVwS+toq3b8GpV/TRTk/tJz/G+iS5J+L6vEfXcjTfIm rMdA== X-Gm-Message-State: AOPr4FV/uVG9dXolUJb9ozgCB01jMdKmX8qLsJmWUdfcQ4vAmKAgAaY6Ze2l7F5UIbFDfVcesu4= X-Received: by 10.140.238.76 with SMTP id j73mr645078qhc.24.1462928849809; Tue, 10 May 2016 18:07:29 -0700 (PDT) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id 90sm2269445qgh.28.2016.05.10.18.07.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 May 2016 18:07:29 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Tue, 10 May 2016 21:07:10 -0400 Message-Id: <1462928831-21055-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] linux-generic: test: improve locating pktio_env X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Rather than limit pktio_env to the current directory, find it on the path just as is done with pktio_main Signed-off-by: Mike Holmes --- platform/linux-generic/test/pktio/pktio_run | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/test/pktio/pktio_run b/platform/linux-generic/test/pktio/pktio_run index 7029ab2..774a616 100755 --- a/platform/linux-generic/test/pktio/pktio_run +++ b/platform/linux-generic/test/pktio/pktio_run @@ -31,13 +31,16 @@ TEST_SRC_DIR=$(dirname $0) TEST_SKIPPED=77 # Use installed pktio env or for make check take it from platform directory -if [ -f "./pktio_env" ]; then - . ./pktio_env + +PKTIO_ENV="$(which pktio_env)" + +if [ -f "${PKTIO_ENV}" ]; then + . ${PKTIO_ENV} elif [ -f ${TEST_SRC_DIR}/pktio_env ]; then . ${TEST_SRC_DIR}/pktio_env else echo "BUG: unable to find pktio_env!" - echo "pktio_env has to be in current directory or in platform/\$ODP_PLATFORM/test." + echo "pktio_env has to be in current path or in platform/\$ODP_PLATFORM/test" echo "ODP_PLATFORM=\"$ODP_PLATFORM\"" exit 1 fi