blob: ac840e469bd206e7e0ee6636cd7f181426f3be95 [file] [log] [blame]
Thomas Vachuska9ac244b2017-03-20 16:03:33 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Executes validation build using onos-test.tar.gz and onos.tar.gz on a remote
4# proxy. It assumes that the tar.gz files are already available.
5# -----------------------------------------------------------------------------
6
7. $ONOS_ROOT/tools/build/envDefaults
8
9onos-push-test-bits $OCT
10onos-push-bits $OCT
11
Brian O'Connor649d0242017-03-21 02:14:18 +000012ssh -t -t $ONOS_USER@$OCT "
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070013 # Unpack the test tools
14 cd /tmp; rm -fr \$(ls -Fd onos-test-*/)
Brian O'Connor649d0242017-03-21 02:14:18 +000015 tar xf \$(basename $ONOS_TEST_TAR)
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070016
17 # Source in the cell environment
18 $(onos-cell | sed 's/^/export /')
19 unset OCT
20
21 # Set ONOS root to the top of the unrolled test directory and
22 # prime the environment.
23 cd \$(ls -Fd onos-test-*/)
24 export ONOS_ROOT=\$PWD
Brian O'Connor649d0242017-03-21 02:14:18 +000025 export ONOS_STAGE_ROOT=/tmp
26 export ONOS_TEST_STAGE_ROOT=/tmp
27 source \$ONOS_ROOT/tools/dev/bash_profile
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070028 setPrimaryInstance 1
29 onos-verify-cell # TODO: remove once warden does this for us
30
31 # Finally, execute required STC scenario(s) using the default topology
32 topo default
33 export stcDumpLogs=true
Brian O'Connor649d0242017-03-21 02:14:18 +000034 export stcColor=$stcColor
Brian O'Connor30322dd2017-08-14 19:11:29 -070035 stc $1
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070036"
Brian O'Connor30322dd2017-08-14 19:11:29 -070037status=$?
Ray Milkey708d1ef2017-04-11 10:17:01 -070038
39mkdir -p /tmp/stc
40scp -r ${ONOS_USER}@${OCT}:/tmp/stc/* /tmp/stc/
41
Brian O'Connor30322dd2017-08-14 19:11:29 -070042exit $status