aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/onos-push-test-bits
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/tools/test/bin/onos-push-test-bits')
-rwxr-xr-xframework/src/onos/tools/test/bin/onos-push-test-bits16
1 files changed, 16 insertions, 0 deletions
diff --git a/framework/src/onos/tools/test/bin/onos-push-test-bits b/framework/src/onos/tools/test/bin/onos-push-test-bits
new file mode 100755
index 00000000..927d157f
--- /dev/null
+++ b/framework/src/onos/tools/test/bin/onos-push-test-bits
@@ -0,0 +1,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
+"