diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-08-15 08:35:02 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-08-15 08:43:41 +0000 |
commit | 3c3ee38c8d05f3935d2a904ade8c6509f65b878b (patch) | |
tree | 8b0a22ffe3fa98268f827fb25f93802305304ae4 | |
parent | 33da85c344b089a89dd16cdfb30d67dda4bafbc9 (diff) |
round-robin.sh (check_regression): Fix generation of trigger-build-*
... files for bisect builds. Generate these files for "ignore"
update_baseline mode, which is what bisect test builds now use.
This problem with trigger-build-* files was introduced when we
switched bisect builds from "update/onsuccess" mode to "ignore"
mode.
Also, as a general cleanup, simplify relevant if-then-else conditions.
Change-Id: I05c490120b097c7ca7fb095ee50f10602b057e4e
-rw-r--r-- | round-robin.sh | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/round-robin.sh b/round-robin.sh index 83dfbb15..6be66f57 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -728,7 +728,7 @@ check_regression () single_component=$(print_single_updated_component) local trigger_dest - if [ x"${rr[update_baseline]}" = x"onsuccess" ]; then + if [ x"${rr[update_baseline]}" != x"force" ]; then # We are seeing a failure, so instead of updating baseline start # reducing/bisecting the failure. Create trigger-* files at top level # where jenkins expects them -- and trigger the followup builds. @@ -740,20 +740,16 @@ check_regression () trigger_dest="$run_step_artifacts" fi - # 1. If $score is less-than 0, then the regression is not very - # interesting, so reduce down to component, but don't bisect. This - # allows non-broken components to advance their revisions. - # 2. Otherwise, trigger builds with narrowed-down list of updated - # components -- by generating trigger-build-* files. Also generate - # these files as a favor to round-robin-bisect.sh script. - # 3. Otherwise, we have narrowed-down regression to a single component, - # so trigger bisect build for this component -- by generating - # trigger-bisect file. Note that the negative "! [ $score -lt 0 ]" - # condition is to handle non-numeric scores like "all" and "boot". - if [ $score -lt 0 ] 2>/dev/null && [ x"${rr[mode]}" = x"bisect" ]; then - # Don't bisect uninteresting regressions. - : - elif [ x"$single_component" = x"" ] || [ x"${rr[mode]}" = x"bisect" ]; then + if [ x"$single_component" = x"" ] \ + || { [ x"${rr[mode]}" = x"bisect" ] \ + && ! [ $score -lt 0 ] 2>/dev/null; }; then + # If we have several changed components, then trigger individual builds + # for these components to narrow down the problem to a single component. + # Also generate trigger-build-* files as a favor to + # round-robin-bisect.sh script to distinguish "bad" from "skip" builds + # and to provide templates for triggering follow-up builds. + # Note that the negative "! [ $score -lt 0 ]" condition is to handle + # non-numeric scores like "all" and "boot". local -a update_components while read -a update_components; do @@ -765,11 +761,16 @@ check_regression () echo "${c}_git=${rr[${c}_git]}" fi done > $trigger_dest/trigger-build-$update_components2 + # Add update_baseline setting to the parameters, so that + # "ignore" builds will trigger "ignore" reduction builds. + echo "update_baseline=${rr[update_baseline]}" \ + >> $trigger_dest/trigger-build-$update_components2 done < <(${rr[breakup_updated_components]}) - elif ! [ $score -lt 0 ] 2>/dev/null; then - # Bisect failures in all steps after "-1" step. - local cur_rev - cur_rev=$(git -C $single_component rev-parse HEAD) + elif [ x"$single_component" != x"" ] \ + && ! [ $score -lt 0 ] 2>/dev/null; then + # Trigger bisect failures in a single changed component in all steps + # with a positive result. If $score is less-than 0, then + # the regression is not very interesting, so don't bisect. cat > $trigger_dest/trigger-bisect <<EOF current_project=$single_component |