summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-11-09 11:13:32 -0800
committerGary Wu <gary.i.wu@huawei.com>2017-11-09 11:13:32 -0800
commit1030aa0c62b58f56620fb0913005cf25bc7b86e8 (patch)
tree581614e509f7591380a155eaba8b6b9b25ab62b9
parentf5fef8ba321fe1a0fd974f634f72a0646baeffe7 (diff)
Check robot init return code
Change-Id: Iae23f07849e0af319c46565c5bd720c5d4eaa164 Issue-ID: INT-278 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
-rwxr-xr-xtest/ete/scripts/run-healthcheck.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ete/scripts/run-healthcheck.sh b/test/ete/scripts/run-healthcheck.sh
index 4e6c8f3b8..10811b500 100755
--- a/test/ete/scripts/run-healthcheck.sh
+++ b/test/ete/scripts/run-healthcheck.sh
@@ -16,6 +16,12 @@ echo "ROBOT_IP=${ROBOT_IP}"
ssh-keygen -R ${ROBOT_IP}
ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PASSWORD_INPUT=$OS_PASSWORD_INPUT bash -s" < ./remote/run-robot.sh
+
+if [ $? -eq 0 ]
+then
+ exit 1
+fi
+
LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "ls -1t /opt/eteshare/logs | head -1")
echo "Browse Robot results at http://${ROBOT_IP}:88/logs/${LOG_DIR}/"
rsync -e "ssh -i ${SSH_KEY}" -avPz root@${ROBOT_IP}:/opt/eteshare/logs/${LOG_DIR}/ $WORKSPACE/archives/