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>
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index fb861e1..e6698ce 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -214,13 +214,15 @@
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 @@
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 @@
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 @@
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 @@
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"""