diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-08-11 20:04:28 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-08-11 20:04:28 +0000 |
commit | 4a9de24941f3cade7d402d9d858f0c4dc68498c9 (patch) | |
tree | e89c8ef5c82227ffa884d6e0d92cd8f49b8d8e38 | |
parent | bc30ef39baae1db8fa6e58533ca20fdf78dca1e8 (diff) |
tcwg_gnu-build.sh: Optimize reducing regressions down to components
Change-Id: I03bcd0760a6141d971e68604c950d0cc6f94fb24
-rwxr-xr-x | tcwg_gnu-build.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tcwg_gnu-build.sh b/tcwg_gnu-build.sh index 3dd7cb89..784d425e 100755 --- a/tcwg_gnu-build.sh +++ b/tcwg_gnu-build.sh @@ -194,6 +194,34 @@ no_regression_p () ) } +# Implement rr[breakup_updated_components] hook. +tcwg_gnu_breakup_updated_components () +{ + ( + set -euf -o pipefail + + local cc="" + case "${rr[ci_project]}" in + *_check_*) + # Changes to "foo" of check_foo projects tend to cause the most + # regressions. + # Breakup updated components into "foo" and the rest of components + # to reduce the number of builds. + cc=$(echo "${rr[ci_project]}" | sed -e "s/.*_check_\(.*\)/\1/") + ;; + esac + + if print_updated_components "\n" | grep -q "^$cc\$"; then + echo "$cc" + print_updated_components "\n" | grep -v "^$cc\$" | tr '\n' ' ' | sed -e "s/ \$//g" + echo + else + print_updated_components "\n" + fi + ) +} +rr[breakup_updated_components]=tcwg_gnu_breakup_updated_components + run_step stop_on_fail -10 reset_artifacts run_step stop_on_fail x prepare_abe case "${rr[ci_project]}" in |