Committed by
Gerrit Code Review
Added protection against expired cell reservations.
Change-Id: I78b912fc9cc5298f68b30f9951940e3fcf0b1756
Showing
1 changed file
with
7 additions
and
0 deletions
| ... | @@ -22,15 +22,22 @@ if [ -n "$doSetup" ]; then | ... | @@ -22,15 +22,22 @@ if [ -n "$doSetup" ]; then |
| 22 | stc setup || exit 1 | 22 | stc setup || exit 1 |
| 23 | fi | 23 | fi |
| 24 | 24 | ||
| 25 | +# Iterate the specified number of times, or indefinitely if count not given | ||
| 25 | let run=1 | 26 | let run=1 |
| 26 | while [ $count -le 0 -o $run -le $count ]; do | 27 | while [ $count -le 0 -o $run -le $count ]; do |
| 27 | export stcTitle="STC Run #$run; " | 28 | export stcTitle="STC Run #$run; " |
| 28 | printf "Starting run %d...\n" $run | 29 | printf "Starting run %d...\n" $run |
| 30 | + | ||
| 31 | + # If we're running on a borrowed cell, refresh the reservation | ||
| 32 | + [ "$ONOS_CELL" = "borrow" ] && onos-cell $ONOS_CELL 120 >/dev/null | ||
| 33 | + | ||
| 34 | + # Iterate over all listed scenarios | ||
| 29 | for scenario in "${@:-smoke}"; do | 35 | for scenario in "${@:-smoke}"; do |
| 30 | printf "Running scenario %s...\n" $scenario | 36 | printf "Running scenario %s...\n" $scenario |
| 31 | stc $scenario | 37 | stc $scenario |
| 32 | done | 38 | done |
| 33 | status=$? | 39 | status=$? |
| 40 | + | ||
| 34 | printf "Finished run %d...\n" $run | 41 | printf "Finished run %d...\n" $run |
| 35 | [ $status -ne 0 ] && exit $status | 42 | [ $status -ne 0 ] && exit $status |
| 36 | let run=run+1 | 43 | let run=run+1 | ... | ... |
-
Please register or login to post a comment