aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-05 13:18:49 +0100
committerSimon Glass <sjg@chromium.org>2023-07-12 09:48:17 -0600
commita1d8407814a5bb8e57654c6440a6d5dcd3de19ef (patch)
treebc7118a669c4e63b8481173e1a97b7b2ca52a1a7
parent67c896995697db50ff7fdc6a0787f9ee46a46d21 (diff)
downloadu-boot-a1d8407814a5bb8e57654c6440a6d5dcd3de19ef.zip
u-boot-a1d8407814a5bb8e57654c6440a6d5dcd3de19ef.tar.gz
u-boot-a1d8407814a5bb8e57654c6440a6d5dcd3de19ef.tar.bz2
buildman: Move commit numbering into determine_series()
Commits are numbered for use in tests. Do this in determine_series() since it is already dealing with the series. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/buildman/control.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 9ff9f20..a38798a 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -202,6 +202,9 @@ def count_commits(branch, count, col, git_dir):
def determine_series(selected, col, git_dir, count, branch, work_in_output):
"""Determine the series which is to be built, if any
+ If there is a series, the commits in that series are numbered by setting
+ their sequence value (starting from 0). This is used by tests.
+
Args:
selected (list of Board): List of Board objects that are marked
selected
@@ -254,6 +257,10 @@ def determine_series(selected, col, git_dir, count, branch, work_in_output):
# Honour the count
series = patchstream.get_metadata_for_list(branch,
git_dir, count, series=None, allow_overwrite=True)
+
+ # Number the commits for test purposes
+ for i, commit in enumerate(series.commits):
+ commit.sequence = i
else:
series = None
return series
@@ -571,9 +578,6 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None,
if series:
commits = series.commits
- # Number the commits for test purposes
- for i, commit in enumerate(commits):
- commit.sequence = i
else:
commits = None