From f60d6544630e44563c6faee2bc6ad7ebff71c974 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Tue, 12 Feb 2019 09:46:05 +0000 Subject: [rr-many 6/N] Improve update_baseline Be more deliberate in preserving "first-bad" commit in the base-artifacts repo. Create a marker file reset-baseline for such builds. Also prepend the commit message title with number of pending commits, which is roughly twice the number of pending regressions. Change-Id: I14e16d893cab12637b71037665c8aee9b6ef24f1 --- round-robin.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/round-robin.sh b/round-robin.sh index 379b4971..8d903903 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -387,7 +387,8 @@ update_baseline () # For every regression we want to keep artifacts for the first-bad # build, so discard one less than needed. - if [ x"$prev_head" != x"" ]; then + if [ x"$prev_head" != x"" -a -f base-artifacts/reset-baseline ] \ + && ! ${rr[reset_baseline]}; then git -C base-artifacts reset --hard $prev_head fi @@ -396,6 +397,23 @@ update_baseline () # in base-artifacts.git repo (though they will be uploaded to jenkins). rsync -a --del --exclude /.git ${rr[top_artifacts]}/ base-artifacts/ + local rev_count + if [ x"$amend" = x"" ]; then + rev_count=$(git -C base-artifacts rev-list --count HEAD) + else + rev_count="0" + fi + + local msg_title="$rev_count" + + if ${rr[reset_baseline]}; then + # Create a marker for builds that reset baselines (these are builds + # for bisected regressions). + touch base-artifacts/reset-baseline + msg_title="$msg_title: first-bad" + else + msg_title="$msg_title: last-good" + fi local single_component single_component=$(print_single_updated_component) -- cgit v1.2.3