summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2020-05-29 15:20:21 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2020-05-29 15:24:37 +0000
commit75019552b97c7ca46083dacf80789df24faf5a92 (patch)
tree45b7da23c2f8cd50154eb0f4af01d21160a93beb
parentdb1c5bf29c63069c7a6d728dcc44c91588d5cb9b (diff)
round-robin.sh: Use implicit baseline when triggering bisect
Change-Id: Ide6dbb22152a5096ba21667f497f2571384579de
-rwxr-xr-xround-robin-bisect.sh24
-rw-r--r--round-robin.sh7
2 files changed, 14 insertions, 17 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh
index dde6e8db..d44a2e18 100755
--- a/round-robin-bisect.sh
+++ b/round-robin-bisect.sh
@@ -17,7 +17,7 @@ fresh_dir $artifacts "$artifacts/manifests/*" "$artifacts/jenkins/*"
convert_args_to_variables "$@"
shift "$SHIFT_CONVERTED_ARGS"
-obligatory_variables bad_branch baseline_branch build_script current_project
+obligatory_variables bad_url bad_branch build_script current_project
BUILD_URL="${BUILD_URL:-$(pwd)}"
replay_log="${replay_log-}"
@@ -38,19 +38,11 @@ if $verbose; then set -x; fi
mkdir -p $artifacts/jenkins
touch $artifacts/jenkins/build-name
-# shellcheck disable=SC2154
-if [ x"$bad_branch" = x"$baseline_branch" ]; then
- echo "WARNING: bad_branch and baseline_branch are same: $bad_branch"
- echo > $artifacts/jenkins/mail-recipients.txt
- sed -i -e "s/\$/-same/" $artifacts/jenkins/build-name
- trap "" EXIT
- exit 0
-fi
-
# shellcheck disable=SC2064
trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\" > $artifacts/failures" EXIT
rebase_workaround=false
+rebase_workaround_opts=()
# shellcheck disable=SC2154
case "${rr[ci_project]}/${rr[ci_config]}:$current_project" in
@@ -65,25 +57,25 @@ case "${rr[ci_project]}/${rr[ci_config]}:$current_project" in
cat <<EOF | manifest_out
declare -g linux_next_stable=$linux_next_stable
EOF
- echo "Rebase workaround: forcing baseline_rev to $linux_next_stable"
- baseline_rev=$linux_next_stable
+ echo "Rebase workaround: forcing linux baseline to $linux_next_stable"
rebase_workaround=true
+ rebase_workaround_opts+=("==rr[linux_branch]" "$linux_next_stable")
;;
esac
# Build baseline that we are going to re-use to speed-up bisection.
# (This also confirms that infrastructure is OK.)
-echo "Testing baseline_branch $baseline_branch (should be success)"
+echo "Testing baseline (should be success)"
# shellcheck disable=SC2154
$build_script \
^^ $reproduce_bisect \
%% $rel_artifacts/manifests/build-baseline.sh \
@@ $rel_artifacts/manifests/build-parameters.sh \
==rr[mode] "baseline" \
- ==rr[${current_project}_branch] "$baseline_branch" \
==rr[update_baseline] init \
==rr[top_artifacts] "$rel_artifacts/build-baseline" \
- --verbose "$verbose"
+ --verbose "$verbose" \
+ "${rebase_workaround_opts[@]}"
baseline_rev="${baseline_rev-$(git -C ${current_project} rev-parse HEAD)}"
cat <<EOF | manifest_out
@@ -437,7 +429,7 @@ if [ x"$first_bad" != x"" ]; then
# bisection with reduced bisection range.
cat > $artifacts/trigger-bisect <<EOF
current_project=$current_project
-baseline_branch=$baseline_rev
+bad_url=$bad_url
bad_branch=$last_good
EOF
sed -i -e "s/\$/-last_good-bad/" $artifacts/jenkins/build-name
diff --git a/round-robin.sh b/round-robin.sh
index 957ce44c..e5a1164a 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -592,9 +592,14 @@ No reason to rebase base-artifacts."
baseline_rev=$(git_rev_parse_long $single_component ${rr[baseline_branch]} baseline)
cur_rev=$(git -C $single_component rev-parse HEAD)
+ if [ x"$baseline_rev" = x"$cur_rev" ]; then
+ echo "WARNING: Detected regression with no change in sources of $single_component"
+ false
+ fi
+
cat > $trigger_dest/trigger-bisect <<EOF
current_project=$single_component
-baseline_branch=$baseline_rev
+bad_url=${rr[${single_component}_url]}
bad_branch=$cur_rev
EOF
if [ -f $run_step_artifacts/extra-bisect-params ]; then