summaryrefslogtreecommitdiff
path: root/round-robin-bisect.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2022-08-09 13:28:12 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2022-08-10 10:18:24 +0000
commit90ca8ebf5c91bf5bd4d21e4327b6e813094f84ca (patch)
tree67bcc7b31a6d43ca8d2e0a9e164a22c41e7611cf /round-robin-bisect.sh
parenta496dfe077efaf7ae47214e62cf646fbb708cdab (diff)
round-robin-bisect.sh: Trigger builds for last-good revisions
... so that we have a record of regression before/after first-bad commit. Also, cleanup an unnecessary setting of "baseline", which is the default. Change-Id: Ied89ee7ae93e54009e0d67f6435917aa2ed4bd67
Diffstat (limited to 'round-robin-bisect.sh')
-rwxr-xr-xround-robin-bisect.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh
index 7855baed..31119420 100755
--- a/round-robin-bisect.sh
+++ b/round-robin-bisect.sh
@@ -588,9 +588,6 @@ else
[ x"$last_good" != x"" ]
if [ x"$last_good" != x"$baseline_rev" ]; then
- cat > $artifacts/trigger-build-1-advance <<EOF
-${current_project}_git=$bad_url#$last_good
-EOF
sed -i -e "s/\$/-advance-baseline/" $artifacts/jenkins/build-name
else
# Reset baseline to the earliest bad revision with a true regression.
@@ -606,9 +603,19 @@ EOF
notify_devs=false
fi
-# Bisect if officially over.
+# Bisect is officially over.
# Create trigger-build-* files for subsequent builds.
+
+# Advance the baseline to $last_good revision. Don't trigger unnecessary
+# build for $baseline_rev itself.
+if [ x"$last_good" != x"$baseline_rev" ]; then
+ assert_with_msg "last_good should not be empty" [ x"$last_good" != x"" ]
+ cat > $artifacts/trigger-build-1-last-good <<EOF
+${current_project}_git=$bad_url#$last_good
+EOF
+fi
+
if ! [ -f $artifacts/build-$bad_rev/trigger-build-$current_project ]; then
# This can happen *only* when replaying bisects.
# Otherwise $bad_rev is always tested second to $baseline_rev.
@@ -634,13 +641,13 @@ if [ x"$reset_rev" != x"" ]; then \
# Reset baseline to the regressed commit so that we will catch subsequent
# regressions (worse than $bad_rev).
cp $artifacts/build-$reset_rev/trigger-build-$current_project \
- $artifacts/trigger-build-1-reset
- echo "update_baseline=force" >> $artifacts/trigger-build-1-reset
+ $artifacts/trigger-build-2-reset
+ echo "update_baseline=force" >> $artifacts/trigger-build-2-reset
fi
# Trigger master build now instead of waiting for next timed SCM trigger.
cp $artifacts/build-$bad_rev/trigger-build-$current_project \
- $artifacts/trigger-build-2-default
+ $artifacts/trigger-build-3-default
# Save BISECT_* logs
find "$current_project" -path "$current_project/.git/BISECT_*" -print0 | xargs -0 -I@ mv @ $artifacts/git-logs/