summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-01-08 10:45:20 -0800
committerGary Wu <gary.i.wu@huawei.com>2018-01-08 10:45:20 -0800
commit5a06e09e59a2cc94e0ce46dd451b66737bdd8239 (patch)
tree3439fbcc63737ced89313019a65cb574093b7989 /test
parent17fdc4fe3c3d064e5c1d1958abe7e82f28daec01 (diff)
Return robot return code to aid scripting
Change-Id: Ib3f4091289dbbbbbe2c6d6d271063536dba15ced 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.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ete/scripts/run-healthcheck.sh b/test/ete/scripts/run-healthcheck.sh
index 2f0f014d3..01e6c4a98 100755
--- a/test/ete/scripts/run-healthcheck.sh
+++ b/test/ete/scripts/run-healthcheck.sh
@@ -20,7 +20,10 @@ fi
ssh-keygen -R ${ROBOT_IP}
ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PROJECT_ID=$OS_PROJECT_ID OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD bash -s" < ./remote/run-robot.sh
+RESULT=$?
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/
+
+exit $RESULT