From: Vratko Polak Date: Tue, 18 Jun 2019 13:04:07 +0000 (+0200) Subject: Fix exit from reservation loop X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=7c1753296301b237c19d5c2fbf8f9102fde8d3c1 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 --- 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 }