From d04c755cb2852cb088990d94dc7ae88b4e5ef656 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Tue, 5 Jan 2021 19:30:18 +0000 Subject: round-robin-bisect.sh: Make logic of handling successful bisects more robust Now on successful bisects we always have either a confirmed regression or a restarted bisect. Change-Id: Ic8600fa85c7b511063ddf5bbbbff31021a8b9535 --- round-robin-bisect.sh | 57 ++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh index 8a49e0c0..016d0883 100755 --- a/round-robin-bisect.sh +++ b/round-robin-bisect.sh @@ -343,6 +343,8 @@ touch ../interesting-commits/$current_project # Generate list of commits inside the bisection range. commits_to_test=$artifacts/git-logs/commits_to_test git bisect view --pretty=%H > $commits_to_test +orig_commits_to_test=$artifacts/git-logs/orig_commits_to_test +cp $commits_to_test $orig_commits_to_test # This loop can generate lots of console noise. set +x while [ x"$(get_first_bad $artifacts/first-bad + # Add both $last_good and $first_bad to interesting commits. + push_interesting_commit $last_good "last-good" + push_interesting_commit $first_bad "regression" + if [ x"$push_interesting_commit_result" = x"125" ]; then + notify_devs=false + fi else - # It seems $last_good was on a path that tested good, even though - # it itself is bad. - # - # We need to be careful to avoid re-trigger loops - assert_with_msg "Last good is not an ancestor of bad rev!" \ - git merge-base --is-ancestor $last_good $bad_rev - if git merge-base --is-ancestor $baseline_rev $last_good; then - # $last_good is a child of $baseline_rev, so we can re-trigger - # bisection with reduced bisection range. - cat > $artifacts/trigger-bisect < $artifacts/trigger-bisect < $artifacts/jenkins/mail-recipients.txt - trap "" EXIT - exit 0 - fi - # This case will be handled similar to "git bisect run" failure below. - # We are going to reset baseline to $first_bad. + sed -i -e "s/\$/-retry-bisect/" $artifacts/jenkins/build-name + # Don't send any emails. + echo > $artifacts/jenkins/mail-recipients.txt + trap "" EXIT + exit 0 fi else # When "git bisect run" fails, e.g., due to merge-base of $baseline_rev and -- cgit v1.2.3