aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash/function
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-06-18 15:04:07 +0200
committerVratko Polak <vrpolak@cisco.com>2019-06-18 15:05:36 +0200
commit7c1753296301b237c19d5c2fbf8f9102fde8d3c1 (patch)
treeb05333840e643b464c3755427ba002ba79406085 /resources/libraries/bash/function
parent0b704d1fcfd4150601d40f9c5c59f61a5c120e6a (diff)
Fix exit from reservation loop
Break from the while loop is on both success and no testbeds. Change-Id: Iea368034927965c7f99f5502240bd768e3f62eec Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/bash/function')
-rw-r--r--resources/libraries/bash/function/common.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index 6d078e5a8b..e89bae9b38 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -580,7 +580,11 @@ function reserve_and_cleanup_testbed () {
echo "Sleeping ${sleep_time}"
sleep "${sleep_time}" || die "Sleep failed."
done
- die "Run out of operational testbeds!"
+ if [[ ${TOPOLOGIES[@]} ]]; then
+ echo "Reservation and cleanup successful."
+ else
+ die "Run out of operational testbeds!"
+ fi
}