Rename timeout_hook to with_timeout
Because we might actually want a "timeout_hook" some day. Change-Id: I41f07f05e2f1795069ac1be69a3f53de7b70a88e
This commit is contained in:
@@ -519,11 +519,11 @@ fi
|
||||
# Note that hooks should be multihost aware if necessary.
|
||||
# devstack-vm-gate-wrap.sh will not automagically run the hooks on each node.
|
||||
# Run pre test hook if we have one
|
||||
timeout_hook call_hook_if_defined "pre_test_hook"
|
||||
with_timeout call_hook_if_defined "pre_test_hook"
|
||||
|
||||
# Run the gate function
|
||||
echo "Running gate_hook"
|
||||
timeout_hook "gate_hook"
|
||||
with_timeout "gate_hook"
|
||||
GATE_RETVAL=$?
|
||||
RETVAL=$GATE_RETVAL
|
||||
|
||||
@@ -537,7 +537,7 @@ fi
|
||||
# Run post test hook if we have one
|
||||
if [ $GATE_RETVAL -eq 0 ]; then
|
||||
# Run post_test_hook if we have one
|
||||
timeout_hook call_hook_if_defined "post_test_hook"
|
||||
with_timeout call_hook_if_defined "post_test_hook"
|
||||
RETVAL=$?
|
||||
fi
|
||||
|
||||
|
||||
@@ -991,7 +991,7 @@ function ovs_gre_bridge {
|
||||
# Timeout hook calls implemented as bash functions. Note this
|
||||
# forks and execs a new bash in order to use the timeout utility
|
||||
# which cannot operate on bash functions directly.
|
||||
function timeout_hook {
|
||||
function with_timeout {
|
||||
local cmd=$@
|
||||
remaining_time
|
||||
timeout -s 9 ${REMAINING_TIME}m bash -c "source $WORKSPACE/devstack-gate/functions.sh && $cmd"
|
||||
|
||||
Reference in New Issue
Block a user