summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2021-05-19 17:01:55 -0400
committerFlorin Coras <florin.coras@gmail.com>2021-05-19 22:52:26 +0000
commit785458895dac4fd1f337e0b949bf011c363da99a (patch)
treeb4d6829e623c688bb1e27239da8cdaa42d136fab
parentd064c5976d02b552dd549751a929ba2691a4ad8d (diff)
bash: fix vpp-make-test -g option
- Don't pollute shell with local variables which also fixes a bug with -g option - If WS_ROOT is not set and vpp-make-test is invoked in the vpp root dir, then export WS_ROOT env var Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I608b666f7d3020863933a8072fb34e65c7f1c988
-rw-r--r--extras/bash/functions.bash13
1 files changed, 11 insertions, 2 deletions
diff --git a/extras/bash/functions.bash b/extras/bash/functions.bash
index 98b0d6300bc..9faf1049c2b 100644
--- a/extras/bash/functions.bash
+++ b/extras/bash/functions.bash
@@ -29,14 +29,23 @@ vpp-make-test()
local run_make_test
local old_pwd
local test_desc
+ local grep_results
+ local result
+ local fail
+ local i
+ local line
local is_feature="false"
local retry_count=100
local tester=${GERRIT_USER:-$USER}
local jobs="auto"
if [ -z "$WS_ROOT" ] ; then
- echo "ERROR: WS_ROOT is not set!"
- return
+ if [ -d "./extras/bash" ] ; then
+ export WS_ROOT="$(pwd)"
+ else
+ echo "ERROR: WS_ROOT is not set!"
+ return
+ fi
elif [ ! -d "$WS_ROOT/src/vppinfra" ] ; then
echo "ERROR: WS_ROOT is not set to a VPP workspace!"
return