mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
build: increase retry time for make testfront to 5
This commit is contained in:
@@ -30,6 +30,33 @@ travis_retry() {
|
||||
return $result
|
||||
}
|
||||
|
||||
retry_cmd() {
|
||||
local result=0
|
||||
local count=1
|
||||
set +e
|
||||
|
||||
retry_cnt=$1
|
||||
shift 1
|
||||
|
||||
while [ $count -le ${retry_cnt} ]; do
|
||||
[ $result -ne 0 ] && {
|
||||
echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of ${retry_cnt}${ANSI_RESET}\n" >&2
|
||||
}
|
||||
"$@"
|
||||
result=$?
|
||||
[ $result -eq 0 ] && break
|
||||
count=$(($count + 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
[ $count -gt ${retry_cnt} ] && {
|
||||
echo -e "\n${ANSI_RED}The command \"$@\" failed ${retry_cnt} times.${ANSI_RESET}\n" >&2
|
||||
}
|
||||
|
||||
set -e
|
||||
return $result
|
||||
}
|
||||
|
||||
export PATH=$PWD/bin:$PATH
|
||||
export PATH=$PATH:${TRAVIS_BUILD_DIR}/install/bin
|
||||
if [ -f ${TRAVIS_BUILD_DIR}/install/bin/luarocks ]; then
|
||||
|
||||
@@ -5,7 +5,7 @@ source "${CI_DIR}/common.sh"
|
||||
|
||||
travis_retry make fetchthirdparty
|
||||
make all
|
||||
travis_retry make testfront
|
||||
retry_cmd 6 make testfront
|
||||
set +o pipefail
|
||||
luajit $(which luacheck) --no-color -q frontend | tee ./luacheck.out
|
||||
test $(grep Total ./luacheck.out | awk '{print $2}') -le 63
|
||||
|
||||
Reference in New Issue
Block a user