summaryrefslogtreecommitdiff
path: root/round-robin-bisect.sh
diff options
context:
space:
mode:
Diffstat (limited to 'round-robin-bisect.sh')
-rwxr-xr-xround-robin-bisect.sh24
1 files changed, 8 insertions, 16 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