aboutsummaryrefslogtreecommitdiff
path: root/tools/buildman/test.py
diff options
context:
space:
mode:
authorSimon Glass2020-04-09 15:08:52 -0600
committerSimon Glass2020-04-21 06:33:47 -0600
commit174592b964c762eca5e405494dda0ffc10deeb7b (patch)
tree811bd3950582645a3f28f57678a202687df15254 /tools/buildman/test.py
parenteb70a2c0598c416777049a89c09c32474ff918b0 (diff)
buildman: Add an option to ignore device-tree warnings
Unfortunately the plague of device-tree warnings has not lifted. These warnings infiltrate almost every build, adding noise and confusion. Add a buildman option to ignore them. This option works only with the summary option (-s). It does not affect the build process. 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, 24 insertions, 7 deletions
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index fb861e16a1b..e6698ce86ca 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -214,13 +214,15 @@ class TestBuild(unittest.TestCase):
terminal.EchoPrintTestLines()
return iter(terminal.GetPrintTestLines())
- def _CheckOutput(self, lines, list_error_boards):
+ def _CheckOutput(self, lines, list_error_boards, filter_dtb_warnings):
"""Check for expected output from the build summary
Args:
lines: Iterator containing the lines returned from the summary
list_error_boards: Adjust the check for output produced with the
--list-error-boards flag
+ filter_dtb_warnings: Adjust the check for output produced with the
+ --filter-dtb-warnings flag
"""
def add_line_prefix(prefix, boards, error_str, colour):
"""Add a prefix to each line of a string
@@ -301,8 +303,10 @@ class TestBuild(unittest.TestCase):
self.assertEqual(next(lines).text,
add_line_prefix('-', boards234, errors[1], col.GREEN))
- self.assertEqual(next(lines).text,
- add_line_prefix('w+', boards34, errors[2], col.YELLOW))
+ if not filter_dtb_warnings:
+ self.assertEqual(
+ next(lines).text,
+ add_line_prefix('w+', boards34, errors[2], col.YELLOW))
# Fifth commit
self.assertEqual(next(lines).text, '05: %s' % commits[4][1])
@@ -317,8 +321,10 @@ class TestBuild(unittest.TestCase):
self.assertEqual(next(lines).text,
add_line_prefix('+', boards4, expect, col.RED))
- self.assertEqual(next(lines).text,
- add_line_prefix('w-', boards34, errors[2], col.CYAN))
+ if not filter_dtb_warnings:
+ self.assertEqual(
+ next(lines).text,
+ add_line_prefix('w-', boards34, errors[2], col.CYAN))
# Sixth commit
self.assertEqual(next(lines).text, '06: %s' % commits[5][1])
@@ -357,7 +363,8 @@ class TestBuild(unittest.TestCase):
This does a line-by-line verification of the summary output.
"""
lines = self._SetupTest(show_errors=True)
- self._CheckOutput(lines, list_error_boards=False)
+ self._CheckOutput(lines, list_error_boards=False,
+ filter_dtb_warnings=False)
def testErrorBoards(self):
"""Test output with --list-error-boards
@@ -365,7 +372,17 @@ class TestBuild(unittest.TestCase):
This does a line-by-line verification of the summary output.
"""
lines = self._SetupTest(show_errors=True, list_error_boards=True)
- self._CheckOutput(lines, list_error_boards=True)
+ self._CheckOutput(lines, list_error_boards=True,
+ filter_dtb_warnings=False)
+
+ def testFilterDtb(self):
+ """Test output with --filter-dtb-warnings
+
+ This does a line-by-line verification of the summary output.
+ """
+ lines = self._SetupTest(show_errors=True, filter_dtb_warnings=True)
+ self._CheckOutput(lines, list_error_boards=False,
+ filter_dtb_warnings=True)
def _testGit(self):
"""Test basic builder operation by building a branch"""