From patchwork Thu Apr 27 14:26:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 98289 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp125909qgf; Thu, 27 Apr 2017 07:27:07 -0700 (PDT) X-Received: by 10.55.18.141 with SMTP id 13mr5640793qks.135.1493303227756; Thu, 27 Apr 2017 07:27:07 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 31si1726610qky.112.2017.04.27.07.27.07; Thu, 27 Apr 2017 07:27:07 -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 sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3B23C61FD5; Thu, 27 Apr 2017 14:27:07 +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=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, 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 4E28660D83; Thu, 27 Apr 2017 14:27:02 +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 1F57C60D83; Thu, 27 Apr 2017 14:27:00 +0000 (UTC) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by lists.linaro.org (Postfix) with ESMTPS id 152CB60CDE for ; Thu, 27 Apr 2017 14:26:59 +0000 (UTC) Received: by mail-lf0-f51.google.com with SMTP id 88so18544381lfr.0 for ; Thu, 27 Apr 2017 07:26:59 -0700 (PDT) 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=ZrxFafMtWx9SdK0PFo7R/ZtxuQ3ERn26m2vCFiit3R4=; b=i6rG1Cgpx+kJU+OX0pXVYt3tqRcRP4TY68OhQqDmIYV2rTnZdPgVAJ8IpzJS1cfRyZ 54jhJJBLdK+HObbADk2nPrJEEIPDVfHxlMYtWYBncuFD6w3KpUNLLKtrOrnLqwAFkn3h BE1TF+2/G2ptlCGykTA7AG4+PNcA5iBZ9cgjSnAJnUyaNDHp3hNnqG0jYrmX17cNpSfv GEEx5RQpMTiRIChUy3vM7hbgGVSiEz/anCNYZtkY2q2xrv4lvUEyJsFzA0J5VZLUmeJZ uIyrL8iEGkuMVGjMg20O28O8vEtpOQvrfzcX/wrozMwwR63ZZ7/7Ioy3cCn+eR1QmGqN sEAg== X-Gm-Message-State: AN3rC/7+NLzYGxC7/h4vgvmOeZb7/PCbqEMKGXxndLsjt0E72MJLSepn uul2yzJ77lbSVshPbMw= X-Received: by 10.25.159.3 with SMTP id i3mr2236492lfe.150.1493303217957; Thu, 27 Apr 2017 07:26:57 -0700 (PDT) Received: from localhost.localdomain (ppp95-165-131-83.pppoe.spdop.ru. [95.165.131.83]) by smtp.gmail.com with ESMTPSA id 12sm491698ljv.67.2017.04.27.07.26.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Apr 2017 07:26:56 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 27 Apr 2017 17:26:42 +0300 Message-Id: <20170427142643.6616-1-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.11.0.295.gd7dffce Subject: [lng-odp] [PATCHv2 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" 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 --- v2: fix Matias comments .../validation/api/traffic_mngr/traffic_mngr.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) -- 2.11.0.295.gd7dffce 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 a7d54162..4db7ea38 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,29 @@ # SPDX-License-Identifier: BSD-3-Clause # -# directory where test binaries have been built -TEST_DIR="${TEST_DIR:-$(dirname $0)}" +# directories where traffic_mngr_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)/../../../../common_plat/validation/api/traffic_mngr:$PATH +PATH=$(dirname $0):$PATH +PATH=`pwd`:$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." + 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