buildman: Add flag to filter out missing binary blobs
PATCH 1/1 buildman: Add flag to filter out missing binary blobs
When doing builds of a number of platforms and not intending to run the resulting binaries, we have an option already to tell buildman to just make fake binaries for linking only. Add another option to filter this from the output, to make parsing build logs easier.
Signed-off-by Tom Rini <[email protected]>
---
Cc: Simon Glass <[email protected]>
--- tools/buildman/builder.py | 13 ++++++++++++- tools/buildman/cmdline.py | 3 +++ tools/buildman/control.py | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-)
tools/buildman/builder.py +12 -1
@@ -368,6 +368,9 @@ class Builder: self._re_note = re.compile('(.*):(\d*):(\d*): note: this is the location of the previous.*') self._re_migration_warning = re.compile(r'^={21} WARNING ={22}\n.*\n=+\n', re.MULTILINE | re.DOTALL) + self._re_missing_blobs = re.compile(r'Image.*is missing.*blobs.*\n.*\nSome images are invalid', + re.MULTILINE | re.DOTALL) + self.thread_exceptions = [] self.test_thread_exceptions = test_thread_exceptions
@@ -409,7 +412,8 @@ class Builder: show_detail=False, show_bloat=False, list_error_boards=False, show_config=False, show_environment=False, filter_dtb_warnings=False, - filter_migration_warnings=False, ide=False): + filter_migration_warnings=False, + filter_missing_blobs=False, ide=False): """Setup display options for the builder. Args:
@@ -424,6 +428,8 @@ class Builder: compiler filter_migration_warnings: Filter out any warnings about migrating a board to driver model + filter_missing_blobs: Filter out any warnings about missing binary + blobs ide: Create output that can be parsed by an IDE. There is no '+' prefix on error lines and output on stderr stays on stderr. """
@@ -436,6 +442,7 @@ class Builder: self._show_environment = show_environment self._filter_dtb_warnings = filter_dtb_warnings self._filter_migration_warnings = filter_migration_warnings + self._filter_missing_blobs = filter_missing_blobs self._ide = ide def _add_timestamp(self):
@@ -672,6 +679,10 @@ class Builder: text = '\n'.join(lines) text = self._re_migration_warning.sub('', text) lines = text.splitlines() + if self._filter_missing_blobs: + text = '\n'.join(lines) + text = self._re_missing_blobs.sub('', text) + lines = text.splitlines() for line in lines: if self.re_make_err.search(line): continue
tools/buildman/cmdline.py +3 -0
@@ -168,6 +168,9 @@ def add_after_m(parser): parser.add_argument('-Y', '--filter-migration-warnings', action='store_true', default=False, help='Filter out migration warnings from output') + parser.add_argument('--filter-missing-blobs', action='store_true', + default=False, + help='Filter out missing binary blob warnings from output') def parse_args():
tools/buildman/control.py +2 -1
@@ -539,7 +539,8 @@ def run_builder(builder, commits, board_selected, args): builder.set_display_options( args.show_errors, args.show_sizes, args.show_detail, args.show_bloat, args.list_error_boards, args.show_config, args.show_environment, - args.filter_dtb_warnings, args.filter_migration_warnings, args.ide) + args.filter_dtb_warnings, args.filter_migration_warnings, + args.filter_missing_blobs, args.ide) if args.summary: builder.show_summary(commits, board_selected) else:
Signature · 1 line
2.34.1
Hi Tom,
Quoted 6 lines · Tom Rini
When doing builds of a number of platforms and not intending to run the resulting binaries, we have an option already to tell buildman to just make fake binaries for linking only. Add another option to filter this from the output, to make parsing build logs easier.
Quoted 8 lines
Signed-off-by Tom Rini <[email protected]>---
Cc: Simon Glass <[email protected]>--- tools/buildman/builder.py | 13 ++++++++++++- tools/buildman/cmdline.py | 3 +++ tools/buildman/control.py | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-)
This needs a test. See eg. testFilterMigration().
Regards,
Simon