Ray Milkey | 3aa8af5 | 2018-03-09 09:10:08 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # exit on errors |
| 4 | set -eu -o pipefail |
| 5 | |
| 6 | # initialize build environment |
| 7 | ONOS_ROOT=`pwd` |
| 8 | . tools/build/envDefaults |
| 9 | |
| 10 | # initialize development environment for STC |
Ray Milkey | 8c67f30 | 2018-03-09 14:23:49 -0800 | [diff] [blame] | 11 | export JAVA_HOME= |
Ray Milkey | 3aa8af5 | 2018-03-09 09:10:08 -0800 | [diff] [blame] | 12 | . tools/dev/bash_profile |
| 13 | |
| 14 | |
| 15 | # always free the cell when exiting |
| 16 | function cleanup { |
Ray Milkey | 9ac211e | 2018-04-16 13:03:37 -0700 | [diff] [blame^] | 17 | cell return jenkins-${ONOS_VERSION} |
Ray Milkey | 3aa8af5 | 2018-03-09 09:10:08 -0800 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | trap cleanup EXIT |
| 21 | |
| 22 | # grab a cell to run on |
Ray Milkey | 9ac211e | 2018-04-16 13:03:37 -0700 | [diff] [blame^] | 23 | cell borrow 30 3+1 jenkins-${ONOS_VERSION} |
Ray Milkey | 3aa8af5 | 2018-03-09 09:10:08 -0800 | [diff] [blame] | 24 | |
| 25 | # build onos bits |
| 26 | onos-buck build onos |
| 27 | |
| 28 | # set up STC parameters |
| 29 | topo default |
Ray Milkey | 6d4b185 | 2018-04-06 08:43:48 -0700 | [diff] [blame] | 30 | export stcDumpLogs="true" |
Ray Milkey | 3aa8af5 | 2018-03-09 09:10:08 -0800 | [diff] [blame] | 31 | export stcColor="false" |
Ray Milkey | 6d4b185 | 2018-04-06 08:43:48 -0700 | [diff] [blame] | 32 | export stcHaltOnError="false" |
| 33 | export TERM="vt100" |
Ray Milkey | 3aa8af5 | 2018-03-09 09:10:08 -0800 | [diff] [blame] | 34 | |
| 35 | # run STC |
| 36 | stc |