| #------------------------------------------------------------------------------- |
| # Loops the System Test Coordinator invocations while success/until failure. |
| #------------------------------------------------------------------------------- |
| # Scan arguments for user/password or other options... |
| if [ -n "$doSetup" ]; then |
| # Iterate the specified number of times, or indefinitely if count not given |
| while [ $count -le 0 -o $run -le $count ]; do |
| export stcTitle="STC Run #$run; " |
| printf "Starting run %d...\n" $run |
| # If we're running on a borrowed cell, refresh the reservation |
| [ "$ONOS_CELL" = "borrow" ] && onos-cell $ONOS_CELL 120 >/dev/null |
| # Iterate over all listed scenarios |
| for scenario in "${@:-smoke}"; do |
| if [[ $scenario =~ ^[0-9]*$ ]]; then |
| printf "Waiting %d seconds...\n" $scenario |
| printf "Running scenario %s...\n" $scenario |
| stc $scenario || let status=status+$? |
| [ $status -ne 0 ] && break |
| printf "Finished run %d...\n" $run |
| [ $status -ne 0 ] && exit $status |
| if [ -n "$doTeardown" ]; then |
| printf "Tearing down...\n" |