From 7c1753296301b237c19d5c2fbf8f9102fde8d3c1 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Tue, 18 Jun 2019 15:04:07 +0200 Subject: 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 --- resources/libraries/bash/function/common.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'resources/libraries/bash/function') 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 } -- cgit 1.2.3-korg