blob: 954c65361548fa32a47f214e393af11501d76b1d [file] [log] [blame]
#!/bin/bash
# exit on errors
set -eu -o pipefail
# initialize build environment
ONOS_ROOT=`pwd`
. tools/build/envDefaults
# initialize development environment for STC
export JAVA_HOME=
. tools/dev/bash_profile
PATH=$PATH:/home/jenkins/bin
# always free the cell when exiting
function cleanup {
cell return jenkins-trellis-p4-${ONOS_VERSION}
}
trap cleanup EXIT
# build onos bits
bazel build onos
# grab a cell to run on
cell borrow 30 3+1 jenkins-trellis-p4-${ONOS_VERSION}
# set up STC parameters
topo default
export stcDumpLogs="true"
export stcColor="false"
export stcHaltOnError="false"
export TERM="vt100"
# build stratum on the network node
tools/test/bin/stratum-stc-build-side
scp tools/test/bin/stratum-stc-cell-side sdn@$OCN:/tmp
ssh -tt sdn@$OCN "/tmp/stratum-stc-cell-side"
# run STC
stc setup && stc net-trellis-p4-smoke