diff options
author | David Spickett <david.spickett@linaro.org> | 2020-04-22 15:24:49 +0100 |
---|---|---|
committer | David Spickett <david.spickett@linaro.org> | 2020-04-23 12:54:33 +0100 |
commit | 52eb5a521c093601e3fba856599288bad7a5d96f (patch) | |
tree | 0e8a0c567c9d727becf411078f44cfc619c5f954 /round-robin-bisect.sh | |
parent | 2382c087b5f0d51a4556c8c62f4723ab5a0ab7c9 (diff) |
Shellcheck fixes round 2
Also update the sanity check
script to include .job files.
Change-Id: Ibf72d9ff346ff7b012d4e282a6ac8f3b7e73590d
Diffstat (limited to 'round-robin-bisect.sh')
-rwxr-xr-x | round-robin-bisect.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh index 2e3cc090..25bb69c6 100755 --- a/round-robin-bisect.sh +++ b/round-robin-bisect.sh @@ -37,6 +37,7 @@ 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 @@ -45,10 +46,12 @@ if [ x"$bad_branch" = x"$baseline_branch" ]; then exit 0 fi +# shellcheck disable=SC2064 trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\" > $artifacts/failures" EXIT rebase_workaround=false +# shellcheck disable=SC2154 case "${rr[ci_project]}/${rr[ci_config]}:$current_project" in tcwg_kernel/*-next-*:linux) # Workaround linux-next/master rebasing on top of linux-next/stable. @@ -70,6 +73,7 @@ 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)" +# shellcheck disable=SC2154 $build_script \ ^^ $reproduce_bisect \ %% $rel_artifacts/manifests/build-baseline.sh \ @@ -103,7 +107,7 @@ else fi # Hard-link BISECT_LOG inside $artifacts to guarantee its upload to jenkins. -ln -f $(pwd)/.git/BISECT_LOG $artifacts/git-logs/bisect_log +ln -f "$(pwd)"/.git/BISECT_LOG $artifacts/git-logs/bisect_log if ! git bisect log | grep -q "^git bisect .* $baseline_rev\$"; then git bisect good $baseline_rev @@ -343,6 +347,7 @@ while [ x"$(get_first_bad </dev/null)" = x"" ] && read -a arr; do sha1="${arr[0]}" # Skip $bad_rev and $baseline_rev, these were already tested. if git bisect log | grep -q "^git bisect .* $sha1\$"; then + # shellcheck disable=SC2106 continue fi @@ -361,6 +366,7 @@ while [ x"$(get_first_bad </dev/null)" = x"" ] && read -a arr; do fi done if $skip; then + # shellcheck disable=SC2106 continue fi @@ -473,7 +479,7 @@ if [ -f $artifacts/first-bad ]; then ln -f -s "build-$last_good.sh" "$artifacts/manifests/build-last_good.sh" occurences="$(cat interesting-commits/$current_project | grep "^$first_bad" | sed -e "s/^$first_bad *//" | tr ' ' '\n' | sed "s#^# - #")" - if [ $(echo "$occurences" | wc -l) -le 1 ]; then + if [ "$(echo "$occurences" | wc -l)" -le 1 ]; then git_log_level="medium" else git_log_level="short" |