Porting function_exists to post_test_hook.sh

Porting function_exists to post_test_hook.sh from devstack

Change-Id: I8341ccfd254fde42d1ce7c4b2e157f4d1a3b7102
Closes-Bug: #1493761
This commit is contained in:
Eli Qiao 2015-09-09 17:27:04 +08:00
parent 25ae7c7044
commit 6da2af6c06
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,11 @@
# Sleep some time until all services are starting
sleep 5
# Check if a function already exists
function function_exists {
declare -f -F $1 > /dev/null
}
if ! function_exists echo_summary; then
function echo_summary {
echo $@