mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
buildman: Fix up tests
The tests were broken by two separate commits which adjusted the output when boards are listed. Fix this by adding back a PowerPC board and putting the name of each board in the test. Fixes:b9f7d881
(powerpc, 5xx: remove some "5xx" remains) Fixes:8d7523c5
(buildman: Allow showing the list of boards with -n) Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -91,6 +91,7 @@ boards = [
|
|||||||
['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 1', 'board0', ''],
|
['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 1', 'board0', ''],
|
||||||
['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 2', 'board1', ''],
|
['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 2', 'board1', ''],
|
||||||
['Active', 'powerpc', 'powerpc', '', 'Tester', 'PowerPC board 1', 'board2', ''],
|
['Active', 'powerpc', 'powerpc', '', 'Tester', 'PowerPC board 1', 'board2', ''],
|
||||||
|
['Active', 'powerpc', 'mpc83xx', '', 'Tester', 'PowerPC board 2', 'board3', ''],
|
||||||
['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', ''],
|
['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', ''],
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -313,50 +314,60 @@ class TestBuild(unittest.TestCase):
|
|||||||
def testBoardSingle(self):
|
def testBoardSingle(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards(['sandbox']),
|
self.assertEqual(self.boards.SelectBoards(['sandbox']),
|
||||||
{'all': 1, 'sandbox': 1})
|
{'all': ['board4'], 'sandbox': ['board4']})
|
||||||
|
|
||||||
def testBoardArch(self):
|
def testBoardArch(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards(['arm']),
|
self.assertEqual(self.boards.SelectBoards(['arm']),
|
||||||
{'all': 2, 'arm': 2})
|
{'all': ['board0', 'board1'],
|
||||||
|
'arm': ['board0', 'board1']})
|
||||||
|
|
||||||
def testBoardArchSingle(self):
|
def testBoardArchSingle(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards(['arm sandbox']),
|
self.assertEqual(self.boards.SelectBoards(['arm sandbox']),
|
||||||
{'all': 3, 'arm': 2, 'sandbox' : 1})
|
{'sandbox': ['board4'],
|
||||||
|
'all': ['board0', 'board1', 'board4'],
|
||||||
|
'arm': ['board0', 'board1']})
|
||||||
|
|
||||||
|
|
||||||
def testBoardArchSingleMultiWord(self):
|
def testBoardArchSingleMultiWord(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards(['arm', 'sandbox']),
|
self.assertEqual(self.boards.SelectBoards(['arm', 'sandbox']),
|
||||||
{'all': 3, 'arm': 2, 'sandbox' : 1})
|
{'sandbox': ['board4'], 'all': ['board0', 'board1', 'board4'], 'arm': ['board0', 'board1']})
|
||||||
|
|
||||||
def testBoardSingleAnd(self):
|
def testBoardSingleAnd(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards(['Tester & arm']),
|
self.assertEqual(self.boards.SelectBoards(['Tester & arm']),
|
||||||
{'all': 2, 'Tester&arm': 2})
|
{'Tester&arm': ['board0', 'board1'], 'all': ['board0', 'board1']})
|
||||||
|
|
||||||
def testBoardTwoAnd(self):
|
def testBoardTwoAnd(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards(['Tester', '&', 'arm',
|
self.assertEqual(self.boards.SelectBoards(['Tester', '&', 'arm',
|
||||||
'Tester' '&', 'powerpc',
|
'Tester' '&', 'powerpc',
|
||||||
'sandbox']),
|
'sandbox']),
|
||||||
{'all': 5, 'Tester&powerpc': 2, 'Tester&arm': 2,
|
{'sandbox': ['board4'],
|
||||||
'sandbox' : 1})
|
'all': ['board0', 'board1', 'board2', 'board3',
|
||||||
|
'board4'],
|
||||||
|
'Tester&powerpc': ['board2', 'board3'],
|
||||||
|
'Tester&arm': ['board0', 'board1']})
|
||||||
|
|
||||||
def testBoardAll(self):
|
def testBoardAll(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards([]), {'all': 5})
|
self.assertEqual(self.boards.SelectBoards([]),
|
||||||
|
{'all': ['board0', 'board1', 'board2', 'board3',
|
||||||
|
'board4']})
|
||||||
|
|
||||||
def testBoardRegularExpression(self):
|
def testBoardRegularExpression(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards(['T.*r&^Po']),
|
self.assertEqual(self.boards.SelectBoards(['T.*r&^Po']),
|
||||||
{'T.*r&^Po': 2, 'all': 2})
|
{'all': ['board2', 'board3'],
|
||||||
|
'T.*r&^Po': ['board2', 'board3']})
|
||||||
|
|
||||||
def testBoardDuplicate(self):
|
def testBoardDuplicate(self):
|
||||||
"""Test single board selection"""
|
"""Test single board selection"""
|
||||||
self.assertEqual(self.boards.SelectBoards(['sandbox sandbox',
|
self.assertEqual(self.boards.SelectBoards(['sandbox sandbox',
|
||||||
'sandbox']),
|
'sandbox']),
|
||||||
{'all': 1, 'sandbox': 1})
|
{'all': ['board4'], 'sandbox': ['board4']})
|
||||||
def CheckDirs(self, build, dirname):
|
def CheckDirs(self, build, dirname):
|
||||||
self.assertEqual('base%s' % dirname, build._GetOutputDir(1))
|
self.assertEqual('base%s' % dirname, build._GetOutputDir(1))
|
||||||
self.assertEqual('base%s/fred' % dirname,
|
self.assertEqual('base%s/fred' % dirname,
|
||||||
|
Reference in New Issue
Block a user