From patchwork Sat Jan 10 20:08:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1434 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=1768075756; bh=uMYVDfLcyjLdzTnMd0HnK7vfeRDHhMNMauI/fXO8pWM=; 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=HjEqSl7mZnpmeC9Nz+v24H3ENtJ2faTyudXKb/8j/8odEzdwYa+CP0WlZJk5+cGMI 5ciB5pdfgEvQcEtI1+9XoJKqXezJznHm6NL2BKj5xyjqPgehNbwGRET6rvuq4N2twK Qbx7eBXnpdAoO5/wfVBSfYPT2f6/EOI++HnwCpolL8euP76HG3/xcIFwcWA4OqgyXV waokd03WJ7HQ0BYFKYAsqKXM2h5YGiAR0Do6li96YgxrNhbaSHVJ/QkeBPh8ZSDR+B XGDpxsu8pBCJHMZ5HIOBx2gKA+iK0rABihV/SrpA2y6ZuPSDI/klE+oEt75k0SsHKa F83kE1jJYrLlw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F2E8169221 for ; Sat, 10 Jan 2026 13:09:16 -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 52IQxLup2rQN for ; Sat, 10 Jan 2026 13:09:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768075755; bh=uMYVDfLcyjLdzTnMd0HnK7vfeRDHhMNMauI/fXO8pWM=; 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=GW6SWvk0G73vBbzfpV/taD8VqD3K4RLjwTR2+uPND7AEK+kpCpl676ahv8IGmrpG0 2XK3nCOGz3UglroqkNCY37swBKjmtFW3bDU48CsVup7ABU7FJNaVmzP6IOySR3uoRF VfKf6ER6bLzLdIieI2wEfb4WTRZ0aMiANTUwnWXevGB27g/Qzrs5A2f4BG/LlHo7Lj BYAbAvL0LAmcGk6rWShOMDAQsqOYh9dXVBB7NqeHNF+5xPPyqh9wAw3r8mxIn4J+BA 9ga2Kk7BWfjsJW40jjs8IhH4c9/c9vKzs9Wjwvd0yFzgz42pjLD0/HYUefpqPQrX/m RTD6TnCIlUhbA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A70906927E for ; Sat, 10 Jan 2026 13:09:15 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768075754; bh=WtXJpUwddkK60UEN5eF2sbY19s483MKSrCzoMJFAqs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rkVat/8QYoU7BN3EDA+FCxKHiGFoAAeKrN4ApX3oKYAKHmnMlhAaqW4j0fRs0cc2r uOlpMuT3oo1RfwcI+SyENyQO1Vf87lmqpShIS94NoMKaUd18VwWMweVLN+xURANEmE Y62JGHJbZAKEuyx81ux45yHyDBeqpFIOZVH/UF565j98vbJ7q8+6/Wcb6kluRoaY5/ 3EQQR1D5YIhx5oWo/vad2BuuQZU0WM3fKGWiM6kUokRc6yGPjT4P4zI7tAWPfgMuIM reZNfAeuWmDGmtyOnCGhZ5JHH4dym87gxjIY8lIZdcoP2md/7jSbPtJ4RfDQl7/jsV NfWA9ABbEiLHA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BB61569221; Sat, 10 Jan 2026 13:09:14 -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 KqEvwe0dutG6; Sat, 10 Jan 2026 13:09:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768075750; bh=sJZCqBuz+YHiYQi9ytOZjdIH16i/pVxouFqVO+1m1PA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hUM4BQIwNgqyJfH+w9CkAkINUzWjIKoT8aXX+QTQ4CuvpMQvCVzIDXmZjC45FlFsu DhAUtVZSy43vtpw2sepjAHHIOAnoiLCxzySYPjbHLlU2FAMSNP0/59o22C3KeJk7p8 ZZ9Lw8/VY1NdrrDgvVPF2bqFmNKLrJK66TWO9VYhgabBTr0eDVb/Erv81xGX+sLqAD CiXEcMCP2cDzNDpfyPGyBSPLiNiSiIuJRpahFzhXZUB9yJK+qtcxEu+KNgqUwJKxqc twMS4eQUUPiOCRfOAyhN39dvpKzCutOHfj0B1e2QGBxMfyabgIkgf4rp2uB4MR/EKA aVvCrz/Z5nj7A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 37A08690E7; Sat, 10 Jan 2026 13:09:10 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 13:08:09 -0700 Message-ID: <20260110200828.168672-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110200828.168672-1-sjg@u-boot.org> References: <20260110200828.168672-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: PT2E6MYDQZWLJ3Z3CCTYADBTCK3FXI4R X-Message-ID-Hash: PT2E6MYDQZWLJ3Z3CCTYADBTCK3FXI4R 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 Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/18] buildman: Move BoardStatus and ErrLine to outcome module 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 BoardStatus and ErrLine namedtuples from resulthandler.py to outcome.py, centralising all result-related types in one module. Update the imports in resulthandler.py and builder.py accordingly. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/builder.py | 20 +++----------------- tools/buildman/outcome.py | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 96976f513e8..dd1da92e0ea 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -21,8 +21,9 @@ import threading from buildman import builderthread from buildman.cfgutil import Config, process_config -from buildman.outcome import (Outcome, OUTCOME_OK, OUTCOME_WARNING, - OUTCOME_ERROR, OUTCOME_UNKNOWN) +from buildman.outcome import (BoardStatus, ErrLine, Outcome, + OUTCOME_OK, OUTCOME_WARNING, OUTCOME_ERROR, + OUTCOME_UNKNOWN) from u_boot_pylib import command from u_boot_pylib import gitutil from u_boot_pylib import terminal @@ -121,21 +122,6 @@ u-boot/ source directory .git/ repository """ -# Holds information about a particular error line we are outputting -# char: Character representation: '+': error, '-': fixed error, 'w+': warning, -# 'w-' = fixed warning -# boards: List of Board objects which have line in the error/warning output -# errline: The text of the error line -ErrLine = collections.namedtuple('ErrLine', 'char,brds,errline') - -# Holds the outcome of classifying the boards: -# ok: List of boards fixed since last commit -# warn: List of boards with warnings since last commit -# err: List of new broken boards since last commit -# new: List of boards that didn't exist last time -# unknown: List of boards that were not built -BoardStatus = collections.namedtuple('BoardStatus', 'ok,warn,err,new,unknown') - # Translate a commit subject into a valid filename (and handle unicode) trans_valid_chars = str.maketrans('/: ', '---') diff --git a/tools/buildman/outcome.py b/tools/buildman/outcome.py index 373740cd94b..2cbed9a1aba 100644 --- a/tools/buildman/outcome.py +++ b/tools/buildman/outcome.py @@ -3,9 +3,26 @@ """Outcome class and constants for buildman build results""" +from collections import namedtuple + # Build-outcome codes OUTCOME_OK, OUTCOME_WARNING, OUTCOME_ERROR, OUTCOME_UNKNOWN = list(range(4)) +# Board status for display purposes +# ok: List of boards fixed since last commit +# warn: List of boards with warnings since last commit +# err: List of new broken boards since last commit +# new: List of boards that didn't exist last time +# unknown: List of boards that were not built +BoardStatus = namedtuple('BoardStatus', 'ok warn err new unknown') + +# Error line information for display +# char: Character representation: '+': error, '-': fixed error, 'w+': warning, +# 'w-' = fixed warning +# brds: List of Board objects which have line in the error/warning output +# errline: The text of the error line +ErrLine = namedtuple('ErrLine', 'char brds errline') + class Outcome: """Records a build outcome for a single make invocation