Tweak hooks for golang dsvm job
$BASE is not yet defined when the gate hooks are registered, so we cannot check for the existence of those files. Instead we check the existence of files when the hooks are run. Also if the gate hook is not defined then we do what is usually done which is to run the devstack-vm-gate.sh script Change-Id: I8e664f6633289a8514834598d72f82cc403497f4
This commit is contained in:
parent
95bcc754f7
commit
43cccf3a05
@ -72,26 +72,28 @@
|
||||
services+=,q-svc,q-dhcp,q-meta,q-agt,q-l3
|
||||
export OVERRIDE_ENABLED_SERVICES=$services
|
||||
|
||||
if [[ -f "$BASE/new/{name}/contrib/pre_test_hook.sh" ]]; then
|
||||
function pre_test_hook {{
|
||||
function pre_test_hook {{
|
||||
if [[ -f "$BASE/new/{name}/contrib/pre_test_hook.sh" ]]; then
|
||||
source $BASE/new/{name}/contrib/pre_test_hook.sh
|
||||
}}
|
||||
export -f pre_test_hook
|
||||
fi
|
||||
fi
|
||||
}}
|
||||
export -f pre_test_hook
|
||||
|
||||
if [[ -f "$BASE/new/{name}/contrib/gate_hook.sh" ]]; then
|
||||
function gate_hook {{
|
||||
function gate_hook {{
|
||||
if [[ -f "$BASE/new/{name}/contrib/gate_hook.sh" ]]; then
|
||||
source $BASE/new/{name}/contrib/gate_hook.sh
|
||||
}}
|
||||
export -f gate_hook
|
||||
fi
|
||||
else
|
||||
$BASE/new/devstack-gate/devstack-vm-gate.sh
|
||||
fi
|
||||
}}
|
||||
export -f gate_hook
|
||||
|
||||
if [[ -f "$BASE/new/{name}/contrib/post_test_hook.sh" ]]; then
|
||||
function post_test_hook {{
|
||||
source $BASE/new/{name}/contrib/post_test_hook.sh '{suite}'
|
||||
}}
|
||||
export -f post_test_hook
|
||||
fi
|
||||
function post_test_hook {{
|
||||
if [[ -f "$BASE/new/{name}/contrib/post_test_hook.sh" ]]; then
|
||||
source $BASE/new/{name}/contrib/post_test_hook.sh
|
||||
fi
|
||||
}}
|
||||
export -f post_test_hook
|
||||
|
||||
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
|
||||
./safe-devstack-vm-gate-wrap.sh
|
||||
|
Loading…
Reference in New Issue
Block a user