fix incorrect use of local

local can only be used in functions, this probably broke other
projects but no one yet complained.

Change-Id: I1a80ae4838769d8ea9ec6b090f277a9a1f338dbf
This commit is contained in:
Sean Dague
2014-03-03 18:25:31 -05:00
parent 6f9dc36998
commit 361fbacdeb

View File

@@ -287,7 +287,7 @@ fi
# Run pre test hook if we have one
if function_exists "pre_test_hook"; then
echo "Running pre_test_hook"
local xtrace=$(set +o | grep xtrace)
xtrace=$(set +o | grep xtrace)
set -o xtrace
tsfilter pre_test_hook | tee $WORKSPACE/devstack-gate-pre-test-hook.txt
sudo mv $WORKSPACE/devstack-gate-pre-test-hook.txt $BASE/logs/
@@ -303,7 +303,7 @@ RETVAL=$GATE_RETVAL
# Run post test hook if we have one
if [ $GATE_RETVAL -eq 0 ] && function_exists "post_test_hook"; then
echo "Running post_test_hook"
local xtrace=$(set +o | grep xtrace)
xtrace=$(set +o | grep xtrace)
set -o xtrace -o pipefail
tsfilter post_test_hook | tee $WORKSPACE/devstack-gate-post-test-hook.txt
RETVAL=$?