summaryrefslogtreecommitdiff
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
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
-rwxr-xr-xround-robin-bisect.sh21
-rw-r--r--round-robin.sh4
2 files changed, 16 insertions, 9 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/
diff --git a/round-robin.sh b/round-robin.sh
index a1fe2fcd..59906503 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -170,6 +170,8 @@ clone_repo ()
fi
# For a short time manifests used "debug" array, so we need
# to declare it when sourcing these manifests.
+
+ # shellcheck disable=SC2034
declare -A debug
url=$(source $base_manifest; echo "${rr[${project}_url]-}")
branch=$(source $base_manifest; echo "${rr[${project}_rev]-}")
@@ -708,8 +710,6 @@ check_regression ()
for c in ${rr[components]}; do
if echo "${update_components[@]}" | tr ' ' '\n' | grep -q "^$c\$"; then
echo "${c}_git=${rr[${c}_git]}"
- else
- echo "${c}_git=baseline"
fi
done > $trigger_dest/trigger-build-$update_components2
done < <(${rr[breakup_updated_components]})