aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-10-24 08:06:17 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-10-24 08:06:17 -0700
commitcd182079d347f17b286853d2453ee56f8761b196 (patch)
tree26a071271fae138b123fb8bc61eb04ffcd450c13 /test
parentbdcc479956943c40255f7b094337f4728b822bda (diff)
Retrieve robot results from health check
Change-Id: I0925f8ee4b30eb3b72f6f4cd53dff3f7909fb1eb Issue-ID: INT-278 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/ete/scripts/run-healthcheck.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ete/scripts/run-healthcheck.sh b/test/ete/scripts/run-healthcheck.sh
index ee6c2668a..45142b006 100755
--- a/test/ete/scripts/run-healthcheck.sh
+++ b/test/ete/scripts/run-healthcheck.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+SSH_KEY=~/.ssh/onap_key
+
if [ -z "$WORKSPACE" ]; then
export WORKSPACE=`git rev-parse --show-toplevel`
fi
@@ -11,4 +13,6 @@ cd $WORKSPACE/test/ete/scripts
ROBOT_IP=$(./get-floating-ip.sh onap-robot)
echo "ROBOT_IP=${ROBOT_IP}"
-ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key root@${ROBOT_IP} "OS_PASSWORD_INPUT=$OS_PASSWORD_INPUT bash -s" < ./remote/run-robot.sh
+ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PASSWORD_INPUT=$OS_PASSWORD_INPUT bash -s" < ./remote/run-robot.sh
+LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "ls -1t /opt/eteshare/logs | head -1")
+rsync -e "ssh -i ${SSH_KEY}" -avPz root@${ROBOT_IP}:/opt/eteshare/logs/${LOG_DIR}/ $WORKSPACE/archives/