simbit18 commented on code in PR #18576:
URL: https://github.com/apache/nuttx/pull/18576#discussion_r2986966959
##########
tools/testbuild.sh:
##########
@@ -580,6 +580,57 @@ function dotest {
fi
}
+# Build one entry from the test list file. Retry 5 times on failure.
+
+function retrytest {
+ # Remember the Fail Status and clear it for each build
+ local line=$1
+ local prevfail=$fail
+ local backoff=60 # Initial Exponential Backoff, in seconds
+
+ # Build and retry 5 times on failure, with Random Exponential Backoff
+ local maxbuilds=6
+ for ((i = 1; i <= $maxbuilds; i++)); do
+ echo "Build Attempt $i"
+ fail=0
+ dotest $line
+
+ # Don't retry if the build succeeded
+ if [ ${fail} -eq 0 ]; then
+ break
+ else
+ # Build Failed: Clean up any corrupted downloads, don't reuse
+ git clean -fd
+ git status
+ pushd ../apps
+ git clean -fd
+ git status
+ popd
+ fi
Review Comment:
Hi @lupyuen it might be better to use
git -C $APPSDIR clean -fd
git status
git -C $nuttx clean -fd
git status
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]