Thomas Vachuska | 9ac244b | 2017-03-20 16:03:33 -0700 | [diff] [blame] | 1 | #!/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 Vachuska | a8418ca | 2018-01-11 10:44:42 -0800 | [diff] [blame^] | 9 | [ -f $ONOS_TEST_TAR ] || onos-package-test |
| 10 | |
Brian O'Connor | c5c8840 | 2017-08-15 17:02:32 -0700 | [diff] [blame] | 11 | onos-push-test-bits $OCN |
| 12 | onos-push-bits $OCN |
Thomas Vachuska | 9ac244b | 2017-03-20 16:03:33 -0700 | [diff] [blame] | 13 | |
Brian O'Connor | c5c8840 | 2017-08-15 17:02:32 -0700 | [diff] [blame] | 14 | ssh -t -t $ONOS_USER@$OCN " |
Thomas Vachuska | 9ac244b | 2017-03-20 16:03:33 -0700 | [diff] [blame] | 15 | # Unpack the test tools |
| 16 | cd /tmp; rm -fr \$(ls -Fd onos-test-*/) |
Brian O'Connor | 649d024 | 2017-03-21 02:14:18 +0000 | [diff] [blame] | 17 | tar xf \$(basename $ONOS_TEST_TAR) |
Thomas Vachuska | 9ac244b | 2017-03-20 16:03:33 -0700 | [diff] [blame] | 18 | |
| 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'Connor | 649d024 | 2017-03-21 02:14:18 +0000 | [diff] [blame] | 27 | export ONOS_STAGE_ROOT=/tmp |
| 28 | export ONOS_TEST_STAGE_ROOT=/tmp |
| 29 | source \$ONOS_ROOT/tools/dev/bash_profile |
Thomas Vachuska | 9ac244b | 2017-03-20 16:03:33 -0700 | [diff] [blame] | 30 | setPrimaryInstance 1 |
| 31 | onos-verify-cell # TODO: remove once warden does this for us |
| 32 | |
| 33 | # Finally, execute required STC scenario(s) using the default topology |
| 34 | topo default |
| 35 | export stcDumpLogs=true |
Brian O'Connor | 649d024 | 2017-03-21 02:14:18 +0000 | [diff] [blame] | 36 | export stcColor=$stcColor |
Brian O'Connor | c5c8840 | 2017-08-15 17:02:32 -0700 | [diff] [blame] | 37 | export TERM=vt100 |
Brian O'Connor | 30322dd | 2017-08-14 19:11:29 -0700 | [diff] [blame] | 38 | stc $1 |
Thomas Vachuska | 9ac244b | 2017-03-20 16:03:33 -0700 | [diff] [blame] | 39 | " |
Brian O'Connor | 30322dd | 2017-08-14 19:11:29 -0700 | [diff] [blame] | 40 | status=$? |
Ray Milkey | 708d1ef | 2017-04-11 10:17:01 -0700 | [diff] [blame] | 41 | |
| 42 | mkdir -p /tmp/stc |
Brian O'Connor | c5c8840 | 2017-08-15 17:02:32 -0700 | [diff] [blame] | 43 | scp -r ${ONOS_USER}@${OCN}:/tmp/stc/* /tmp/stc/ |
Ray Milkey | 708d1ef | 2017-04-11 10:17:01 -0700 | [diff] [blame] | 44 | |
Brian O'Connor | 30322dd | 2017-08-14 19:11:29 -0700 | [diff] [blame] | 45 | exit $status |