diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-19 16:29:24 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-19 16:29:24 +0000 |
commit | 76e0bb578316168c2de9e9d20a2259fd02f2b4f2 (patch) | |
tree | 748164452dad668ae5c81bcb4bed0517c67d2d29 | |
parent | e05d0df704a0f4ccfddc040c7e451fdd2370f050 (diff) |
round-robin.sh: Fix rsync in update_baseline.
See inline comments for details.
Change-Id: I22029c29185daf61e81309dbb266f233e06fafba
-rw-r--r-- | round-robin.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/round-robin.sh b/round-robin.sh index fe8a5974..8227d38e 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -392,10 +392,13 @@ update_baseline () git -C base-artifacts reset --hard $prev_head fi - # Rsync current artifacts. + # Rsync current artifacts. Make sure to use -I rsync option since + # quite often size and timestamp on artifacts/results will be the same + # as on base-artifacts/results due to "git reset --hard HEAD^" below. + # This caused rsync's "quick check" heuristic to skip "results" file. # !!! From this point on, logs and other artifacts won't be included # in base-artifacts.git repo (though they will be uploaded to jenkins). - rsync -a --del --exclude /.git ${rr[top_artifacts]}/ base-artifacts/ + rsync -aI --del --exclude /.git ${rr[top_artifacts]}/ base-artifacts/ local rev_count if [ x"$amend" = x"" ]; then @@ -432,7 +435,8 @@ update_baseline () $(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. + # in the rsync above. This should be fixed by "-I" rsync option, but + # keep below asserts just in case. if [ x"$(diff -up ${rr[top_artifacts]}/results base-artifacts/results)" != x"" ] \ || [ x"$amend" = x"" -a x"$(git -C base-artifacts diff HEAD HEAD^ -- results)" = x"" ]; then cd base-artifacts |