blob: 3a30be7fcc5723b7d01a49572a28112143e0ea1b [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
Brian O'Connor649d0242017-03-21 02:14:18 +000026 source \$ONOS_ROOT/tools/dev/bash_profile
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070027 setPrimaryInstance 1
28 onos-verify-cell # TODO: remove once warden does this for us
29
30 # Finally, execute required STC scenario(s) using the default topology
31 topo default
32 export stcDumpLogs=true
Brian O'Connor649d0242017-03-21 02:14:18 +000033 export stcColor=$stcColor
Brian O'Connorc5c88402017-08-15 17:02:32 -070034 export TERM=vt100
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
Brian O'Connorc5c88402017-08-15 17:02:32 -070040scp -r ${ONOS_USER}@${OCN}:/tmp/stc/* /tmp/stc/
Ray Milkey708d1ef2017-04-11 10:17:01 -070041
Brian O'Connor30322dd2017-08-14 19:11:29 -070042exit $status