Make Fuzzer more reliable

This commit is contained in:
Alexey Milovidov 2021-01-28 10:21:54 +03:00
parent 355c99568e
commit 94430d9173

View File

@ -21,13 +21,16 @@ function clone
git init git init
git remote add origin https://github.com/ClickHouse/ClickHouse git remote add origin https://github.com/ClickHouse/ClickHouse
git fetch --depth=100 origin "$SHA_TO_TEST"
git fetch --depth=100 origin master # Used to obtain the list of modified or added tests # Network is unreliable. GitHub neither.
for _ in {1..100}; do git fetch --depth=100 origin "$SHA_TO_TEST" && break; sleep 1; done
# Used to obtain the list of modified or added tests
for _ in {1..100}; do git fetch --depth=100 origin master && break; sleep 1; done
# If not master, try to fetch pull/.../{head,merge} # If not master, try to fetch pull/.../{head,merge}
if [ "$PR_TO_TEST" != "0" ] if [ "$PR_TO_TEST" != "0" ]
then then
git fetch --depth=100 origin "refs/pull/$PR_TO_TEST/*:refs/heads/pull/$PR_TO_TEST/*" for _ in {1..100}; do git fetch --depth=100 origin "refs/pull/$PR_TO_TEST/*:refs/heads/pull/$PR_TO_TEST/*" && break; sleep 1; done
fi fi
git checkout "$SHA_TO_TEST" git checkout "$SHA_TO_TEST"