Ray Milkey | e146e79 | 2018-12-13 14:36:24 -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 |
| 11 | export JAVA_HOME= |
| 12 | . tools/dev/bash_profile |
| 13 | |
| 14 | PATH=$PATH:/home/jenkins/bin |
| 15 | |
| 16 | # always free the cell when exiting |
| 17 | function cleanup { |
| 18 | cell return jenkins-trellis-p4-${ONOS_VERSION} |
| 19 | } |
| 20 | |
| 21 | trap cleanup EXIT |
| 22 | |
Ray Milkey | e146e79 | 2018-12-13 14:36:24 -0800 | [diff] [blame] | 23 | # build onos bits |
| 24 | bazel build onos |
| 25 | |
Ray Milkey | e18861c | 2019-03-28 14:03:18 -0700 | [diff] [blame^] | 26 | # grab a cell to run on |
| 27 | cell borrow 30 3+1 jenkins-trellis-p4-${ONOS_VERSION} |
| 28 | |
Ray Milkey | e146e79 | 2018-12-13 14:36:24 -0800 | [diff] [blame] | 29 | # set up STC parameters |
| 30 | topo default |
| 31 | export stcDumpLogs="true" |
| 32 | export stcColor="false" |
| 33 | export stcHaltOnError="false" |
| 34 | export TERM="vt100" |
| 35 | |
Ray Milkey | e18861c | 2019-03-28 14:03:18 -0700 | [diff] [blame^] | 36 | # build stratum on the network node |
| 37 | tools/test/bin/stratum-stc-build-side |
| 38 | scp tools/test/bin/stratum-stc-cell-side sdn@$OCN:/tmp |
| 39 | ssh -tt sdn@$OCN "/tmp/stratum-stc-cell-side" |
| 40 | |
Ray Milkey | e146e79 | 2018-12-13 14:36:24 -0800 | [diff] [blame] | 41 | # run STC |
| 42 | stc setup && stc net-trellis-p4-smoke |