[PATCH 1/2] buildman: Exit after reading toolchain

Recent refactoring changed buildman to continue operation after fetching a toolchain. Fix this.
Fixes: b8680646521 ("bulidman: Move toolchain handling to a function")
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/buildman/control.py | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 5c5720034b6..f2ffb7f5b4a 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -610,6 +610,9 @@ def do_buildman(args, toolchains=None, make_func=None, brds=None, toolchains = get_toolchains(toolchains, col, args.override_toolchain, args.fetch_arch, args.list_tool_chains, args.verbose) + if isinstance(toolchains, int): + return toolchains + output_dir = setup_output_dir( args.output_dir, args.work_in_output, args.branch, args.no_subdirs, col, clean_dir)

Some boards use a MAINTAINERS entry to specify common files without referencing any defconfigs. This is allowed and should not result in a warning.
Drop the warning in this case.
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/buildman/boards.py | 7 ------- tools/buildman/func_test.py | 9 ++------- 2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py index 83adbf167c7..eef3f19f7ad 100644 --- a/tools/buildman/boards.py +++ b/tools/buildman/boards.py @@ -377,16 +377,9 @@ class MaintainersDatabase: Args: linenum (int): Current line number """ - added = False if targets: for target in targets: self.database[target] = (status, maintainers) - added = True - if not added and (status != '-' and maintainers): - leaf = fname[len(srcdir) + 1:] - if leaf != 'MAINTAINERS': - self.warnings.append( - f'WARNING: orphaned defconfig in {leaf} ending at line {linenum + 1}')
targets = [] maintainers = [] diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 3115700f07b..55dd494fe8e 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -926,10 +926,7 @@ Active aarch64 armv8 - armltd total_compute board2 tools.write_file(main, data, binary=False) params_list, warnings = self._boards.build_board_list(config_dir, src) self.assertEquals(2, len(params_list)) - self.assertEquals( - ["WARNING: no maintainers for 'board0'", - 'WARNING: orphaned defconfig in boards/board0/MAINTAINERS ending at line 4', - ], warnings) + self.assertEquals(["WARNING: no maintainers for 'board0'"], warnings)
# Mark a board as orphaned - this should give a warning lines = ['S: Orphaned' if line.startswith('S') else line @@ -969,9 +966,7 @@ Active aarch64 armv8 - armltd total_compute board2 tools.write_file(main, both_data + extra, binary=False) params_list, warnings = self._boards.build_board_list(config_dir, src) self.assertEquals(2, len(params_list)) - self.assertEquals( - ['WARNING: orphaned defconfig in boards/board0/MAINTAINERS ending at line 16'], - warnings) + self.assertFalse(warnings)
# Add another TARGET to the Kconfig tools.write_file(main, both_data, binary=False)

Some boards use a MAINTAINERS entry to specify common files without referencing any defconfigs. This is allowed and should not result in a warning.
Drop the warning in this case.
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/buildman/boards.py | 7 ------- tools/buildman/func_test.py | 9 ++------- 2 files changed, 2 insertions(+), 14 deletions(-)
Applied to u-boot-dm, thanks!

Recent refactoring changed buildman to continue operation after fetching a toolchain. Fix this.
Fixes: b8680646521 ("bulidman: Move toolchain handling to a function")
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/buildman/control.py | 3 +++ 1 file changed, 3 insertions(+)
Applied to u-boot-dm, thanks!
participants (1)
-
Simon Glass