Message ID | 1493197207-3551-1-git-send-email-odpbot@yandex.ru |
---|---|
State | New |
Headers | show |
Series | [1/2] test: tm: add paths to find tm binary | expand |
Petri, is that fixes your problem? Can you provide review to I can apply it? Thank you, Maxim. On 26 April 2017 at 12:00, Github ODP bot <odpbot@yandex.ru> wrote: > From: Maxim Uvarov <maxim.uvarov@linaro.org> > > 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 <maxim.uvarov@linaro.org> > --- > /** 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 > >
This patch fixes the validation test failure. Couple minor comments below. -Matias > > From: Maxim Uvarov <maxim.uvarov@linaro.org> > > 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 <maxim.uvarov@linaro.org> > --- > /** 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: This should be traffic_mngr_main. > +# -in the validation when running standalone (./traffic_mngr) intree. Is this relevant for tm? pktio had the separate pktio_run script. > +# -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 The order of paths should match the order of comments above. > + > +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 These two echo lines could be dropped or they require some prefix text. -Matias
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