diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-10-17 08:05:58 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-11-26 15:02:55 +0000 |
commit | 95c5ba52a8caa096a9bbc670357eefc41b5064e8 (patch) | |
tree | a1d36149484dbf12b372efbb33ebaccc81ceaa5d /round-robin.sh | |
parent | 588a4354f090d739d0f78aee23d32d46d0c1878b (diff) |
round-robin.sh: Optimize splitting builds to narrow regression
... down to a component. E.g., in tcwg_bmk-gnu-* builds we track
binutils, gcc and glibc, but most regressions happen due to gcc
changes. Therefore instead of splitting binutils+gcc+glibc build
into builds for binutils, gcc and glibc it is better to trigger
binutils+glibc and gcc builds. If the regression does occur in
binutils+glibc build, then it will be split into binutils and glibc
builds.
Change-Id: Ifd2effea69fe17b3271645f9a6c1e482cb79ceac
Diffstat (limited to 'round-robin.sh')
-rw-r--r-- | round-robin.sh | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/round-robin.sh b/round-robin.sh index 099d514b..0c6da0ed 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -49,6 +49,10 @@ declare -gA rr # 2 sets of results. rr[no_regression_p]=no_regression_p +# Hook to break up updated component (see print_updated_components) into +# smaller sets: print one set per line. By default, breakup into singletons. +rr[breakup_updated_components]=breakup_updated_components + # Print round-robin components that are being updated in this build # (the ones using non-baseline branches). print_updated_components () @@ -67,6 +71,12 @@ print_updated_components () ) } +# By default, print each component on its own line. +breakup_updated_components () +{ + print_updated_components "\n" +} + # Print the single round-robin component being updated in this build. # Print nothing if multiple components are being updated. print_single_updated_component () @@ -480,17 +490,20 @@ check_regression () local single_component=$(print_single_updated_component) if [ x"$single_component" = x"" -o x"${rr[mode]}" = x"bisect" ]; then - local c - for c in $(print_updated_components); do - local c2 - for c2 in ${rr[components]}; do - if [ x"$c" = x"$c2" ]; then - echo "${c2}_branch=${rr[${c}_branch]}" + local -a update_components + + while read -a update_components; do + local c update_components2 + update_components2=$(echo "${update_components[@]}" | tr ' ' '-') + + for c in ${rr[components]}; do + if echo "${update_components[@]}" | tr ' ' '\n' | grep -q "^$c\$"; then + echo "${c}_branch=${rr[${c}_branch]}" else - echo "${c2}_branch=baseline" + echo "${c}_branch=baseline" fi - done >> ${rr[top_artifacts]}/trigger-build-$c - done + done > ${rr[top_artifacts]}/trigger-build-$update_components2 + done < <(${rr[breakup_updated_components]}) elif ! [ $score -lt -1 ] 2>/dev/null; then # Bisect failures in all steps after "-1" step. # Note, the negative above is to handle non-numeric scores like |