| #!/bin/bash |
| |
| # initialize build environment |
| ONOS_ROOT=`pwd` |
| . tools/build/envDefaults |
| |
| # initialize development environment for STC |
| export JAVA_HOME= |
| . tools/dev/bash_profile |
| |
| |
| # always free the cell when exiting |
| function cleanup { |
| cell return jenkins-${ONOS_VERSION} |
| } |
| |
| trap cleanup EXIT |
| |
| let err=0 |
| # grab a cell to run on |
| for i in 1 2 3 4 5; do |
| cell borrow 30 3+1 jenkins-${ONOS_VERSION} |
| if [ $? -eq 0 ]; then |
| let err=0 |
| break |
| fi |
| let err=$err+1 |
| cell return |
| done |
| |
| if [ $? -ne 0 ]; then |
| exit 1 |
| fi |
| |
| # exit on errors |
| set -eu -o pipefail |
| |
| # build onos bits |
| onos-buck build onos |
| |
| # set up STC parameters |
| topo default |
| export stcDumpLogs="true" |
| export stcColor="false" |
| export stcHaltOnError="false" |
| export TERM="vt100" |
| |
| # run STC |
| stc setup && stc net-trellis-hag-smoke |