From patchwork Wed Apr 26 09:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 98234 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp221868qgf; Wed, 26 Apr 2017 02:00:32 -0700 (PDT) X-Received: by 10.36.225.13 with SMTP id n13mr9586008ith.85.1493197232590; Wed, 26 Apr 2017 02:00:32 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n8si2645364iod.84.2017.04.26.02.00.31; Wed, 26 Apr 2017 02:00:32 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 3AA3160589; Wed, 26 Apr 2017 09:00:31 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 7E7266086C; Wed, 26 Apr 2017 09:00:22 +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 291286085F; Wed, 26 Apr 2017 09:00:21 +0000 (UTC) Received: from forward14o.cmail.yandex.net (forward14o.cmail.yandex.net [37.9.109.194]) by lists.linaro.org (Postfix) with ESMTPS id 9109D6085F for ; Wed, 26 Apr 2017 09:00:19 +0000 (UTC) Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [IPv6:2a02:6b8:0:f05::116]) by forward14o.cmail.yandex.net (Yandex) with ESMTP id 0D9D522CE5 for ; Wed, 26 Apr 2017 12:00:18 +0300 (MSK) Received: from smtp2h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id A53C778217C for ; Wed, 26 Apr 2017 12:00:13 +0300 (MSK) Received: by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kfamxh8axf-0ADCN9qJ; Wed, 26 Apr 2017 12:00:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 26 Apr 2017 12:00:06 +0300 Message-Id: <1493197207-3551-1-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 Github-pr-num: 17 Subject: [lng-odp] [PATCH 1/2] test: tm: add paths to find tm binary 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov Use the same algorithm as pktio_run.sh to find paths in different cases (in tree build, out of tree build, distcheck and etc). Fixes: https://bugs.linaro.org/show_bug.cgi?id=2969 Signed-off-by: Maxim Uvarov --- /** Email created from pull request 17 (muvarov:master_bug2969) ** https://github.com/Linaro/odp/pull/17 ** Patch: https://github.com/Linaro/odp/pull/17.patch ** Base sha: 9b993a1531c94782b48292adff54a95de9d2be5c ** Merge commit sha: 597d9211c21adde3887c416ede815431ee0a175c **/ .../validation/api/traffic_mngr/traffic_mngr.sh | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/test/common_plat/validation/api/traffic_mngr/traffic_mngr.sh b/test/common_plat/validation/api/traffic_mngr/traffic_mngr.sh index a7d5416..5b0a4cb 100755 --- a/test/common_plat/validation/api/traffic_mngr/traffic_mngr.sh +++ b/test/common_plat/validation/api/traffic_mngr/traffic_mngr.sh @@ -6,13 +6,31 @@ # SPDX-License-Identifier: BSD-3-Clause # -# directory where test binaries have been built -TEST_DIR="${TEST_DIR:-$(dirname $0)}" +# directories where pktio_main binary can be found: +# -in the validation dir when running make check (intree or out of tree) +# -in the script directory, when running after 'make install', or +# -in the validation when running standalone (./traffic_mngr) intree. +# -in the current directory. +# running stand alone out of tree requires setting PATH +PATH=${TEST_DIR}/api/traffic_mngr:$PATH +PATH=$(dirname $0):$PATH +PATH=`pwd`:$PATH +PATH=$(dirname $0)/../../../../common_plat/validation/api/traffic_mngr:$PATH + +traffic_mngr_main_path=$(which traffic_mngr_main${EXEEXT}) +if [ -x "$traffic_mngr_main_path" ] ; then + echo "running with traffic_mngr_main: $traffic_mngr_run_path" +else + echo "cannot find traffic_mngr_main: please set you PATH for it." + echo $PWD + echo $PATH + exit 1 +fi # exit codes expected by automake for skipped tests TEST_SKIPPED=77 -${TEST_DIR}/traffic_mngr_main${EXEEXT} +traffic_mngr_main${EXEEXT} ret=$? SIGSEGV=139