summaryrefslogtreecommitdiff
path: root/tcwg_kernel-bisect.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-01-20 09:37:50 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-01-22 13:40:46 +0000
commitcb9f3c0be4f69e25b172b3591477d4cddf5adb2b (patch)
tree6344c76550408fe92a96d3153632c40380de93d2 /tcwg_kernel-bisect.sh
parent32e2f0a24eebd8dc1222b77c1b9ce2ef43c8ac87 (diff)
tcwg_kernel*: Correct names of *_rev variables.
At the moment *_rev variables, such as current_rev, accept both git branches and git revisions (SHA1s) as values, which is confusing and makes it difficult to write code for manifest generation (manifests need all GIT references resolved at the moment of generation so that reproduction runs sees the "old" state of world). This change standardize the meaning of *_branch and *_rev suffices: *_branch variables accept either SHA1s or git branches and *_rev variables accept only SHA1s. With the established meanings, $bad_rev and $baseline_rev parameters of tcwg_kernel-bisect.sh script can only be SHA1s (which they are anyway in all reasonable cases), which allowed to simplify handling of a few things in tcwg_kernel-bisect.sh script. Change-Id: Ifc52385e4d3aeab2a3b6945fa6e1c88bcc2c7b6d
Diffstat (limited to 'tcwg_kernel-bisect.sh')
-rwxr-xr-xtcwg_kernel-bisect.sh21
1 files changed, 5 insertions, 16 deletions
diff --git a/tcwg_kernel-bisect.sh b/tcwg_kernel-bisect.sh
index df37dcc9..9bfe6eaf 100755
--- a/tcwg_kernel-bisect.sh
+++ b/tcwg_kernel-bisect.sh
@@ -13,8 +13,6 @@ fresh_dir $artifacts "$artifacts/manifests/*" "$artifacts/jenkins/*"
convert_args_to_variables "$@"
shift "$SHIFT_CONVERTED_ARGS"
-bad_rev="${bad_rev:-default}"
-baseline_rev="${baseline_rev:-baseline}"
BUILD_URL="${BUILD_URL:-$(pwd)}"
reproduce_bisect="${reproduce_bisect:-false}"
@@ -22,7 +20,7 @@ reproduce_bisect="${reproduce_bisect:-false}"
convert_args_to_variables ^^ $reproduce_bisect %% $artifacts/manifests/build-parameters.sh "$@"
$reproduce_bisect || manifest_pop
-obligatory_variables current_project toolchain
+obligatory_variables bad_rev baseline_rev current_project toolchain
linux_config="${linux_config:-defconfig}"
target="${target:-native}"
@@ -34,13 +32,6 @@ if $verbose; then set -x; fi
trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\" > $artifacts/failures" EXIT
-if [ x"$bad_rev" = x"default" ]; then
- echo "ERROR: Need explicit --bad_rev"
- exit 1
-else
- bad_rev=$(git -C $current_project rev-parse "$bad_rev")
-fi
-
# Build baseline that we are going to re-use to speed-up bisection.
# (This also confirms that infrastructure is OK.)
echo "Testing baseline_rev $baseline_rev (should be success)"
@@ -49,7 +40,7 @@ $scripts/tcwg_kernel-build.sh \
%% $artifacts/manifests/build-baseline.sh \
@@ $artifacts/manifests/build-parameters.sh \
--mode "baseline" \
- --current_rev "$baseline_rev" \
+ --current_branch "$baseline_rev" \
--reset_baseline true \
--top_artifacts "$artifacts/build-baseline" \
--verbose "$verbose"
@@ -58,8 +49,6 @@ assert ! [ -f $artifacts/failures ]
cd $current_project
-# Remember $good_rev from the baseline build above.
-baseline_rev=$(git rev-parse HEAD)
ln -f -s "build-baseline" "$artifacts/build-$baseline_rev"
ln -f -s "build-baseline.sh" "$artifacts/manifests/build-$baseline_rev.sh"
echo "$baseline_rev" >> $artifacts/good_revs
@@ -142,7 +131,7 @@ EOF
clone_or_update_repo . refs/remotes/mainline/master "$url"
mainline_master="${mainline_master-$(git merge-base $bad_rev HEAD)}"
cat <<EOF | manifest_out
-declare -g mainline_master=$mainline_rev
+declare -g mainline_master=$mainline_master
EOF
try_revs+=($mainline_master)
@@ -177,7 +166,7 @@ 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
+current_branch=$bad_rev
EOF
rm -f $artifacts/jenkins/mail-recipients.txt
trap "" EXIT
@@ -360,7 +349,7 @@ EOF
# regressions (worse than $bad_rev).
cat > $artifacts/trigger-1-reset-baseline <<EOF
current_project=$current_project
-current_rev=$first_bad
+current_branch=$first_bad
reset_baseline=true
EOF