aboutsummaryrefslogtreecommitdiff
path: root/tools/buildman/test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-06-11 23:26:46 -0600
committerSimon Glass <sjg@chromium.org>2018-11-14 09:16:27 -0800
commit0689036a35296a3d51685a0b671f805818f94af7 (patch)
tree07e7263dfb912d0805298526fbc1648945f3f6ce /tools/buildman/test.py
parentbd8b74551b64e740ca27510406d26bd82ae74c38 (diff)
buildman: Add a --boards option to specify particular boards to build
At present 'buildman sandbox' will build all 5 boards for the sandbox architecture rather than the single board 'sandbox'. The only current way to exclude sandbox_spl, sandbox_noblk, etc. is to use -x which is a bit clumbsy. Add a --boards option to allow individual build targets to be specified. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/test.py')
-rw-r--r--tools/buildman/test.py31
1 files changed, 17 insertions, 14 deletions
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index e0c9d6da6a..61a462655f 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -313,60 +313,63 @@ class TestBuild(unittest.TestCase):
def testBoardSingle(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards(['sandbox']),
- {'all': ['board4'], 'sandbox': ['board4']})
+ ({'all': ['board4'], 'sandbox': ['board4']}, []))
def testBoardArch(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards(['arm']),
- {'all': ['board0', 'board1'],
- 'arm': ['board0', 'board1']})
+ ({'all': ['board0', 'board1'],
+ 'arm': ['board0', 'board1']}, []))
def testBoardArchSingle(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards(['arm sandbox']),
- {'sandbox': ['board4'],
+ ({'sandbox': ['board4'],
'all': ['board0', 'board1', 'board4'],
- 'arm': ['board0', 'board1']})
+ 'arm': ['board0', 'board1']}, []))
def testBoardArchSingleMultiWord(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards(['arm', 'sandbox']),
- {'sandbox': ['board4'], 'all': ['board0', 'board1', 'board4'], 'arm': ['board0', 'board1']})
+ ({'sandbox': ['board4'],
+ 'all': ['board0', 'board1', 'board4'],
+ 'arm': ['board0', 'board1']}, []))
def testBoardSingleAnd(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards(['Tester & arm']),
- {'Tester&arm': ['board0', 'board1'], 'all': ['board0', 'board1']})
+ ({'Tester&arm': ['board0', 'board1'],
+ 'all': ['board0', 'board1']}, []))
def testBoardTwoAnd(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards(['Tester', '&', 'arm',
'Tester' '&', 'powerpc',
'sandbox']),
- {'sandbox': ['board4'],
+ ({'sandbox': ['board4'],
'all': ['board0', 'board1', 'board2', 'board3',
'board4'],
'Tester&powerpc': ['board2', 'board3'],
- 'Tester&arm': ['board0', 'board1']})
+ 'Tester&arm': ['board0', 'board1']}, []))
def testBoardAll(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards([]),
- {'all': ['board0', 'board1', 'board2', 'board3',
- 'board4']})
+ ({'all': ['board0', 'board1', 'board2', 'board3',
+ 'board4']}, []))
def testBoardRegularExpression(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards(['T.*r&^Po']),
- {'all': ['board2', 'board3'],
- 'T.*r&^Po': ['board2', 'board3']})
+ ({'all': ['board2', 'board3'],
+ 'T.*r&^Po': ['board2', 'board3']}, []))
def testBoardDuplicate(self):
"""Test single board selection"""
self.assertEqual(self.boards.SelectBoards(['sandbox sandbox',
'sandbox']),
- {'all': ['board4'], 'sandbox': ['board4']})
+ ({'all': ['board4'], 'sandbox': ['board4']}, []))
def CheckDirs(self, build, dirname):
self.assertEqual('base%s' % dirname, build._GetOutputDir(1))
self.assertEqual('base%s/fred' % dirname,