diff options
author | Simon Glass <sjg@chromium.org> | 2019-10-31 07:42:53 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-11-04 18:15:32 -0700 |
commit | c05aa0364280803d8274e260a739553d588ea052 (patch) | |
tree | f062c1f649d6ab5b6c1dab1c349efe81c9a4158a /tools/buildman/test.py | |
parent | e3986d9b40f3e52217dea4c47f65e44e549c9ee2 (diff) |
buildman: Convert to Python 3
Convert buildman to Python 3 and make it use that, to meet the 2020
deadline.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/test.py')
-rw-r--r-- | tools/buildman/test.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/buildman/test.py b/tools/buildman/test.py index ed99b9375c4..b4e28d68676 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -212,11 +212,11 @@ class TestBuild(unittest.TestCase): self.assertEqual(lines[1].text, '02: %s' % commits[1][1]) col = terminal.Color() - self.assertSummary(lines[2].text, 'sandbox', 'w+', ['board4'], + self.assertSummary(lines[2].text, 'arm', 'w+', ['board1'], outcome=OUTCOME_WARN) - self.assertSummary(lines[3].text, 'arm', 'w+', ['board1'], + self.assertSummary(lines[3].text, 'powerpc', 'w+', ['board2', 'board3'], outcome=OUTCOME_WARN) - self.assertSummary(lines[4].text, 'powerpc', 'w+', ['board2', 'board3'], + self.assertSummary(lines[4].text, 'sandbox', 'w+', ['board4'], outcome=OUTCOME_WARN) # Second commit: The warnings should be listed @@ -226,10 +226,10 @@ class TestBuild(unittest.TestCase): # Third commit: Still fails self.assertEqual(lines[6].text, '03: %s' % commits[2][1]) - self.assertSummary(lines[7].text, 'sandbox', '+', ['board4']) - self.assertSummary(lines[8].text, 'arm', '', ['board1'], + self.assertSummary(lines[7].text, 'arm', '', ['board1'], outcome=OUTCOME_OK) - self.assertSummary(lines[9].text, 'powerpc', '+', ['board2', 'board3']) + self.assertSummary(lines[8].text, 'powerpc', '+', ['board2', 'board3']) + self.assertSummary(lines[9].text, 'sandbox', '+', ['board4']) # Expect a compiler error self.assertEqual(lines[10].text, '+%s' % @@ -237,8 +237,6 @@ class TestBuild(unittest.TestCase): # Fourth commit: Compile errors are fixed, just have warning for board3 self.assertEqual(lines[11].text, '04: %s' % commits[3][1]) - self.assertSummary(lines[12].text, 'sandbox', 'w+', ['board4'], - outcome=OUTCOME_WARN) expect = '%10s: ' % 'powerpc' expect += ' ' + col.Color(col.GREEN, '') expect += ' ' @@ -246,7 +244,9 @@ class TestBuild(unittest.TestCase): expect += ' ' + col.Color(col.YELLOW, 'w+') expect += ' ' expect += col.Color(col.YELLOW, ' %s' % 'board3') - self.assertEqual(lines[13].text, expect) + self.assertEqual(lines[12].text, expect) + self.assertSummary(lines[13].text, 'sandbox', 'w+', ['board4'], + outcome=OUTCOME_WARN) # Compile error fixed self.assertEqual(lines[14].text, '-%s' % @@ -259,9 +259,9 @@ class TestBuild(unittest.TestCase): # Fifth commit self.assertEqual(lines[16].text, '05: %s' % commits[4][1]) - self.assertSummary(lines[17].text, 'sandbox', '+', ['board4']) - self.assertSummary(lines[18].text, 'powerpc', '', ['board3'], + self.assertSummary(lines[17].text, 'powerpc', '', ['board3'], outcome=OUTCOME_OK) + self.assertSummary(lines[18].text, 'sandbox', '+', ['board4']) # The second line of errors[3] is a duplicate, so buildman will drop it expect = errors[3].rstrip().split('\n') |