diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-20 12:27:49 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-21 15:26:47 +0000 |
commit | 1a60129203bf7933a360230e62cca84d9e8a00e7 (patch) | |
tree | 57fcf1c64b59368b94585d45cfbabe5c3a879db8 | |
parent | 76e0bb578316168c2de9e9d20a2259fd02f2b4f2 (diff) |
round-robin.sh: Fix base-artifacts grooming in update_baseline
To have a history of pending regressions we mark baseline resets
with reset-baseline file/marker (remember that resets correspond
to "first-bad" builds triggered by bisect job).
We have mistakenly tried to look for reset-baseline markers in
the current revision of base-artifacts, while we should have
looked in $prev_head revision. This patch fixes this and simplifies
overall grooming of regression history.
Change-Id: I3a819e6dfcdc2e8f02370216db001c00c067912b
-rw-r--r-- | round-robin.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/round-robin.sh b/round-robin.sh index 8227d38e..1512ca0e 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -372,23 +372,24 @@ update_baseline () # the current one, but keep entries for results that are better # (so that we have a record of pending regressions). while no_regression_p; do + prev_head="" if git -C base-artifacts rev-parse HEAD^ >/dev/null 2>&1; then - prev_head=$(git -C base-artifacts rev-parse HEAD) + # For every regression we want to keep artifacts for the first-bad + # build, so reset to the most relevant regression (marked by reset-baseline). + if [ -f base-artifacts/reset-baseline ] && ! ${rr[reset_baseline]}; then + prev_head=$(git -C base-artifacts rev-parse HEAD) + fi git -C base-artifacts reset --hard HEAD^ else # We got to the beginning of git history, so amend the current # commit. The initial state of baseline is "empty" branch, # which we treat as worst possible in no_regression_p(). amend="--amend" - prev_head="" break fi done - # For every regression we want to keep artifacts for the first-bad - # build, so discard one less than needed. - if [ x"$prev_head" != x"" -a -f base-artifacts/reset-baseline ] \ - && ! ${rr[reset_baseline]}; then + if [ x"$prev_head" != x"" ]; then git -C base-artifacts reset --hard $prev_head fi |