diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-12 08:34:25 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-18 15:30:52 +0000 |
commit | e7b992985284c335eaec9a333c0a80c92f7a93ec (patch) | |
tree | 40638df875df5bd63802615afd226ea260718a15 | |
parent | 21cb97b04552ac9e8a26392f811e24ab23e937eb (diff) |
tcwg_kernel-bisect.sh: Use rr[ci_config] instead of its sub-items
Replaces uses of ${rr[linux_version]} and $toolchain with
${rr[ci_config]}, which makes code more generic.
Change-Id: I27030c467b3bdb448aa2dbed36272b93726789cb
-rwxr-xr-x | tcwg_kernel-bisect.sh | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/tcwg_kernel-bisect.sh b/tcwg_kernel-bisect.sh index 45a6aaf0..8ab8a014 100755 --- a/tcwg_kernel-bisect.sh +++ b/tcwg_kernel-bisect.sh @@ -29,10 +29,6 @@ obligatory_variables rr[current_project] rr[ci_config] current_project=${rr[current_project]} -if [ x"${rr[ci_project]}" = x"tcwg_kernel" ]; then - obligatory_variables toolchain -fi - verbose="${verbose:-true}" set -u @@ -43,21 +39,22 @@ trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\" > $artifacts/fai rebase_workaround=false -if [ x"${rr[ci_project]}" = x"tcwg_kernel" ] \ - && [ x"$current_project" = x"linux" -a x"${rr[linux_version]}" = x"next" ]; then - # Workaround linux-next/master rebasing on top of linux-next/stable. - # Search for regressions against linux-mainline:master (aka linux-next:stable). - clone_or_update_repo $current_project stable ${rr[linux_url]} - # Just in case linux-next:stable has advanced between the build and bisect jobs, - # use merge base between linux-next:stable and $bad_rev. - linux_next_stable="${linux_next_stable-$(git -C $current_project merge-base HEAD $bad_rev)}" - cat <<EOF | manifest_out +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. + # Search for regressions against linux-mainline:master (aka linux-next:stable). + clone_or_update_repo $current_project stable ${rr[linux_url]} + # Just in case linux-next:stable has advanced between the build and bisect jobs, + # use merge base between linux-next:stable and $bad_rev. + linux_next_stable="${linux_next_stable-$(git -C $current_project merge-base HEAD $bad_rev)}" + cat <<EOF | manifest_out declare -g linux_next_stable=$linux_next_stable EOF - echo "Rebase workaround: forcing baseline_rev to $linux_next_stable" - baseline_rev=$linux_next_stable - rebase_workaround=true -fi + echo "Rebase workaround: forcing baseline_rev to $linux_next_stable" + baseline_rev=$linux_next_stable + rebase_workaround=true + ;; +esac # Build baseline that we are going to re-use to speed-up bisection. # (This also confirms that infrastructure is OK.) @@ -337,14 +334,12 @@ fi # Set mail recipients last to preserve catch-error value from .yaml file. # Email developers. CI_MAIL_RECIPIENTS="tcwg-validation@linaro.org" -if [ x"${rr[ci_project]}" = x"tcwg_kernel" ]; then - case "$toolchain:$current_project" in - gnu:linux) ;; - gnu:*) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, christophe.lyon@linaro.org, maxim.kuvyrkov@linaro.org" ;; - llvm:linux) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, arnd@linaro.org, mark.brown@linaro.org, ndesaulniers@google.com, trong@google.com" ;; - llvm:llvm) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, adhemerval.zanella@linaro.org, maxim.kuvyrkov@linaro.org, ndesaulniers@google.com, trong@google.com, yvan.roux@linaro.org" ;; - esac -fi +case "${rr[ci_project]}/${rr[ci_config]}:$current_project" in + tcwg_kernel/gnu-*:linux) ;; + tcwg_kernel/gnu-*:*) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, christophe.lyon@linaro.org, maxim.kuvyrkov@linaro.org" ;; + tcwg_kernel/llvm-*:linux) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, arnd@linaro.org, mark.brown@linaro.org, ndesaulniers@google.com, trong@google.com" ;; + tcwg_kernel/llvm-*:llvm) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, adhemerval.zanella@linaro.org, maxim.kuvyrkov@linaro.org, ndesaulniers@google.com, trong@google.com, yvan.roux@linaro.org" ;; +esac cat > $artifacts/jenkins/mail-recipients.txt <<EOF $CI_MAIL_RECIPIENTS EOF |