Return robot return code to aid scripting
[integration.git] / test / ete / scripts / run-healthcheck.sh
index 2f0f014..01e6c4a 100755 (executable)
@@ -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