diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-19 14:37:34 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-21 14:27:28 +0000 |
commit | 73d563e61e0bd76c93f3639cc9e384322a56134c (patch) | |
tree | 7b7f663022b4a2a411c4c88cc907703c786019be | |
parent | 22b7df0e924a5194a0cea5c0389c9f79805d4a53 (diff) |
tcwg_kernel-bisect.sh: Remove --confirm_failure option
Confirm_failure option was added to quickly detect failures
due to infrastructure problems (e.g., git repos stop responding).
It is saner, simpler and quicker to rely on "baseline" build
to verify that infrastructure is OK, and reproduce "bad" build
just before starting bisection.
Change-Id: Iaf35b260f3ec0ccdf043ee8e03b33bde9ef4a649
-rwxr-xr-x | tcwg_kernel-bisect.sh | 57 |
1 files changed, 17 insertions, 40 deletions
diff --git a/tcwg_kernel-bisect.sh b/tcwg_kernel-bisect.sh index acee4fb4..3f4693cf 100755 --- a/tcwg_kernel-bisect.sh +++ b/tcwg_kernel-bisect.sh @@ -16,7 +16,6 @@ shift "$SHIFT_CONVERTED_ARGS" bad_rev="${bad_rev:-default}" baseline_rev="${baseline_rev:-baseline}" BUILD_URL="${BUILD_URL:-$(pwd)}" -confirm_failure="${confirm_failure:-false}" reproduce_bisect="${reproduce_bisect:-false}" # Process build args and record them in build-parameters.sh @@ -35,35 +34,7 @@ if $verbose; then set -x; fi trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\" > $artifacts/failures" EXIT -if $confirm_failure; then - # Make sure we are not about to bisect a sporadic failure. - echo "Testing bad_rev $bad_rev (hoping for failure)" - $scripts/tcwg_kernel-build.sh \ - ^^ $reproduce_bisect \ - %% $artifacts/manifests/build-bad.sh \ - @@ $artifacts/build-parameters.sh \ - --mode "baseline" \ - --current_rev "$bad_rev" \ - --top_artifacts "$artifacts/build-bad" \ - --verbose "$verbose" & - res=0 && wait $! || res=$? - - bad_rev=$(git -C $current_project rev-parse HEAD) - if [ x"$res" = x"0" ]; then - # Build job had a spurious failure. Re-try. - cat > $artifacts/trigger-2-build-master <<EOF -current_project=$current_project -current_rev=$bad_rev -EOF - trap "" EXIT - exit 0 - fi - mv "$artifacts/build-bad" "$artifacts/build-$bad_rev" - mv "$artifacts/manifests/build-bad.sh" "$artifacts/manifests/build-$bad_rev.sh" - ln -s "build-$bad_rev" "$artifacts/build-bad" - ln -s "build-$bad_rev.sh" "$artifacts/manifests/build-bad.sh" - echo "$bad_rev" >> $artifacts/bad_revs -elif [ x"$bad_rev" = x"default" ]; then +if [ x"$bad_rev" = x"default" ]; then echo "ERROR: Need explicit --bad_rev" exit 1 else @@ -205,20 +176,26 @@ fi ln -s "build-$good_rev" "$artifacts/build-good" ln -s "build-$good_rev.sh" "$artifacts/manifests/build-good.sh" -if ! $confirm_failure; then - git checkout --detach $bad_rev - ../bisect-run.sh & - res=0 && wait $! || res=$? - if [ x"$res" = x"0" ]; then - echo "ERROR: build for bad_rev $bad_rev succeeded" - exit 1 - fi +git checkout --detach $bad_rev +$artifacts/test.sh & +res=0 && wait $! || res=$? - ln -s "build-$bad_rev" "$artifacts/build-bad" - ln -s "build-$bad_rev.sh" "$artifacts/manifests/build-bad.sh" +if [ x"$res" = x"0" ]; then + echo "WARNING: build for bad_rev $bad_rev succeeded" + # Build job had a spurious failure. Re-try. + cat > $artifacts/trigger-2-build-master <<EOF +current_project=$current_project +current_rev=$bad_rev +EOF + rm -f $artifacts/jenkins/mail-recipients.txt + trap "" EXIT + exit 0 fi +ln -f -s "build-$bad_rev" "$artifacts/build-bad" +ln -f -s "build-$bad_rev.sh" "$artifacts/manifests/build-bad.sh" + git bisect start $bad_rev $good_rev 2>&1 | tee $artifacts/bisect.log # "git bisect run" can fail (exit with non-zero) in a number of cases: |