summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtcwg_kernel-bisect.sh57
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: