This is an automated email from the ASF dual-hosted git repository. utzig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nffs.git
The following commit(s) were added to refs/heads/master by this push: new ed54331 Add more qemu error messages to CI ed54331 is described below commit ed54331cd269129e88fcdf12ce1cce0f7a98ab37 Author: Fabio Utzig <ut...@apache.org> AuthorDate: Thu Dec 27 09:25:07 2018 -0200 Add more qemu error messages to CI There were a few messages that were thrown by qemu that were not correctly captured by the evaluation script routine. This adds a list of the ones I've already seen and should be easy to extend to add new ones afterwards. --- ci/zephyr_run.sh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/ci/zephyr_run.sh b/ci/zephyr_run.sh index 2be666d..9b1dc20 100755 --- a/ci/zephyr_run.sh +++ b/ci/zephyr_run.sh @@ -16,17 +16,28 @@ make output="${HOME}/zephyr-results.txt" (make run | tee ${output}) & -# qemu output strings in case of failure -failed1="ASSERTION FAIL" -failed2="CPU Page Fault" succeded="PROJECT EXECUTION SUCCESSFUL" + +# There are multiple possible output messages, depending on which test was +# run, where it failed, or when some low-level fault in qemu happens. +declare -a finished_msgs=( + "ASSERTION FAIL" + "CPU Page Fault" + "PROJECT EXECUTION FAILED" + "${succeded}" +) + MAX_LOOPS=10 count=1 -while true; do - [[ $count == $MAX_LOOPS ]] && break - grep -q -e "${failed1}" -e "${failed2}" -e "${succeded}" ${output} - [[ $? -eq 0 ]] && break - +while [[ $count -lt $MAX_LOOPS ]]; do + for msg in "${finished_msgs[@]}"; do + grep -q -e "${msg}" ${output} + rc=$? + # break inner loop + [[ ${rc} -eq 0 ]] && break + done + + [[ ${rc} -eq 0 ]] && break sleep 3 count=$((count + 1)) done @@ -38,8 +49,4 @@ sleep 5 # give some time for qemu to close cat ${output} -grep -q -e "${failed1}" -e "${failed2}" ${output} -[[ $? -eq 0 ]] && exit 1 - -# If the grep above fails, the test succeeded, so force success exit! -exit 0 +grep -q -e "${succeded}" ${output}