blob: b63c48b0fd4d67d4439f80d5cdcb398391828ef8 [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
Thomas Vachuskaa8418ca2018-01-11 10:44:42 -08009[ -f $ONOS_TEST_TAR ] || onos-package-test
10
Brian O'Connorc5c88402017-08-15 17:02:32 -070011onos-push-test-bits $OCN
12onos-push-bits $OCN
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070013
Brian O'Connorc5c88402017-08-15 17:02:32 -070014ssh -t -t $ONOS_USER@$OCN "
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070015 # Unpack the test tools
16 cd /tmp; rm -fr \$(ls -Fd onos-test-*/)
Brian O'Connor649d0242017-03-21 02:14:18 +000017 tar xf \$(basename $ONOS_TEST_TAR)
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070018
19 # Source in the cell environment
20 $(onos-cell | sed 's/^/export /')
21 unset OCT
22
23 # Set ONOS root to the top of the unrolled test directory and
24 # prime the environment.
25 cd \$(ls -Fd onos-test-*/)
26 export ONOS_ROOT=\$PWD
Brian O'Connor649d0242017-03-21 02:14:18 +000027 export ONOS_STAGE_ROOT=/tmp
Brian O'Connor649d0242017-03-21 02:14:18 +000028 source \$ONOS_ROOT/tools/dev/bash_profile
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070029 setPrimaryInstance 1
30 onos-verify-cell # TODO: remove once warden does this for us
31
32 # Finally, execute required STC scenario(s) using the default topology
33 topo default
34 export stcDumpLogs=true
Brian O'Connor649d0242017-03-21 02:14:18 +000035 export stcColor=$stcColor
Brian O'Connorc5c88402017-08-15 17:02:32 -070036 export TERM=vt100
Brian O'Connor30322dd2017-08-14 19:11:29 -070037 stc $1
Thomas Vachuska9ac244b2017-03-20 16:03:33 -070038"
Brian O'Connor30322dd2017-08-14 19:11:29 -070039status=$?
Ray Milkey708d1ef2017-04-11 10:17:01 -070040
41mkdir -p /tmp/stc
Brian O'Connorc5c88402017-08-15 17:02:32 -070042scp -r ${ONOS_USER}@${OCN}:/tmp/stc/* /tmp/stc/
Ray Milkey708d1ef2017-04-11 10:17:01 -070043
Brian O'Connor30322dd2017-08-14 19:11:29 -070044exit $status