blob: 954c65361548fa32a47f214e393af11501d76b1d [file] [log] [blame]
Ray Milkeye146e792018-12-13 14:36:24 -08001#!/bin/bash
2
3# exit on errors
4set -eu -o pipefail
5
6# initialize build environment
7ONOS_ROOT=`pwd`
8. tools/build/envDefaults
9
10# initialize development environment for STC
11export JAVA_HOME=
12. tools/dev/bash_profile
13
14PATH=$PATH:/home/jenkins/bin
15
16# always free the cell when exiting
17function cleanup {
18 cell return jenkins-trellis-p4-${ONOS_VERSION}
19}
20
21trap cleanup EXIT
22
Ray Milkeye146e792018-12-13 14:36:24 -080023# build onos bits
24bazel build onos
25
Ray Milkeye18861c2019-03-28 14:03:18 -070026# grab a cell to run on
27cell borrow 30 3+1 jenkins-trellis-p4-${ONOS_VERSION}
28
Ray Milkeye146e792018-12-13 14:36:24 -080029# set up STC parameters
30topo default
31export stcDumpLogs="true"
32export stcColor="false"
33export stcHaltOnError="false"
34export TERM="vt100"
35
Ray Milkeye18861c2019-03-28 14:03:18 -070036# build stratum on the network node
37tools/test/bin/stratum-stc-build-side
38scp tools/test/bin/stratum-stc-cell-side sdn@$OCN:/tmp
39ssh -tt sdn@$OCN "/tmp/stratum-stc-cell-side"
40
Ray Milkeye146e792018-12-13 14:36:24 -080041# run STC
42stc setup && stc net-trellis-p4-smoke