summaryrefslogtreecommitdiff
path: root/tools/buildman/func_test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-19 17:48:38 -0600
committerSimon Glass <sjg@chromium.org>2023-07-24 09:34:11 -0600
commit26d9077c9dff63589e85efd7b4126fbe415ea511 (patch)
tree6dd803282b475dabd0ad9c58f1fceccb0d6e2b0b /tools/buildman/func_test.py
parentf0207d77b56772d83256d4eaa0729b4d0652f4ca (diff)
buildman: Add tests for excluding things
Add some tests for the -x flag. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/func_test.py')
-rw-r--r--tools/buildman/func_test.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index ca579a27c61..bd7db1e9c1f 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -1023,3 +1023,27 @@ endif
result = self._RunControl('-A', 'board0')
self.assertEqual('arm-\n', stdout.getvalue())
self.assertEqual('', stderr.getvalue())
+
+ def test_exclude_one(self):
+ """Test excluding a single board from an arch"""
+ self._RunControl('arm', '-x', 'board1')
+ self.assertEqual(['board0'],
+ [b.target for b in self._boards.get_selected()])
+
+ def test_exclude_arch(self):
+ """Test excluding an arch"""
+ self._RunControl('-x', 'arm')
+ self.assertEqual(['board2', 'board4'],
+ [b.target for b in self._boards.get_selected()])
+
+ def test_exclude_comma(self):
+ """Test excluding a comma-separated list of things"""
+ self._RunControl('-x', 'arm,powerpc')
+ self.assertEqual(['board4'],
+ [b.target for b in self._boards.get_selected()])
+
+ def test_exclude_list(self):
+ """Test excluding a list of things"""
+ self._RunControl('-x', 'board2', '-x' 'board4')
+ self.assertEqual(['board0', 'board1'],
+ [b.target for b in self._boards.get_selected()])