Fix exit from reservation loop 12/20212/1
authorVratko Polak <vrpolak@cisco.com>
Tue, 18 Jun 2019 13:04:07 +0000 (15:04 +0200)
committerVratko Polak <vrpolak@cisco.com>
Tue, 18 Jun 2019 13:05:36 +0000 (15:05 +0200)
Break from the while loop is on both success and no testbeds.

Change-Id: Iea368034927965c7f99f5502240bd768e3f62eec
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
resources/libraries/bash/function/common.sh

index 6d078e5..e89bae9 100644 (file)
@@ -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
 }
 
 

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.