summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-20 02:49:03 +0300
committerSimon Glass <sjg@chromium.org>2023-07-24 18:34:11 +0300
commit6a0c7b4a5eabf021d646d4435b00947529ebd13b (patch)
tree9d375c5e0974ab9b0027bfc3df2ffc2fd66a045a
parent988b91687dcff95be95a5fe5deea1d1840d6efce (diff)
downloadu-boot-6a0c7b4a5eabf021d646d4435b00947529ebd13b.tar.xz
buildman: Add a test for --boards
Add a simple functional test for the --boards option. Fix the example in the docs while we are here. Also improve the docs for Builder.count so it is clearer what it contains. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/buildman/builder.py3
-rw-r--r--tools/buildman/buildman.rst2
-rw-r--r--tools/buildman/func_test.py11
3 files changed, 14 insertions, 2 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index cb3628a8a0..620b7b8c31 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -163,7 +163,8 @@ class Builder:
checkout: True to check out source, False to skip that step.
This is used for testing.
col: terminal.Color() object
- count: Number of commits to build
+ count: Total number of commits to build, which is the number of commits
+ multiplied by the number of boards
do_make: Method to call to invoke Make
fail: Number of builds that failed due to error
force_build: Force building even if a build already exists
diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst
index a94957ba31..dcccae932e 100644
--- a/tools/buildman/buildman.rst
+++ b/tools/buildman/buildman.rst
@@ -159,7 +159,7 @@ on the command line:
.. code-block:: bash
- buildman --boards sandbox,snow --boards
+ buildman --boards sandbox,snow --boards firefly-rk3399
It is convenient to use the -n option to see what will be built based on
the subset given. Use -v as well to get an actual list of boards.
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index 6b6afe7d1c..aaf4cde91e 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -1047,3 +1047,14 @@ endif
self._RunControl('-x', 'board2', '-x' 'board4')
self.assertEqual(['board0', 'board1'],
[b.target for b in self._boards.get_selected()])
+
+ def test_single_boards(self):
+ """Test building single boards"""
+ self._RunControl('--boards', 'board1')
+ self.assertEqual(1, self._builder.count)
+
+ self._RunControl('--boards', 'board1', '--boards', 'board2')
+ self.assertEqual(2, self._builder.count)
+
+ self._RunControl('--boards', 'board1,board2', '--boards', 'board4')
+ self.assertEqual(3, self._builder.count)