From: Peter Gubka Date: Tue, 7 Jul 2015 10:21:52 +0000 (+0200) Subject: minor improvement to be able to run the script from any location X-Git-Tag: release/helium-sr4~23 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=642d20600654f49870e5e215f9d4191b157866d3 minor improvement to be able to run the script from any location Change-Id: Ice274084144499f4fdab4e3fdcb360e59f2204c3 Signed-off-by: Peter Gubka --- diff --git a/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/get-total-found.sh b/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/get-total-found.sh index d68728aec2..c1792a794c 100755 --- a/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/get-total-found.sh +++ b/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/get-total-found.sh @@ -9,14 +9,15 @@ ECHO=`which echo` TOTAL=0 i=1 +dname=`dirname $0` while true; do - CUR=$((`./OVS-dump-flows.sh.13 s$i 2> /dev/null | grep -v "flags=\[more\]" | wc -l` - 1)) + CUR=$((`${dname}/OVS-dump-flows.sh.13 s$i 2> /dev/null | grep -v "flags=\[more\]" | wc -l` - 1)) if [ "$CUR" == "-1" ]; - then - break + then + break else printf "Switch s%d: %d flows\n" $i $CUR TOTAL=$(($TOTAL + $CUR)) @@ -24,4 +25,5 @@ do fi done -printf "\nTotal: %d\n\n" $TOTAL \ No newline at end of file +printf "\nTotal: %d\n\n" $TOTAL + diff --git a/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/get-total-reported.sh b/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/get-total-reported.sh index 75ad1aeb88..d88792a0cb 100755 --- a/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/get-total-reported.sh +++ b/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/get-total-reported.sh @@ -7,18 +7,18 @@ ECHO=`which echo` TOTAL=0 - +dname=`dirname $0` i=1 while true; do - CURSTRING=`./OVS-dump-tables.sh.13 s$i 2> /dev/null | grep -v "active=0" | grep "active"` + CURSTRING=`${dname}/OVS-dump-tables.sh.13 s$i 2> /dev/null | grep -v "active=0" | grep "active"` if [ "$CURSTRING" = "" ]; - then - break + then + break else - CUR=`echo $CURSTRING | awk -F'[:=,]' '{print $3}'` + CUR=`echo $CURSTRING | awk -F'[:=,]' '{print $3}'` TOTAL=$(($TOTAL + $CUR)) printf "Switch s%d:\n" $i echo " Table " $CURSTRING @@ -26,4 +26,5 @@ do fi done -printf "\nTotal: %d\n\n" $TOTAL \ No newline at end of file +printf "\nTotal: %d\n\n" $TOTAL +