diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-19 09:56:31 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-19 09:56:31 +0000 |
commit | 84ddec275438d5460a1b16048941f328e6c6ece3 (patch) | |
tree | 1a1b7f21cef3dd84a9cc7511a357252f84c96882 | |
parent | bf550484f240557949aecf547e9363ef3dbc4f25 (diff) |
round-robin.sh: Add asserts to troubleshoot strange failures
We are seeing strange behavior with base-artifacts -- results file
is not being updated, so we get corrupted baselines. It's unclear why
or how this happens, so add these asserts. If nothing else, these
asserts will prevent push_baseline from pushing bogus results to
the base-artifacts repo.
The following script can be used to identified branches with bogus
results:
===
set -euf -o pipefail
git reset --hard
git clean -fd
branches=($(git branch -r | grep linaro-local/ci))
for branch in "${branches[@]}"; do
git checkout --detach $branch > /dev/null 2>&1
while git rev-parse HEAD^ >/dev/null 2>&1; do
if [ x"$(git diff HEAD HEAD^ -- results)" = x"" ]; then
echo "$branch: $(git rev-parse HEAD)"
git log --oneline HEAD | head -n2
tail -n1 results
fi
git checkout --detach HEAD^ > /dev/null 2>&1
done
done
===
Change-Id: I840041f63dffc5aeb3a72a4cbd6859ea0191d336
-rw-r--r-- | round-robin.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/round-robin.sh b/round-robin.sh index 8d903903..caa6b47a 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -430,6 +430,17 @@ update_baseline () git -C base-artifacts commit $amend -m "$msg_title $(cat ${rr[top_artifacts]}/results)" + + # We saw strange behavior with base-artifacts/results not being updated + # or git-add'ed properly. Add a couple of asserts to catch such problems. + if [ x"$(diff -rup -x .git ${rr[top_artifacts]}/ base-artifacts/ | wc -l)" != x"0" ] \ + || [ x"$amend" = x"" -a x"$(git -C base-artifacts diff HEAD HEAD^ -- results)" = x"" ]; then + cd base-artifacts + git status + cat results + ls -la + assert false + fi ) } |