aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/onos-push-test-bits
blob: 927d157f4953d55ad1f564eabf79cd461c8a5daa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
# -----------------------------------------------------------------------------
# Remotely pushes test bits to a remote test machine and unrolls them in /tmp
# -----------------------------------------------------------------------------

[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults

node=${1:-$OCI}
remote=$ONOS_USER@$node

scp -q $ONOS_TEST_TAR $remote:/tmp
ssh $remote "
    rm -f /tmp/onos $ONOS_TEST_BITS
    cd /tmp && tar zxf $ONOS_TEST_BITS.tar.gz && ln -s $ONOS_TEST_BITS onos
"