From patchwork Tue Jan 6 22:03:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1327 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737171; bh=9numfcgB5VNadvgtVb//HduqnAkKPP1nqFWV/63IsnQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=vby4qAk2w/cUdJiM/7j41Ir8zc/amQnTcJD9wikpbavDuKoBWaXQ2zlon69uizchl dp8YQK5bYk40ozHCt+glN9Qir86exVtTDmXXKTVnafxiiAMBXfpvZaADpMsxeS8eTg JHYR5iES8jAudYPVzp4raNhFf0JbSaJy0K6+rqq+U88rKGNERm598ygN2Z5tFtUZZn dT2ZkIWyS5bhsSeocEFEkBrZHAL0M5+qLdx58+iFlSu1Hir3aPyhTh4ksYlSrfGvsf rfPeoiQQ0+Xl2e5O/YVhES2xZkrxu9k9JGGgG9z/IGUZkTXqEz8XQGEQ8Hqigxh98C PpsN1D8kNVOfw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7B93E69162 for ; Tue, 6 Jan 2026 15:06:11 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id s6DxTPfZ8wvh for ; Tue, 6 Jan 2026 15:06:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737171; bh=9numfcgB5VNadvgtVb//HduqnAkKPP1nqFWV/63IsnQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=vby4qAk2w/cUdJiM/7j41Ir8zc/amQnTcJD9wikpbavDuKoBWaXQ2zlon69uizchl dp8YQK5bYk40ozHCt+glN9Qir86exVtTDmXXKTVnafxiiAMBXfpvZaADpMsxeS8eTg JHYR5iES8jAudYPVzp4raNhFf0JbSaJy0K6+rqq+U88rKGNERm598ygN2Z5tFtUZZn dT2ZkIWyS5bhsSeocEFEkBrZHAL0M5+qLdx58+iFlSu1Hir3aPyhTh4ksYlSrfGvsf rfPeoiQQ0+Xl2e5O/YVhES2xZkrxu9k9JGGgG9z/IGUZkTXqEz8XQGEQ8Hqigxh98C PpsN1D8kNVOfw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 659A85FF82 for ; Tue, 6 Jan 2026 15:06:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737168; bh=+MLI189TReNeFshVd8OapwmkO0kJI3RroLrCbMTj1to=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lCSrF6JRdh+HVw6AiTqbj9602dQou8AuqiUDbWrfjZUOea7qq8s/2c9P5QEfm2ZzI YrG7kt9aVKLdYctTud4B8IhH4FSqhDUK9m5TAiibq8YMJjpfUT4WEohEBXdDqEDjK2 bKd7FoyRQEASj3oInb3ket6BzfQLnAQuIxI58nrw+WrgHG9W/J4/1CSrgZwTKAgBXr rUzFpaIdWk/4gtQTWJVlkZ5CkuBim+IP6ZVlxlmmkp8yFVD6TIIlQ41lJbqsFVEoUm n2H8gRNZ+FlppvMxJeDfvxx6bYcRXPr2mW9LCxMwrXnMt+qqNciqGssYpbNxgIPV01 LM2pPn2CmMtmA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E18E35FF82; Tue, 6 Jan 2026 15:06:08 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 7TRlm67xWWOg; Tue, 6 Jan 2026 15:06:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737162; bh=yKn+OhC0o4iCxKFY+PaPWRxm3BwVXkVPf4FbA++v+1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mt858t8JCWs1vA2toQnd1fNzso1m0m9SoseAp8xKkdXvcYoqLR3FVRtdpufQcXzJ+ uT+YZ0BoiuAW8t1T3o7tHHTTarGwTVMyFeIdPu632jP6gCK34vUaDm0GGOS5T+6Uop SyJ08b5WZ2Nkux/Ec9zX4/wEoqMGsDdoZy2na9gUMLY0qkZh9nvgjZ0uA8A9d4dDdF n/EyvaZNXVcFRgL8cp4V43pH8CpzhX/j6z/KoGZ1mVpAGRLu32+QO+gF3b1mlJztNy qo5pW2el7ysvmlbp/qcpaePUVyAd+4K/W+9EgPTwsxYsdflchV+LWyWrWjpHFAM4Gh OJt6KIPRGVlqg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A663F690CB; Tue, 6 Jan 2026 15:06:02 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 15:03:42 -0700 Message-ID: <20260106220403.2915630-25-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106220403.2915630-1-sjg@u-boot.org> References: <20260106220403.2915630-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 5OODM4VQLUOWSUVIK64UTVCTT6DGXNFQ X-Message-ID-Hash: 5OODM4VQLUOWSUVIK64UTVCTT6DGXNFQ X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 24/29] buildman: Extract arch results display List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Move the arch results display block into _display_arch_results() and convert the nested _output_err_lines() function to a class method. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/builder.py | 117 ++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 50 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index db20c3d156d..d5b57246908 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -1680,6 +1680,71 @@ class Builder: tprint(f"{' '.join(sorted(targets))} :") self._output_config_info(lines.split('\n')) + def _output_err_lines(self, err_lines, colour): + """Output the line of error/warning lines, if not empty + + Also increments self._error_lines if err_lines not empty + + Args: + err_lines: List of ErrLine objects, each an error or warning + line, possibly including a list of boards with that + error/warning + colour: Colour to use for output + """ + if err_lines: + out_list = [] + for line in err_lines: + names = [brd.target for brd in line.brds] + board_str = ' '.join(names) if names else '' + if board_str: + out = self.col.build(colour, line.char + '(') + out += self.col.build(self.col.MAGENTA, board_str, + bright=False) + out += self.col.build(colour, f') {line.errline}') + else: + out = self.col.build(colour, line.char + line.errline) + out_list.append(out) + tprint('\n'.join(out_list)) + self._error_lines += 1 + + def _display_arch_results(self, board_selected, brd_status, better_err, + worse_err, better_warn, worse_warn): + """Display results by architecture + + Args: + board_selected (dict): Dict containing boards to summarise + brd_status (BoardStatus): Named tuple with board classifications + better_err: List of ErrLine for fixed errors + worse_err: List of ErrLine for new errors + better_warn: List of ErrLine for fixed warnings + worse_warn: List of ErrLine for new warnings + """ + if self._ide: + return + if not any((brd_status.ok, brd_status.warn, brd_status.err, + brd_status.unknown, brd_status.new, worse_err, better_err, + worse_warn, better_warn)): + return + arch_list = {} + self.add_outcome(board_selected, arch_list, brd_status.ok, '', + self.col.GREEN) + self.add_outcome(board_selected, arch_list, brd_status.warn, 'w+', + self.col.YELLOW) + self.add_outcome(board_selected, arch_list, brd_status.err, '+', + self.col.RED) + self.add_outcome(board_selected, arch_list, brd_status.new, '*', + self.col.BLUE) + if self._show_unknown: + self.add_outcome(board_selected, arch_list, brd_status.unknown, + '?', self.col.MAGENTA) + for arch, target_list in arch_list.items(): + tprint(f'{arch:>10s}: {target_list}') + self._error_lines += 1 + self._output_err_lines(better_err, colour=self.col.GREEN) + self._output_err_lines(worse_err, colour=self.col.RED) + self._output_err_lines(better_warn, colour=self.col.CYAN) + self._output_err_lines(worse_warn, colour=self.col.YELLOW) + def print_result_summary(self, board_selected, board_dict, err_lines, err_line_boards, warn_lines, warn_line_boards, config, environment, show_sizes, show_detail, @@ -1770,34 +1835,6 @@ class Builder: better_lines.append(errline) return better_lines, worse_lines - def _output_err_lines(err_lines, colour): - """Output the line of error/warning lines, if not empty - - Also increments self._error_lines if err_lines not empty - - Args: - err_lines: List of ErrLine objects, each an error or warning - line, possibly including a list of boards with that - error/warning - colour: Colour to use for output - """ - if err_lines: - out_list = [] - for line in err_lines: - names = [brd.target for brd in line.brds] - board_str = ' '.join(names) if names else '' - if board_str: - out = self.col.build(colour, line.char + '(') - out += self.col.build(self.col.MAGENTA, board_str, - bright=False) - out += self.col.build(colour, f') {line.errline}') - else: - out = self.col.build(colour, line.char + line.errline) - out_list.append(out) - tprint('\n'.join(out_list)) - self._error_lines += 1 - - brd_status = self._classify_boards(board_selected, board_dict) # Get a list of errors and warnings that have appeared, and disappeared @@ -1816,28 +1853,8 @@ class Builder: sys.stderr.write(line) # Display results by arch - elif any((brd_status.ok, brd_status.warn, brd_status.err, - brd_status.unknown, brd_status.new, worse_err, better_err, - worse_warn, better_warn)): - arch_list = {} - self.add_outcome(board_selected, arch_list, brd_status.ok, '', - self.col.GREEN) - self.add_outcome(board_selected, arch_list, brd_status.warn, 'w+', - self.col.YELLOW) - self.add_outcome(board_selected, arch_list, brd_status.err, '+', - self.col.RED) - self.add_outcome(board_selected, arch_list, brd_status.new, '*', - self.col.BLUE) - if self._show_unknown: - self.add_outcome(board_selected, arch_list, brd_status.unknown, - '?', self.col.MAGENTA) - for arch, target_list in arch_list.items(): - tprint(f'{arch:>10s}: {target_list}') - self._error_lines += 1 - _output_err_lines(better_err, colour=self.col.GREEN) - _output_err_lines(worse_err, colour=self.col.RED) - _output_err_lines(better_warn, colour=self.col.CYAN) - _output_err_lines(worse_warn, colour=self.col.YELLOW) + self._display_arch_results(board_selected, brd_status, better_err, + worse_err, better_warn, worse_warn) if show_sizes: self.print_size_summary(board_selected, board_dict, show_detail,