blob: 63e65cc20eb9e43870c858bc5677f15a82b9947e [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
Brian O'Connorc5c88402017-08-15 17:02:32 -07009onos-push-test-bits $OCN
10onos-push-bits $OCN
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070011
Brian O'Connorc5c88402017-08-15 17:02:32 -070012ssh -t -t $ONOS_USER@$OCN "
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'Connorc5c88402017-08-15 17:02:32 -070035 export TERM=vt100
Brian O'Connor30322dd2017-08-14 19:11:29 -070036 stc $1
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070037"
Brian O'Connor30322dd2017-08-14 19:11:29 -070038status=$?
Ray Milkey708d1ef2017-04-11 10:17:01 -070039
40mkdir -p /tmp/stc
Brian O'Connorc5c88402017-08-15 17:02:32 -070041scp -r ${ONOS_USER}@${OCN}:/tmp/stc/* /tmp/stc/
Ray Milkey708d1ef2017-04-11 10:17:01 -070042
Brian O'Connor30322dd2017-08-14 19:11:29 -070043exit $status