From patchwork Tue Jan 6 14:28:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1282 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=1767709730; bh=xLvN6IV0s6HPIJ8/3Kc+ikRW4haabIAm5L0h3r3I67w=; 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=nAySxJ29vI+vPb6mZCeHhbbwZbUMUQEI8zeXfRg0pjR3XzaGtjj2WrPiwfpXG4b7p I3taYlDVQ28B8nWReZORgfynYScjOo2GFZAKbGd6YXHZvXzSRQtJd+bhBADj+rXaSg 3L1TO9M7PgU7FqCGCFDRK1txoiqtEGLbsd60u/q3KqY5hnkAog+np+3U98sLPUWa4L jmVINZmP+/uTM8PJ0TM835a6N2KkKCmfdfmINwT4Hpk7JtlPrf/GDfegzDBlzVPYIm K3p5z98aI2HoWm249zCz2QImzyzbDpXV8F02aq0HFZXGIxE9r3wAKItMjtqlaoPwf+ vihzdSb5kTVuQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F2E2969120 for ; Tue, 6 Jan 2026 07:28:50 -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 G5hMI3B01L7z for ; Tue, 6 Jan 2026 07:28:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709729; bh=xLvN6IV0s6HPIJ8/3Kc+ikRW4haabIAm5L0h3r3I67w=; 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=jn2OZzd46sBT0VOQwXy3nM3zKz/gqjRSApunEdxZ2z28EnUTtopFaCq8ZBC3ctBW3 Gqrmsnkj1cqFPpZ1CnBXiAwLiYhGM734fGTplqPPAQVUtgII2mKO8pTrYSWNQWaC4m Fa7xcKOm6TWy3I/lpYxECF19XRS+BU92Mu2eXhoOJ9tcl5Czf/Y4M0yjLO+FrsBiWE 6X6H62xzCHXz9iChZkhXQrfbHwMJ5wtFekkX+nxNl6PdY9go0HVh3KgfN90wQYKoRr yyD8VJ+kQFB7jfdTHsxiWPGoyU+wdUKWNr2bno/fA/GSWsAPq5FZWmj5c9vc9ZBBKe CeiPKaBVVLeUg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A685069118 for ; Tue, 6 Jan 2026 07:28:49 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709727; bh=lqLCMLUMTzT7hfunz0PewwASrEWmCzQ1l5p6gjrQam4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mWW2ZSyfRLYeFIeu5KPLJ7jKcUMUEVrfwz6t2NvdFV77dKYLZ7jEq2ySrGialAtlZ hTELGKd2TOYaP9DJ3dTiDTzsrb97fbJ6bEuMERhMLFhQ77+B5/0L6wZvP62hjt4X56 yChKJHqDdwyIoEqzPIHkHu+bw6+NoIBZ3URzp8Vwvr7I8OyMjLiNVtCWFKkQwzaru6 ugBhwXXwXJKGkX2GQC4ftsE9md54aFk12ghFzgxIw1tmEi3Kee2gNVlceYBGD34SIK 5YqS+hFPCt7GOmxAPtFGyN05yrYTALXx7X3cVOyQXe3ohvuphqWwYpyNDigdnvODcI VWLgKXMfv+YPQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D6F8369118; Tue, 6 Jan 2026 07:28:47 -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 hJwGKFHfqJIP; Tue, 6 Jan 2026 07:28:47 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709727; bh=fNRSvl8KXbyzf+Uaa2F+OdI9Nouvil/iBJW7I609Z8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dH9n+5xchpCVb8sIxzF6UozMkD/q+90ypChbZhyiT/kPld+ZXHeSWiHo6lywN0bLG LUG72d+0xNk8w97q+yVESscuZts0lok0cpIYwrR/FsEtKZYmIpm0MXDkgFyrWouGhC pWtOjm6VlgD/YOfnrKGeYUMiwvG482Ky3rXJoDw1mCMkcGB1vR8Lilg/U6T6snvyVQ 0kkuKUoSim05PzB3jRyryzr9HRP2c2MvmyvWeSlvIC3ebq6yjXdaM0f06oeXHcSEQj fq39EIwvQ58xYsQXE8LP/ygACGihmYfrZPu5MpSTGVZn/sWyhYjrUDlG972lSvOSh5 46jp/x4vVP1xQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 4D87669054; Tue, 6 Jan 2026 07:28:47 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:06 -0700 Message-ID: <20260106142834.2511220-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: SUBBGKMUXNRXSO62JTMN4C5UFM743FJM X-Message-ID-Hash: SUBBGKMUXNRXSO62JTMN4C5UFM743FJM 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 01/22] buildman: Fix indentation and semicolon in test.py 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 Fix bad indentation (17 spaces instead of 16) and remove an unnecessary trailing semicolon. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 3d153619d5d..4e3b47eda45 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -149,7 +149,7 @@ class TestBuild(unittest.TestCase): comm.return_code = commit_info[2] comm.error_list = commit_info[3] if sequence < 6: - comm.error_list += [migration] + comm.error_list += [migration] comm.sequence = sequence sequence += 1 self.commits.append(comm) @@ -248,7 +248,7 @@ class TestBuild(unittest.TestCase): # We should get two starting messages, an update for every commit built # and a summary message self.assertEqual(count, len(commits) * len(BOARDS) + 3) - build.set_display_options(**kwdisplay_args); + build.set_display_options(**kwdisplay_args) build.show_summary(self.commits, board_selected) if echo_lines: terminal.echo_print_test_lines() From patchwork Tue Jan 6 14:28:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1283 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=1767709737; bh=jPDJwciE52cTG1/dxJVAcbvhTgQHy7y4kDBI8/IjDyg=; 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=Azam+R0YsRPBCxzt5c7fq523fGqMCzQIfO7glnQ+lirvg6lPxGgCPpcYvif6DONkW CQ5VH1DlUTgiqj7GeWmUqbyB/k1gdvvG4r/gth/GOFTk8Fmli9rqfpw9ZUpp/5LPIN wNOMn8hMEIOeG99G8UI0wBtzX1BTwXZa4+x0ay8m1av9fozJG/uu3N7DBMibWy5boX 82F9uRrwXLVJdQUBslqsz8xd084Jvu3/nxVqn4ThtSWn8ey1OY6qvCAfdtfQO2/oFX pIiFTPI1BtGYzVJKew38yDQNzsYr5sWuRcn9cAqa1S9ex8N19WYQn2yea1nrWq53/5 SInbLOkLZBulQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2856769054 for ; Tue, 6 Jan 2026 07:28:57 -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 1moWMHH7Uxev for ; Tue, 6 Jan 2026 07:28:57 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709737; bh=jPDJwciE52cTG1/dxJVAcbvhTgQHy7y4kDBI8/IjDyg=; 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=Azam+R0YsRPBCxzt5c7fq523fGqMCzQIfO7glnQ+lirvg6lPxGgCPpcYvif6DONkW CQ5VH1DlUTgiqj7GeWmUqbyB/k1gdvvG4r/gth/GOFTk8Fmli9rqfpw9ZUpp/5LPIN wNOMn8hMEIOeG99G8UI0wBtzX1BTwXZa4+x0ay8m1av9fozJG/uu3N7DBMibWy5boX 82F9uRrwXLVJdQUBslqsz8xd084Jvu3/nxVqn4ThtSWn8ey1OY6qvCAfdtfQO2/oFX pIiFTPI1BtGYzVJKew38yDQNzsYr5sWuRcn9cAqa1S9ex8N19WYQn2yea1nrWq53/5 SInbLOkLZBulQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 111F569120 for ; Tue, 6 Jan 2026 07:28:57 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709733; bh=nSeZOoP/pKxvDwfr0zrqIqqJOqASg+3fXWnzq7vhuSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iX+rgQ966U776lyrqzxJuNp3fN765qk+HnPswfLPd/AHcdU67Brk7ElaSrSdOE57X S/wt9RawjXPU2CFgV6fAjG+NG3TgybmevWP6x8KNj+8CFSvwn6vnqbOpFfF4Yz75tZ Ok11AOTbwAlE+DqmjGgXXczcvtduw54Q7TdTAc/XioD+LW2JhAIJ6ZZPsinmtuzQ4X vMLzNB1jIk346jkdmTqAaZtmdBDHyw5kheBHpKZOE36H/p1YGHEtzV4VJDApTC+eOB PXrRxtkQ6MaPt5QG7DwAgXmIKIaSOG+QVmJUwtqgIwH1j0Nw5OWRH67TDdX1PjiP6M aoI9Ch5chreIg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 38D326912A; Tue, 6 Jan 2026 07:28:53 -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 6UhF-C0Tm_ZN; Tue, 6 Jan 2026 07:28:53 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709728; bh=8kXfJ2iav24XK8KFQCaWQBlwiBzIy0icPrHb+XNYNm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dz8U9VEOuu/+AfNRxRvAC3zMMZXyAQ8SMEOaaCfir31Rz734DNks6DuYPKlNKj8NN zsN+N2grrtEg0HPpUEvMsRjnB9koGbw1SMWoCyCuHVJ8FMdTo3gKbtT2TwIDHg0YHG FF7e4JS+RbMNB7SMrpfw3EowUWiHnU6pa2h9XK8DCPvwLuH2wuL+QWcNRbPsbThgM7 uf8Gs6R/dUCrFDCT+IeIojZ6QEfvvSBdsaQzB9F0GEE3fKyejXT9+/qh9vGpV5YdGQ Z6LEXcFcnAEhQhgwGFlEAHu7W7Wqdd3Q1F/50zav3I7hyNkeH7MgnQi3CXP3cGHIpo 6MUYP19RYryFQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2671A69054; Tue, 6 Jan 2026 07:28:48 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:07 -0700 Message-ID: <20260106142834.2511220-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 5XVXDHLNXJHCHXPWMTRK4TRJWHLSNUQX X-Message-ID-Hash: 5XVXDHLNXJHCHXPWMTRK4TRJWHLSNUQX 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 02/22] buildman: Add __init__() to Options class in test.py 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 Add an __init__() method to the Options class to initialize all attributes used by _testGit(). This fixes pylint W0201 warnings about attributes defined outside __init__ Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/test.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 4e3b47eda45..735d93a0b7b 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -132,7 +132,21 @@ OUTCOME_OK, OUTCOME_WARN, OUTCOME_ERR = range(3) class Options: """Class that holds build options""" - pass + def __init__(self): + self.git = None + self.summary = False + self.jobs = None + self.dry_run = False + self.branch = None + self.force_build = False + self.list_tool_chains = False + self.count = -1 + self.git_dir = None + self.threads = None + self.show_unknown = False + self.quick = False + self.show_errors = False + self.keep_outputs = False class TestBuild(unittest.TestCase): """Test buildman From patchwork Tue Jan 6 14:28:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1284 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=1767709739; bh=UZK80MM+Chpq638sHMvQCup3iZ326c2rWmy+vw3eUAI=; 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=b2nz6USJxS8mqL3+k4FcOb8vUDP/YXFL7GGa9YZBLkxiBm5eFHPTyr/aXaFa6Wtal 40+w4C3vVLt9JAMmfD56O/6l4ZTQ69VeOdZw+zo3DRfBmOJomMQMnpOpSwL6nK2g5x 6n2yI20b83Xjq3L2pXPFWDTYf4nswaFFc3DKejc6NA6FNpZO8d+cLuWogVl4rhYwA2 NGrPD60luueKrl1STDCv9t5E6uWhEsvDib1+YY6H3Xa0bLCr00yNOrVUD5jUc545pg ThBLAgzeQMZ45hcD16vDWvixlrBQzKZSB7VtbT7eo6/B5DTm0J1lKB9lpappP+nbUg KmaJvO6xGNP1w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C58D269054 for ; Tue, 6 Jan 2026 07:28:59 -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 XZIPLq1TTVHu for ; Tue, 6 Jan 2026 07:28:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709739; bh=UZK80MM+Chpq638sHMvQCup3iZ326c2rWmy+vw3eUAI=; 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=b2nz6USJxS8mqL3+k4FcOb8vUDP/YXFL7GGa9YZBLkxiBm5eFHPTyr/aXaFa6Wtal 40+w4C3vVLt9JAMmfD56O/6l4ZTQ69VeOdZw+zo3DRfBmOJomMQMnpOpSwL6nK2g5x 6n2yI20b83Xjq3L2pXPFWDTYf4nswaFFc3DKejc6NA6FNpZO8d+cLuWogVl4rhYwA2 NGrPD60luueKrl1STDCv9t5E6uWhEsvDib1+YY6H3Xa0bLCr00yNOrVUD5jUc545pg ThBLAgzeQMZ45hcD16vDWvixlrBQzKZSB7VtbT7eo6/B5DTm0J1lKB9lpappP+nbUg KmaJvO6xGNP1w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B4F4469118 for ; Tue, 6 Jan 2026 07:28:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709737; bh=Kwb5mi8ESDit1JImSwpeeV+Bo6ZehAwyf9UCm7K3Pjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LOZn5T84io5Q+OlhdZc2w8QBimrdfcH32Fruq3JWVZ4uunpxWf1vL6WX1blBMC2Y1 OJRepytsljOafxv8uvSdvSU3Y6/lGvOZkkt+I1FhY8+8+GpFGDlbg/hv6Qw16hmSVh UBst1uo5+flY+eh3QUStXb7LmPLmx1oXXNl5j0MEF2AY15jNBu/ZJgAGQKjIXbaUmW RFRdKjzYBCuGIowfLF+SNl62F+h8iI3KLMkU9Rc9+QyLE0MIM5D0CQ9B6RVS6iff+b WUCGfWXDX+ChfkYz1vaPJGVQPWz8ds5j2sXmXWzIqJ7DALYtxGEtOlZQ/pAofmALY+ hQFmpM/9NFdTw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6FC5E6912C; Tue, 6 Jan 2026 07:28:57 -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 s4aMIcM29g_I; Tue, 6 Jan 2026 07:28:57 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709733; bh=3krWZ9ybEEr/gQuqXpgRYQPHXA+P7nOb/SNCXnLtAIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hVwLfWbqxLMQxJ7FFMt4NHlYDwfV8vW1sbEBU6k+OXoO2FKWV0MN+t/YZZzdy4qO/ 17kcY7k5DPqQ6DEeMhF+U8e1i3MN7WTG1V7vpxBLTV7vBTKwymS0EjMwhBLyt1PZ91 3g6HDJ6MjrUuHX+Uy7IYNiSuDaOKdVcUUHz6NLvGd1RsFRU3Ao4uUtpwHjo1Fm66iv W8JJ0FvSnZ3hd+f5mrKTOo6UfSBYMVumR/2DPQUhwWTyOtud76/ibcF75KN3ciTdRI cqkYfbBgFzLb2bo/8MlI+VfGPVSsLw8qhg7WO6oppbjpqRXoIML/SjGucZaBw/CNbi HeP3oeYzfupzg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D98F469118; Tue, 6 Jan 2026 07:28:52 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:08 -0700 Message-ID: <20260106142834.2511220-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: JQVN6UHYERKG5D6CQ5J7CYLTKVLNA4AB X-Message-ID-Hash: JQVN6UHYERKG5D6CQ5J7CYLTKVLNA4AB 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 03/22] buildman: Convert to f-strings in test.py 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 Convert % string formatting to f-strings for better readability and to address pylint C0209 warnings. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 45 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 735d93a0b7b..1e681b0595c 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -207,8 +207,8 @@ class TestBuild(unittest.TestCase): boardnum = int(brd.target[-1]) result.return_code = 0 result.stderr = '' - result.stdout = ('This is the test output for board %s, commit %s' % - (brd.target, commit.hash)) + result.stdout = (f'This is the test output for board {brd.target}, ' + f'commit {commit.hash}') if ((boardnum >= 1 and boardnum >= commit.sequence) or boardnum == 4 and commit.sequence == 6): result.return_code = commit.return_code @@ -224,12 +224,12 @@ class TestBuild(unittest.TestCase): col = self._col expected_colour = (col.GREEN if outcome == OUTCOME_OK else col.YELLOW if outcome == OUTCOME_WARN else col.RED) - expect = '%10s: ' % arch + expect = f'{arch:>10}: ' # TODO(sjg@chromium.org): If plus is '', we shouldn't need this expect += ' ' + col.build(expected_colour, plus) expect += ' ' for brd in brds: - expect += col.build(expected_colour, ' %s' % brd) + expect += col.build(expected_colour, f' {brd}') self.assertEqual(text, expect) def _SetupTest(self, echo_lines=False, threads=1, **kwdisplay_args): @@ -301,7 +301,7 @@ class TestBuild(unittest.TestCase): expect = self._col.build(colour, prefix + '(') expect += self._col.build(self._col.MAGENTA, brds, bright=False) - expect += self._col.build(colour, ') %s' % line) + expect += self._col.build(colour, f') {line}') else: expect = self._col.build(colour, prefix + line) new_lines.append(expect) @@ -316,7 +316,7 @@ class TestBuild(unittest.TestCase): boards4 = 'board4' if list_error_boards else '' # Upstream commit: migration warnings only - self.assertEqual(next(lines).text, '01: %s' % commits[0][1]) + self.assertEqual(next(lines).text, f'01: {commits[0][1]}') if not filter_migration_warnings: self.assertSummary(next(lines).text, 'arm', 'w+', @@ -330,7 +330,7 @@ class TestBuild(unittest.TestCase): add_line_prefix('+', boards01234, migration, col.RED)) # Second commit: all archs should fail with warnings - self.assertEqual(next(lines).text, '02: %s' % commits[1][1]) + self.assertEqual(next(lines).text, f'02: {commits[1][1]}') if filter_migration_warnings: self.assertSummary(next(lines).text, 'arm', 'w+', @@ -345,7 +345,7 @@ class TestBuild(unittest.TestCase): add_line_prefix('w+', boards1234, errors[0], col.YELLOW)) # Third commit: Still fails - self.assertEqual(next(lines).text, '03: %s' % commits[2][1]) + self.assertEqual(next(lines).text, f'03: {commits[2][1]}') if filter_migration_warnings: self.assertSummary(next(lines).text, 'arm', '', ['board1'], outcome=OUTCOME_OK) @@ -358,15 +358,15 @@ class TestBuild(unittest.TestCase): add_line_prefix('+', boards234, errors[1], col.RED)) # Fourth commit: Compile errors are fixed, just have warning for board3 - self.assertEqual(next(lines).text, '04: %s' % commits[3][1]) + self.assertEqual(next(lines).text, f'04: {commits[3][1]}') if filter_migration_warnings: - expect = '%10s: ' % 'powerpc' + expect = f"{'powerpc':>10}: " expect += ' ' + col.build(col.GREEN, '') expect += ' ' - expect += col.build(col.GREEN, ' %s' % 'board2') + expect += col.build(col.GREEN, ' board2') expect += ' ' + col.build(col.YELLOW, 'w+') expect += ' ' - expect += col.build(col.YELLOW, ' %s' % 'board3') + expect += col.build(col.YELLOW, ' board3') self.assertEqual(next(lines).text, expect) else: self.assertSummary(next(lines).text, 'powerpc', 'w+', @@ -384,7 +384,7 @@ class TestBuild(unittest.TestCase): add_line_prefix('w+', boards34, errors[2], col.YELLOW)) # Fifth commit - self.assertEqual(next(lines).text, '05: %s' % commits[4][1]) + self.assertEqual(next(lines).text, f'05: {commits[4][1]}') if filter_migration_warnings: self.assertSummary(next(lines).text, 'powerpc', '', ['board3'], outcome=OUTCOME_OK) @@ -403,7 +403,7 @@ class TestBuild(unittest.TestCase): add_line_prefix('w-', boards34, errors[2], col.CYAN)) # Sixth commit - self.assertEqual(next(lines).text, '06: %s' % commits[5][1]) + self.assertEqual(next(lines).text, f'06: {commits[5][1]}') if filter_migration_warnings: self.assertSummary(next(lines).text, 'sandbox', '', ['board4'], outcome=OUTCOME_OK) @@ -421,7 +421,7 @@ class TestBuild(unittest.TestCase): add_line_prefix('w-', boards4, errors[0], col.CYAN)) # Seventh commit - self.assertEqual(next(lines).text, '07: %s' % commits[6][1]) + self.assertEqual(next(lines).text, f'07: {commits[6][1]}') if filter_migration_warnings: self.assertSummary(next(lines).text, 'sandbox', '+', ['board4']) else: @@ -571,16 +571,15 @@ class TestBuild(unittest.TestCase): 'sandbox']), ({'all': ['board4'], 'sandbox': ['board4']}, [])) def CheckDirs(self, build, dirname): - self.assertEqual('base%s' % dirname, build.get_output_dir(1)) - self.assertEqual('base%s/fred' % dirname, - build.get_build_dir(1, 'fred')) - self.assertEqual('base%s/fred/done' % dirname, + self.assertEqual(f'base{dirname}', build.get_output_dir(1)) + self.assertEqual(f'base{dirname}/fred', build.get_build_dir(1, 'fred')) + self.assertEqual(f'base{dirname}/fred/done', build.get_done_file(1, 'fred')) - self.assertEqual('base%s/fred/u-boot.sizes' % dirname, + self.assertEqual(f'base{dirname}/fred/u-boot.sizes', build.get_func_sizes_file(1, 'fred', 'u-boot')) - self.assertEqual('base%s/fred/u-boot.objdump' % dirname, + self.assertEqual(f'base{dirname}/fred/u-boot.objdump', build.get_objdump_file(1, 'fred', 'u-boot')) - self.assertEqual('base%s/fred/err' % dirname, + self.assertEqual(f'base{dirname}/fred/err', build.get_err_file(1, 'fred')) def testOutputDir(self): @@ -589,7 +588,7 @@ class TestBuild(unittest.TestCase): build.commits = self.commits build.commit_count = len(self.commits) subject = self.commits[1].subject.translate(builder.trans_valid_chars) - dirname ='/%02d_g%s_%s' % (2, commits[1][0], subject[:20]) + dirname = f'/{2:02d}_g{commits[1][0]}_{subject[:20]}' self.CheckDirs(build, dirname) def testOutputDirCurrent(self): From patchwork Tue Jan 6 14:28: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: 1285 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=1767709745; bh=dJ+dSX0KI9KQs3+hV4zykuWMKGkG0GZU9nAokvP+xNg=; 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=D9wER4vKvXX4PlZpAGx78vUOvb09Holl3GfhPdAh11oxz5qItdYejF0aYFJzeXeWT oUYnTS+dhes3OzKWw7L974dBfTGVpG6forTehuWTyF7EOG63pjckCqgZ4kC+oDeST/ pEt4119Zi9FPvm2dK02w7xpAHeZliB1xfuOlmjIbkdufrx4Ei4EkROnaWUcxMDQHob Usg8wuXls9bAJTmmUfZ4RC0gm/7u6HqpLj/mw0lGoUvlBuKPmUW1iFnCRBxxGuoKib WEGR9XmKdwj02JP/iUtBeevbvIFraG+PuzdiCw+GUW2XiHg9cHMwbvtqD6CWIhwOGN pxorgJF7LbVHQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 020E46912C for ; Tue, 6 Jan 2026 07:29:05 -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 GmjQSRtPmTyi for ; Tue, 6 Jan 2026 07:29:04 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709744; bh=dJ+dSX0KI9KQs3+hV4zykuWMKGkG0GZU9nAokvP+xNg=; 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=VaZZRzOCLlb//LDEZqMSMmOBEz5zzeVsN5azqpiNkTcR12iulScCOKScuX9jP3hX8 DGUpXw1C+ur/g8dyk38m9TmDXviHOXa8ndukvtDLfgxdZY+ljbKFRU2B6tQ1RKWkJR +bzku/YBZW28Pm4/oRBDxZ5HMaNbHQ13btycC/NTDxP1NOz/YFawVXkrXfN+PJW3xO zieq33PQXT4w2mv9iQjJIMh8BuGgkMnaO86sKBzcca0UwTSaFxUqPn6yJlI5DkrQXZ Akou2tuP0oy2PUHQnUgX4i56DH4QTQHeUL9v+lxU2ZqaVO0sVSEjs1BEzMjUYEgmoY 3tTdvkBA/l3/w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E3CC669121 for ; Tue, 6 Jan 2026 07:29:04 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709742; bh=8ItIJwZz41jjNWqmXS+ZtZJSE+RJM0AcyC+xAtKYJvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rrhAB+IFf8XzmV8VhAhmDzOsY5p22dBhniVfTgwPnBUQd3/ydMJU4StgnOSBDTbl6 0nFgtpgq6E0x282HnxUtskHpqHtTFjH/epMlWvvod4nlTQRji8lZ91w9mLPf1DDKec w4uORIwEaxWXU7i/D/4bWQJDOJVIDNb0C+1xYDn+dpzORSOFJNqX1GMpf6FupyWre1 w8WKElOg+FtdLkYRmDE2ChmI+wOhhLxIJH7qQOqVYD9Wifv4StA2U19b0defRKSQD0 YiU5NsZqol7urHDHMVy/lr3heHq9UUc9UQQ1evl4G1LA785X02c+swreHUfV3RmN2J GbpvqARZRhaNQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 42B7069121; Tue, 6 Jan 2026 07:29:02 -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 D6UCv_LhQRJJ; Tue, 6 Jan 2026 07:29:02 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709738; bh=1aXJ3PDTP/hkc6jlmILp96NJ35BOOlD2EXh4XBGU9ig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R+yywA+MW08otVvEIGtO+O3Iovfk9CX9sArgEic1qXljOD50bUDGDnU9ngH0Jw++c IyigI+C7eRIQMnQ45jlZtocxdwF4wU8BjRAZPbf58caozjRPptFKqdjBj3XQqTMt0b SnBobb4T+e5mM7hxs0Pr6koMtAl4dDdghxUkoGCXmIR3Y1D2ldaglWibZjlFJ3wqjA KPj0Az8JbET2YsSoxQYbYjlB1lyP50BdHFRlQBqXja3MzN3h2F6frjhi+AqwtBlIKa UipIGnizXfBkZ7OEbqSizTh/k6pDVZrHk629VrDMCbXetlJQZ+u2QLM1OnNBySxP2A sM732lGCs9qMw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id AF4F269134; Tue, 6 Jan 2026 07:28:57 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:09 -0700 Message-ID: <20260106142834.2511220-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: IGRMTWPFXLIKYHH5IEKJLXW6DXQVUHUR X-Message-ID-Hash: IGRMTWPFXLIKYHH5IEKJLXW6DXQVUHUR 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 04/22] buildman: Fix import order in test.py 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 standard library imports before third-party imports and remove unused test_util import. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 1e681b0595c..f97025b55b0 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -2,7 +2,6 @@ # Copyright (c) 2012 The Chromium OS Authors. # -from filelock import FileLock import os import shutil import sys @@ -11,6 +10,8 @@ import time import unittest from unittest.mock import patch +from filelock import FileLock + from buildman import board from buildman import boards from buildman import bsettings @@ -22,7 +23,6 @@ from buildman import toolchain from patman import commit from u_boot_pylib import command from u_boot_pylib import terminal -from u_boot_pylib import test_util from u_boot_pylib import tools use_network = True From patchwork Tue Jan 6 14:28:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1286 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=1767709750; bh=izR+WUtRGXgfLsLrb/culH+e/qsETFIDwxc1GxT6jro=; 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=tIgIN2rNYX19i7DTpzaCbEIak0musn6CoaNTqAh3j9mP6uZz5NSsGVgf8W0/jqMGQ 2fQb+8NcUQzQ8Ni/mMwwjRb9fHHWnrFdTpLVljBNISdSxovqJaEuL6vVQw6aCxdNW5 4kZj1GB3UHVt+4DFlQbyGjck046d2II+neEbMiLXPzB0ukbzDRwR+zthax9HdmWT7S 8uQ+/BY+Gvfi2Wm0JaYD60TiJvginIIByWW917RI2mP5idOwH2HEcrs5e7UOCO7ZwA QA1Wi9uo7U72Ei4VA6UkU687rtN70dsjZQ60x0gLvBt/+kn7p+tkLsiA8HHxhqusXf OqcxtVjz5qoiQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8C72069054 for ; Tue, 6 Jan 2026 07:29:10 -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 2JKsWmmKutAG for ; Tue, 6 Jan 2026 07:29:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709750; bh=izR+WUtRGXgfLsLrb/culH+e/qsETFIDwxc1GxT6jro=; 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=tIgIN2rNYX19i7DTpzaCbEIak0musn6CoaNTqAh3j9mP6uZz5NSsGVgf8W0/jqMGQ 2fQb+8NcUQzQ8Ni/mMwwjRb9fHHWnrFdTpLVljBNISdSxovqJaEuL6vVQw6aCxdNW5 4kZj1GB3UHVt+4DFlQbyGjck046d2II+neEbMiLXPzB0ukbzDRwR+zthax9HdmWT7S 8uQ+/BY+Gvfi2Wm0JaYD60TiJvginIIByWW917RI2mP5idOwH2HEcrs5e7UOCO7ZwA QA1Wi9uo7U72Ei4VA6UkU687rtN70dsjZQ60x0gLvBt/+kn7p+tkLsiA8HHxhqusXf OqcxtVjz5qoiQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 78D2669121 for ; Tue, 6 Jan 2026 07:29:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709747; bh=xkEE9nOx/UYd2qG+y21ySaJK7MLwUYdKoxF9Ag1HpjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EmQPbBW/0GXrWovfCrTWxeUrkfQwUmrZN/KIboEg5cZjFtZzK6ZQIcB/jE+loRdV8 Qwq06jHEn7anAjqnpAOReeGMH4QF1gs6wYA+dve3H71O6svmCPw3CDS+hb7Zg1xnjj 4sfSi9U3X40SaxkcIoumG1nZ276/DDiyzdRddsQtSkD2/WObASb2FtX3BkBqiJ0XDA zdiGUxNOVVKfe9EzCbQJs/WGwkN4LuyK/o7/3tC4AmrEoLFnqvag4xGAxhyeWKhqzY 1vsTZ3q5nHh2AX4hmZnilKdsPBYmAbrtFgrF3NvjpC+ml0X31rzk7G38vJM+DBsiZg Ue6yXfjLWrrpA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6EAC369121; Tue, 6 Jan 2026 07:29:07 -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 EVh9h4Vc-7rQ; Tue, 6 Jan 2026 07:29:07 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709742; bh=buTMdgKoWbsA6wCKceOWmegjgDiWqoT+FZV9jbNfULA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gza3KECua0NapqGGCmNa5ZjUiHdeC+WrfvW3NLpjkwPTOBL7SsI4USg7Dc+k9/hJ4 +G9MGOvf7MduVaq9LFPkD4M1VQ8u4tHhQLwuHXG+KjutgoAhg/FT8upuSWMIE1cDmx wkfcsfdoOmwFJETY53fZ7bykwg8SMLiR5cr1UALrM85AxCH79AXzSyuy0vbl1iqah4 IL3ou2jmWxNXp/ICGAkJiRDbRpSKxomXFhbOPBSskITptbSz+Ypwz5990z459Kt8/B Cr1ICQWHbV8ge+A2PKH/Rwu+8ELs3/oZ8DXzlLlYnexWe9whJb29vBaIMOdccYytoo Nvmd/3OrgOKmQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 637B169054; Tue, 6 Jan 2026 07:29:02 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:10 -0700 Message-ID: <20260106142834.2511220-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: CBTPQPTRYR6C4XNWARNNGS2FHOE6ETED X-Message-ID-Hash: CBTPQPTRYR6C4XNWARNNGS2FHOE6ETED 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 05/22] buildman: Convert CamelCase to snake_case in test.py 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 Rename functions and methods to use snake_case naming style to conform to Python naming conventions and fix pylint C0103 warnings. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 130 ++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index f97025b55b0..69d81da4a22 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -202,7 +202,7 @@ class TestBuild(unittest.TestCase): def tearDown(self): shutil.rmtree(self.base_dir) - def Make(self, commit, brd, stage, *args, **kwargs): + def make(self, commit, brd, stage, *args, **kwargs): result = command.CommandResult() boardnum = int(brd.target[-1]) result.return_code = 0 @@ -220,7 +220,7 @@ class TestBuild(unittest.TestCase): result.combined = result.stdout + result.stderr return result - def assertSummary(self, text, arch, plus, brds, outcome=OUTCOME_ERR): + def assert_summary(self, text, arch, plus, brds, outcome=OUTCOME_ERR): col = self._col expected_colour = (col.GREEN if outcome == OUTCOME_OK else col.YELLOW if outcome == OUTCOME_WARN else col.RED) @@ -232,7 +232,7 @@ class TestBuild(unittest.TestCase): expect += col.build(expected_colour, f' {brd}') self.assertEqual(text, expect) - def _SetupTest(self, echo_lines=False, threads=1, **kwdisplay_args): + def _setup_test(self, echo_lines=False, threads=1, **kwdisplay_args): """Set up the test by running a build and summary Args: @@ -246,7 +246,7 @@ class TestBuild(unittest.TestCase): """ build = builder.Builder(self.toolchains, self.base_dir, None, threads, 2, checkout=False, show_unknown=False) - build.do_make = self.Make + build.do_make = self.make board_selected = self.brds.get_selected_dict() # Build the boards for the pre-defined commits and warnings/errors @@ -268,7 +268,7 @@ class TestBuild(unittest.TestCase): terminal.echo_print_test_lines() return iter(terminal.get_print_test_lines()) - def _CheckOutput(self, lines, list_error_boards=False, + def _check_output(self, lines, list_error_boards=False, filter_dtb_warnings=False, filter_migration_warnings=False): """Check for expected output from the build summary @@ -319,11 +319,11 @@ class TestBuild(unittest.TestCase): self.assertEqual(next(lines).text, f'01: {commits[0][1]}') if not filter_migration_warnings: - self.assertSummary(next(lines).text, 'arm', 'w+', + self.assert_summary(next(lines).text, 'arm', 'w+', ['board0', 'board1'], outcome=OUTCOME_WARN) - self.assertSummary(next(lines).text, 'powerpc', 'w+', + self.assert_summary(next(lines).text, 'powerpc', 'w+', ['board2', 'board3'], outcome=OUTCOME_WARN) - self.assertSummary(next(lines).text, 'sandbox', 'w+', ['board4'], + self.assert_summary(next(lines).text, 'sandbox', 'w+', ['board4'], outcome=OUTCOME_WARN) self.assertEqual(next(lines).text, @@ -333,11 +333,11 @@ class TestBuild(unittest.TestCase): self.assertEqual(next(lines).text, f'02: {commits[1][1]}') if filter_migration_warnings: - self.assertSummary(next(lines).text, 'arm', 'w+', + self.assert_summary(next(lines).text, 'arm', 'w+', ['board1'], outcome=OUTCOME_WARN) - self.assertSummary(next(lines).text, 'powerpc', 'w+', + self.assert_summary(next(lines).text, 'powerpc', 'w+', ['board2', 'board3'], outcome=OUTCOME_WARN) - self.assertSummary(next(lines).text, 'sandbox', 'w+', ['board4'], + self.assert_summary(next(lines).text, 'sandbox', 'w+', ['board4'], outcome=OUTCOME_WARN) # Second commit: The warnings should be listed @@ -347,11 +347,11 @@ class TestBuild(unittest.TestCase): # Third commit: Still fails self.assertEqual(next(lines).text, f'03: {commits[2][1]}') if filter_migration_warnings: - self.assertSummary(next(lines).text, 'arm', '', + self.assert_summary(next(lines).text, 'arm', '', ['board1'], outcome=OUTCOME_OK) - self.assertSummary(next(lines).text, 'powerpc', '+', + self.assert_summary(next(lines).text, 'powerpc', '+', ['board2', 'board3']) - self.assertSummary(next(lines).text, 'sandbox', '+', ['board4']) + self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) # Expect a compiler error self.assertEqual(next(lines).text, @@ -369,9 +369,9 @@ class TestBuild(unittest.TestCase): expect += col.build(col.YELLOW, ' board3') self.assertEqual(next(lines).text, expect) else: - self.assertSummary(next(lines).text, 'powerpc', 'w+', + self.assert_summary(next(lines).text, 'powerpc', 'w+', ['board2', 'board3'], outcome=OUTCOME_WARN) - self.assertSummary(next(lines).text, 'sandbox', 'w+', ['board4'], + self.assert_summary(next(lines).text, 'sandbox', 'w+', ['board4'], outcome=OUTCOME_WARN) # Compile error fixed @@ -386,9 +386,9 @@ class TestBuild(unittest.TestCase): # Fifth commit self.assertEqual(next(lines).text, f'05: {commits[4][1]}') if filter_migration_warnings: - self.assertSummary(next(lines).text, 'powerpc', '', ['board3'], + self.assert_summary(next(lines).text, 'powerpc', '', ['board3'], outcome=OUTCOME_OK) - self.assertSummary(next(lines).text, 'sandbox', '+', ['board4']) + self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) # The second line of errors[3] is a duplicate, so buildman will drop it expect = errors[3].rstrip().split('\n') @@ -405,10 +405,10 @@ class TestBuild(unittest.TestCase): # Sixth commit self.assertEqual(next(lines).text, f'06: {commits[5][1]}') if filter_migration_warnings: - self.assertSummary(next(lines).text, 'sandbox', '', ['board4'], + self.assert_summary(next(lines).text, 'sandbox', '', ['board4'], outcome=OUTCOME_OK) else: - self.assertSummary(next(lines).text, 'sandbox', 'w+', ['board4'], + self.assert_summary(next(lines).text, 'sandbox', 'w+', ['board4'], outcome=OUTCOME_WARN) # The second line of errors[3] is a duplicate, so buildman will drop it @@ -423,13 +423,13 @@ class TestBuild(unittest.TestCase): # Seventh commit self.assertEqual(next(lines).text, f'07: {commits[6][1]}') if filter_migration_warnings: - self.assertSummary(next(lines).text, 'sandbox', '+', ['board4']) + self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) else: - self.assertSummary(next(lines).text, 'arm', '', ['board0', 'board1'], + self.assert_summary(next(lines).text, 'arm', '', ['board0', 'board1'], outcome=OUTCOME_OK) - self.assertSummary(next(lines).text, 'powerpc', '', + self.assert_summary(next(lines).text, 'powerpc', '', ['board2', 'board3'], outcome=OUTCOME_OK) - self.assertSummary(next(lines).text, 'sandbox', '+', ['board4']) + self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) # Pick out the correct error lines expect_str = errors[4].rstrip().replace('%(basedir)s', '').split('\n') @@ -449,47 +449,47 @@ class TestBuild(unittest.TestCase): self.assertEqual(next(lines).text, add_line_prefix('w+', boards4, expect, col.YELLOW)) - def testOutput(self): + def test_output(self): """Test basic builder operation and output This does a line-by-line verification of the summary output. """ - lines = self._SetupTest(show_errors=True) - self._CheckOutput(lines, list_error_boards=False, + lines = self._setup_test(show_errors=True) + self._check_output(lines, list_error_boards=False, filter_dtb_warnings=False) - def testErrorBoards(self): + def test_error_boards(self): """Test output with --list-error-boards 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) + lines = self._setup_test(show_errors=True, list_error_boards=True) + self._check_output(lines, list_error_boards=True) - def testFilterDtb(self): + def test_filter_dtb(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, filter_dtb_warnings=True) + lines = self._setup_test(show_errors=True, filter_dtb_warnings=True) + self._check_output(lines, filter_dtb_warnings=True) - def testFilterMigration(self): + def test_filter_migration(self): """Test output with --filter-migration-warnings This does a line-by-line verification of the summary output. """ - lines = self._SetupTest(show_errors=True, + lines = self._setup_test(show_errors=True, filter_migration_warnings=True) - self._CheckOutput(lines, filter_migration_warnings=True) + self._check_output(lines, filter_migration_warnings=True) - def testSingleThread(self): + def test_single_thread(self): """Test operation without threading""" - lines = self._SetupTest(show_errors=True, threads=0) - self._CheckOutput(lines, list_error_boards=False, + lines = self._setup_test(show_errors=True, threads=0) + self._check_output(lines, list_error_boards=False, filter_dtb_warnings=False) - def _testGit(self): + def _test_git(self): """Test basic builder operation by building a branch""" options = Options() options.git = os.getcwd() @@ -510,18 +510,18 @@ class TestBuild(unittest.TestCase): args = ['tegra20'] control.do_buildman(options, args) - def testBoardSingle(self): + def test_board_single(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['sandbox']), ({'all': ['board4'], 'sandbox': ['board4']}, [])) - def testBoardArch(self): + def test_board_arch(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['arm']), ({'all': ['board0', 'board1'], 'arm': ['board0', 'board1']}, [])) - def testBoardArchSingle(self): + def test_board_arch_single(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['arm sandbox']), ({'sandbox': ['board4'], @@ -529,20 +529,20 @@ class TestBuild(unittest.TestCase): 'arm': ['board0', 'board1']}, [])) - def testBoardArchSingleMultiWord(self): + def test_board_arch_single_multi_word(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['arm', 'sandbox']), ({'sandbox': ['board4'], 'all': ['board0', 'board1', 'board4'], 'arm': ['board0', 'board1']}, [])) - def testBoardSingleAnd(self): + def test_board_single_and(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['Tester & arm']), ({'Tester&arm': ['board0', 'board1'], 'all': ['board0', 'board1']}, [])) - def testBoardTwoAnd(self): + def test_board_two_and(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['Tester', '&', 'arm', 'Tester' '&', 'powerpc', @@ -553,24 +553,24 @@ class TestBuild(unittest.TestCase): 'Tester&powerpc': ['board2', 'board3'], 'Tester&arm': ['board0', 'board1']}, [])) - def testBoardAll(self): + def test_board_all(self): """Test single board selection""" self.assertEqual(self.brds.select_boards([]), ({'all': ['board0', 'board1', 'board2', 'board3', 'board4']}, [])) - def testBoardRegularExpression(self): + def test_board_regular_expression(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['T.*r&^Po']), ({'all': ['board2', 'board3'], 'T.*r&^Po': ['board2', 'board3']}, [])) - def testBoardDuplicate(self): + def test_board_duplicate(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['sandbox sandbox', 'sandbox']), ({'all': ['board4'], 'sandbox': ['board4']}, [])) - def CheckDirs(self, build, dirname): + def check_dirs(self, build, dirname): self.assertEqual(f'base{dirname}', build.get_output_dir(1)) self.assertEqual(f'base{dirname}/fred', build.get_build_dir(1, 'fred')) self.assertEqual(f'base{dirname}/fred/done', @@ -582,31 +582,31 @@ class TestBuild(unittest.TestCase): self.assertEqual(f'base{dirname}/fred/err', build.get_err_file(1, 'fred')) - def testOutputDir(self): + def test_output_dir(self): build = builder.Builder(self.toolchains, BASE_DIR, None, 1, 2, checkout=False, show_unknown=False) build.commits = self.commits build.commit_count = len(self.commits) subject = self.commits[1].subject.translate(builder.trans_valid_chars) dirname = f'/{2:02d}_g{commits[1][0]}_{subject[:20]}' - self.CheckDirs(build, dirname) + self.check_dirs(build, dirname) - def testOutputDirCurrent(self): + def test_output_dir_current(self): build = builder.Builder(self.toolchains, BASE_DIR, None, 1, 2, checkout=False, show_unknown=False) build.commits = None build.commit_count = 0 - self.CheckDirs(build, '/current') + self.check_dirs(build, '/current') - def testOutputDirNoSubdirs(self): + def test_output_dir_no_subdirs(self): build = builder.Builder(self.toolchains, BASE_DIR, None, 1, 2, checkout=False, show_unknown=False, no_subdirs=True) build.commits = None build.commit_count = 0 - self.CheckDirs(build, '') + self.check_dirs(build, '') - def testToolchainAliases(self): + def test_toolchain_aliases(self): self.assertTrue(self.toolchains.select('arm') != None) with self.assertRaises(ValueError): self.toolchains.select('no-arch') @@ -621,7 +621,7 @@ class TestBuild(unittest.TestCase): self.toolchains.add('i386-linux-gcc', test=False) self.assertTrue(self.toolchains.select('x86') != None) - def testToolchainDownload(self): + def test_toolchain_download(self): """Test that we can download toolchains""" if use_network: with terminal.capture() as (stdout, stderr): @@ -630,7 +630,7 @@ class TestBuild(unittest.TestCase): 'crosstool/files/bin/x86_64/.*/' 'x86_64-gcc-.*-nolibc[-_]arm-.*linux-gnueabi.tar.xz') - def testGetEnvArgs(self): + def test_get_env_args(self): """Test the GetEnvArgs() function""" tc = self.toolchains.select('arm') self.assertEqual('arm-linux-', @@ -662,7 +662,7 @@ class TestBuild(unittest.TestCase): tc = self.toolchains.select('sandbox') self.assertEqual('', tc.get_env_args(toolchain.VAR_CROSS_COMPILE)) - def testMakeEnvironment(self): + def test_make_environment(self): """Test the make_environment function""" os.environ.pop('CROSS_COMPILE', None) tc = self.toolchains.select('arm') @@ -685,8 +685,8 @@ class TestBuild(unittest.TestCase): env = tc.make_environment(False) self.assertTrue(b'CROSS_COMPILE' not in env) - def testPrepareOutputSpace(self): - def _Touch(fname): + def test_prepare_output_space(self): + def _touch(fname): tools.write_file(os.path.join(base_dir, fname), b'') base_dir = tempfile.mkdtemp() @@ -696,7 +696,7 @@ class TestBuild(unittest.TestCase): '01_g2938abd8_title'] to_leave = ['something_else', '01-something.patch', '01_another'] for name in to_remove + to_leave: - _Touch(name) + _touch(name) build = builder.Builder(self.toolchains, base_dir, None, 1, 2) build.commits = self.commits @@ -1069,7 +1069,7 @@ class TestBuild(unittest.TestCase): finally: os.environ['PATH'] = old_path - def testHomedir(self): + def test_homedir(self): """Test using ~ in a toolchain or toolchain-prefix section""" # Add some test settings bsettings.setup(None) @@ -1109,7 +1109,7 @@ class TestBuild(unittest.TestCase): self.assertEqual('', next(lines)) self.assertEqual('##done', next(lines)) - def testKconfigChangedSince(self): + def test_kconfig_changed_since(self): """Test the kconfig_changed_since() function""" with tempfile.TemporaryDirectory() as tmpdir: # Create a reference file From patchwork Tue Jan 6 14:28:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1287 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=1767709753; bh=9sFeGDbzEF+93zSr5aHnOFHWxbdgQEaYB23/H9UFEIw=; 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=kIhRfnZDSOrYH7G46rhbDUi8IrgDNqx6wcv1a5lMMKLGx0tSTdAE1lCmDONP8cRz8 5h7JrBmxBqxmqHEYHedHoKd5a4Y9+yAR/VRBuk2C3xScoMCAaXtEICLOGBUF1/sRA9 DJGKJ5hyMFIkPX2OMmVElKCv62N/V/WxMV8xdNnZ8x/KQAo4HkquANhh8Vqd/zKGeh QdNqBKEssIi5rbxHhaVuLCSD6ItiWZCkMv9DaJ652e3qSMjODZNMxBdC0fXKRWEKo8 Yd3SZK+0CWxU/hy4tXEK3dzJ/tY9uw8yxlPD37w7i+4WnehcDTj/AXm4n+zSHHeK+f ZITYT4U9K5Rlg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1EC6D69054 for ; Tue, 6 Jan 2026 07:29:13 -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 0RM9T2zcQJZm for ; Tue, 6 Jan 2026 07:29:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709753; bh=9sFeGDbzEF+93zSr5aHnOFHWxbdgQEaYB23/H9UFEIw=; 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=kIhRfnZDSOrYH7G46rhbDUi8IrgDNqx6wcv1a5lMMKLGx0tSTdAE1lCmDONP8cRz8 5h7JrBmxBqxmqHEYHedHoKd5a4Y9+yAR/VRBuk2C3xScoMCAaXtEICLOGBUF1/sRA9 DJGKJ5hyMFIkPX2OMmVElKCv62N/V/WxMV8xdNnZ8x/KQAo4HkquANhh8Vqd/zKGeh QdNqBKEssIi5rbxHhaVuLCSD6ItiWZCkMv9DaJ652e3qSMjODZNMxBdC0fXKRWEKo8 Yd3SZK+0CWxU/hy4tXEK3dzJ/tY9uw8yxlPD37w7i+4WnehcDTj/AXm4n+zSHHeK+f ZITYT4U9K5Rlg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0D57569121 for ; Tue, 6 Jan 2026 07:29:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709751; bh=mpUsaKtOQlKGy+D6NjQ3pgPkHRVrDPJl55ON0m61xM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pwvz4J/zY2EdeUrNwMJJzTjdjQ+t5G/LdenAYRovx+mMcUL4ZEI0jB/DRcFY+5jr3 bB8vwBhXFmowryQ9Wngtnk9kndgqeSKRNpL6CQPToYjWX0s/cs7wRWbGiRTwyaD46/ PPUTkgDktTzrmfuxvMIhC4Ipl4EI0Pv6/bXMhls3uNqKL1lBM4fAlhA2GdgIVubuMr /OMohllRGBGT7DNSIqbuNwMIAB6+ssDNBTz86auy2kbHKBl/Zgmw9/10bUTPQI5zFR p5g2NmJmKEnWylZW/YsniISQFelz+WaiUXO7yAfxMQ/e5QhfgOpfUTdeddmdOgoqxD dKlmQwpxERwWQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AFD3469054; Tue, 6 Jan 2026 07:29: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 10026) with ESMTP id amhbxCmO1zZg; Tue, 6 Jan 2026 07:29:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709747; bh=Pr4RSxjnfqRLhxURWAeg5ijNdgA+jx79eoZyvhwhkXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UMlQZT1anbNeVDnPYBsCW9DMP90lVQGOqxax9ZjIcIqCMqx934Kwc8IitJ5umJr5t +jUvbdZ3dkdhO0DsAI8giiFIV98mw+fsfqcdNGZw2hHTl4awnm98duyx1gVjQ8ACiG EqfCsg1+ut2i7S+6Uj++WNBtWr5rwfyBiNvRF+7kCrHLeL+086rGWXqMl7YScZzmRf 8sB/QfrFigo6WpOwDdJxC820edXYRrgSXR9RET/11MH6gzbhRGPvii/lpO7LEmuHeR hWJeyUoLmwLbLYpmY1UGu5s6cwumpku+WH5s6H6OdA5hA0yfy7meUa/u5mf9unqd9d LW/AjtJZxPeOA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3D0E569118; Tue, 6 Jan 2026 07:29:07 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:11 -0700 Message-ID: <20260106142834.2511220-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 2B2CF5BW3YTR7A2JFNJSTA6M4CAZM2I7 X-Message-ID-Hash: 2B2CF5BW3YTR7A2JFNJSTA6M4CAZM2I7 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 06/22] buildman: Add missing docstrings in test.py 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 Add docstrings to functions missing them to fix pylint C0116 warnings. Add a module-level docstring too. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 69d81da4a22..70dcf082755 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -2,6 +2,8 @@ # Copyright (c) 2012 The Chromium OS Authors. # +"""Tests for the buildman build tool""" + import os import shutil import sys @@ -203,6 +205,7 @@ class TestBuild(unittest.TestCase): shutil.rmtree(self.base_dir) def make(self, commit, brd, stage, *args, **kwargs): + """Mock make function for testing build output""" result = command.CommandResult() boardnum = int(brd.target[-1]) result.return_code = 0 @@ -221,6 +224,7 @@ class TestBuild(unittest.TestCase): return result def assert_summary(self, text, arch, plus, brds, outcome=OUTCOME_ERR): + """Check that the summary text matches expectations""" col = self._col expected_colour = (col.GREEN if outcome == OUTCOME_OK else col.YELLOW if outcome == OUTCOME_WARN else col.RED) @@ -571,6 +575,7 @@ class TestBuild(unittest.TestCase): 'sandbox']), ({'all': ['board4'], 'sandbox': ['board4']}, [])) def check_dirs(self, build, dirname): + """Check that the output directories are correct""" self.assertEqual(f'base{dirname}', build.get_output_dir(1)) self.assertEqual(f'base{dirname}/fred', build.get_build_dir(1, 'fred')) self.assertEqual(f'base{dirname}/fred/done', @@ -583,6 +588,7 @@ class TestBuild(unittest.TestCase): build.get_err_file(1, 'fred')) def test_output_dir(self): + """Test output-directory naming for a commit""" build = builder.Builder(self.toolchains, BASE_DIR, None, 1, 2, checkout=False, show_unknown=False) build.commits = self.commits @@ -592,6 +598,7 @@ class TestBuild(unittest.TestCase): self.check_dirs(build, dirname) def test_output_dir_current(self): + """Test output-directory naming for current source""" build = builder.Builder(self.toolchains, BASE_DIR, None, 1, 2, checkout=False, show_unknown=False) build.commits = None @@ -599,6 +606,7 @@ class TestBuild(unittest.TestCase): self.check_dirs(build, '/current') def test_output_dir_no_subdirs(self): + """Test output-directory naming without subdirectories""" build = builder.Builder(self.toolchains, BASE_DIR, None, 1, 2, checkout=False, show_unknown=False, no_subdirs=True) @@ -607,6 +615,7 @@ class TestBuild(unittest.TestCase): self.check_dirs(build, '') def test_toolchain_aliases(self): + """Test that toolchain aliases are handled correctly""" self.assertTrue(self.toolchains.select('arm') != None) with self.assertRaises(ValueError): self.toolchains.select('no-arch') @@ -686,6 +695,7 @@ class TestBuild(unittest.TestCase): self.assertTrue(b'CROSS_COMPILE' not in env) def test_prepare_output_space(self): + """Test preparation of output-directory space""" def _touch(fname): tools.write_file(os.path.join(base_dir, fname), b'') @@ -839,14 +849,17 @@ class TestBuild(unittest.TestCase): ['MARY="mary"', 'Missing expected line: CONFIG_MARY="mary"']], result) def get_procs(self): + """Get list of running process IDs from the running file""" running_fname = os.path.join(self.base_dir, control.RUNNING_FNAME) items = tools.read_file(running_fname, binary=False).split() return [int(x) for x in items] def get_time(self): + """Get current mock time for testing""" return self.cur_time def inc_time(self, amount): + """Increment mock time, handling process exit if scheduled""" self.cur_time += amount # Handle a process exiting @@ -855,6 +868,7 @@ class TestBuild(unittest.TestCase): if pid != self.finish_pid] def kill(self, pid, signal): + """Mock kill function that validates process IDs""" if pid not in self.valid_pids: raise OSError('Invalid PID') From patchwork Tue Jan 6 14:28:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1288 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=1767709757; bh=P5dKRpp0FRxQwC6mZ66ghDfe7sXVTvq+C0xqfTWCOVU=; 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=F1zlg22H3QtFgpGT3liGWDdi3JYaSFUiUo8oXWgLLJT5pEg001TTjt11OTafdKt65 FZpc6Kr6yneMngqDnqppoEcBgNYOveQ8AhHZ1VZ/EdTGv3cmylOPiQ8KYFFEyqYJM4 CaZJmvpHK7r1x3u5TSafnYkFWgG9FodlHEVpVxwQ4vltoRCT0jDnoIiPJN38s5AOlU +OG3EWhyLI+4h2B211RkvVd0cEm7J5peOnzGZrixDHb6TWquQ7nlxkYFAgJz4zA3el mHy0m4UHcuRkOlo7c5CTbwWWTVOdrUmpCmdmmUvGWsIJOJaECyKHZpcf+uOinrtSey SvLDotmm8CCTw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ED75169054 for ; Tue, 6 Jan 2026 07:29:17 -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 1UZzcdEeMdYr for ; Tue, 6 Jan 2026 07:29:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709757; bh=P5dKRpp0FRxQwC6mZ66ghDfe7sXVTvq+C0xqfTWCOVU=; 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=F1zlg22H3QtFgpGT3liGWDdi3JYaSFUiUo8oXWgLLJT5pEg001TTjt11OTafdKt65 FZpc6Kr6yneMngqDnqppoEcBgNYOveQ8AhHZ1VZ/EdTGv3cmylOPiQ8KYFFEyqYJM4 CaZJmvpHK7r1x3u5TSafnYkFWgG9FodlHEVpVxwQ4vltoRCT0jDnoIiPJN38s5AOlU +OG3EWhyLI+4h2B211RkvVd0cEm7J5peOnzGZrixDHb6TWquQ7nlxkYFAgJz4zA3el mHy0m4UHcuRkOlo7c5CTbwWWTVOdrUmpCmdmmUvGWsIJOJaECyKHZpcf+uOinrtSey SvLDotmm8CCTw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DB25469121 for ; Tue, 6 Jan 2026 07:29:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709756; bh=6mlyXbybEsCc+jP6+8Sbpj6cDuaqeGScx5a/SeWfG6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cP3MFHo9mTCxEOR75NXzN3FxUPM+hxV+Upb7nmIIZ/CIKuhFK66aHFlfKglSAAV2e 1pKCUl3y5AHnkgFyvpYNrg1V9ZVL4YhzYTRm9YcMyMhope3bWuYHPj9Dvsg94M8f20 RDDpITUwxXr4UFCWU/F7+adSmgjoyShxKzNWiOOWYRXzfyHn1tjQ+OCAVG8sNYFqjm GsxT9mGBHX8wyBURqWks+4BwPt2ESATGpQDsmr+otacronC3WFRNEQXAygP6v31TMk FE4LpfDCzZScxPGpHwVM6yeOq81gK7eOr4H9QVqwUjZ+hNOxBfc0DPTzbqeA1VwaB6 afHjwDZgP6REQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 66CD369054; Tue, 6 Jan 2026 07:29: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 10026) with ESMTP id 6iouVmMdD51x; Tue, 6 Jan 2026 07:29:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709752; bh=X73BRZKgrxlkiAewoTPupuFYl24F/u2/xU7lFbeLyms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hLAB5B5uPrN4Ql9a++cLXkzjuQVtE9qLUdVdVXGMAJqRg25oMld5IMOlS3RzKGRCS jTHvgb6gWPnPJVgWH5UWv+QY9PxZUDZ1L146/qwdho8WXwwVQJxAhQgBNTsa8O+smy ayER0J8hJTqzUrRtYmswwcbJkxAPaEest2CSDm/nOHXr7ztfCfM8YxU4Q9GouVUaQC 4fyDGr0T2TwlZAbBFmfhDPbxwa74lPvUv07jN5qGxYMLtSXSJ3Q8NkHEFfpxulTKUU YXfnC3G951sWu4FByF0NFvjdPSR75esE9LfUnNafEK17ebDrkrdzbFtm2spO7p7gCw cCOne/N95IBNA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id F149069118; Tue, 6 Jan 2026 07:29:11 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:12 -0700 Message-ID: <20260106142834.2511220-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: WWPEY6DE4BO75F6Q76QTEZLTTHALRSYE X-Message-ID-Hash: WWPEY6DE4BO75F6Q76QTEZLTTHALRSYE 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 07/22] buildman: Fix singleton comparisons in test.py 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 Use 'is not None' instead of '!= None' for proper singleton comparison. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 70dcf082755..430e9ee118c 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -616,7 +616,7 @@ class TestBuild(unittest.TestCase): def test_toolchain_aliases(self): """Test that toolchain aliases are handled correctly""" - self.assertTrue(self.toolchains.select('arm') != None) + self.assertTrue(self.toolchains.select('arm') is not None) with self.assertRaises(ValueError): self.toolchains.select('no-arch') with self.assertRaises(ValueError): @@ -624,11 +624,11 @@ class TestBuild(unittest.TestCase): self.toolchains = toolchain.Toolchains() self.toolchains.add('x86_64-linux-gcc', test=False) - self.assertTrue(self.toolchains.select('x86') != None) + self.assertTrue(self.toolchains.select('x86') is not None) self.toolchains = toolchain.Toolchains() self.toolchains.add('i386-linux-gcc', test=False) - self.assertTrue(self.toolchains.select('x86') != None) + self.assertTrue(self.toolchains.select('x86') is not None) def test_toolchain_download(self): """Test that we can download toolchains""" From patchwork Tue Jan 6 14:28:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1289 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=1767709762; bh=Kvd4uxgeoTgisl5lsz5I+ccxUnKIyJmn/OA6+Ryy82w=; 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=L6rgHRoHSFWY/XXwKxD1NnOybitLc12wMUx6zbfh10RBgiTuMRhN36eAJIo3RS0Rq 6q4C4IasP7lYzJ/ZWM9rw80gmCEgYDIj4PmXtorX4S/BDsWpNzEksxusKUGwBoUDaO fT1k6+LdYl6+vSZups9erpnRc+F287pMAIhT6Ci8UJqMtP66aaxFDv64s9BYpDrIc1 3bPZr6jGhO5S6j0KBJAeFkOFXhq0MK68ZG0m49vO/qLI7FncKFKLge49Opr468VBFQ +mlFAJdi/DublAyeVF9MZi+L/5LxNDkFo3YYVoRTuoJ86rlL279VsXYx5zO85Bbegx RHWOUWX10PGfQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9BCF86912C for ; Tue, 6 Jan 2026 07:29:22 -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 Agx16XkGw3iD for ; Tue, 6 Jan 2026 07:29:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709762; bh=Kvd4uxgeoTgisl5lsz5I+ccxUnKIyJmn/OA6+Ryy82w=; 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=L6rgHRoHSFWY/XXwKxD1NnOybitLc12wMUx6zbfh10RBgiTuMRhN36eAJIo3RS0Rq 6q4C4IasP7lYzJ/ZWM9rw80gmCEgYDIj4PmXtorX4S/BDsWpNzEksxusKUGwBoUDaO fT1k6+LdYl6+vSZups9erpnRc+F287pMAIhT6Ci8UJqMtP66aaxFDv64s9BYpDrIc1 3bPZr6jGhO5S6j0KBJAeFkOFXhq0MK68ZG0m49vO/qLI7FncKFKLge49Opr468VBFQ +mlFAJdi/DublAyeVF9MZi+L/5LxNDkFo3YYVoRTuoJ86rlL279VsXYx5zO85Bbegx RHWOUWX10PGfQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 89B5D69121 for ; Tue, 6 Jan 2026 07:29:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709760; bh=qzSeIi7fiLOK0a3OE8Xf71YVC7OpU1TTp+wyJJCiVZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QbCA75UCyJ8gAYUkBZCHQ8U+S/8frI91v8FqFvXrw2I8RCFsHG49DeX4iePXkeoT6 suWYuabnjnjfz/YEQN76UhjPQyacDG5Hok2p1blZdGItn7b4PBO9O75EbUTYU7WUEW fib6xc4/Alo5eB88T36cTJDsgYZhtp/MmRG43jakcBZRpPNlHsmKmlVA1yOcofeGhl ePvHXaTBTV0r1q9Q+D2mtgY0V8k3MSFVDVfH3I8qtBzX0/oUWYaP15yTw43Tl2uvCU X6rSmc/r7fvr60eeT2LHsJjZAXUh0RmuU7cwq6J3yU3UE10+07QK7FoH2zP5owXOxG UxFR+kYDPQ88w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CE76669054; Tue, 6 Jan 2026 07:29:20 -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 KDN-bYRpvVSl; Tue, 6 Jan 2026 07:29:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709756; bh=i4dMz/iiny6We6UyZOFZ3t+wjULPIIg12HSz3sDKgBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UV18yMoloKPWoUAjnNlH6ZEqa48gMDpfPnkj5nXv8gJaS9+cc9gCrOa8K7e4KhiDk piN2V/yRkrw9H+kuiWP9sQnKVwhvv8wDI6mYobF3tWKjfNeC+8W8cSVO63hLTsyGyu wbbzxcnyrGWeQRihMqOgsBreST7WZ/irAs8UOTwqJdZcvUUs34atVeeuaOhT2oNany SBLD9e19w+Hmgq+fSSP91pAH0Fs0fEw5CzeGqfh5VaVbdD0HbRolQMOf6uq+2oZs2J BjYmm82xi4saAG6fVqGP6iZGsLFIc+ujZ1DbSjAxd4/Jp6ZoSisfGTNwlh6MCHn1ck W6e7ig+K1DYjw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id AA5F369118; Tue, 6 Jan 2026 07:29:16 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:13 -0700 Message-ID: <20260106142834.2511220-9-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: HNYR5JC2CH6ZWTRTMSQCEJMXXWRAV626 X-Message-ID-Hash: HNYR5JC2CH6ZWTRTMSQCEJMXXWRAV626 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 08/22] buildman: Use tools.write_file() in test.py 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 Replace open() calls with tools.write_file() for consistency and to fix pylint W1514 (unspecified-encoding) warnings. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 430e9ee118c..8b015e22090 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -1128,8 +1128,7 @@ class TestBuild(unittest.TestCase): with tempfile.TemporaryDirectory() as tmpdir: # Create a reference file ref_file = os.path.join(tmpdir, 'done') - with open(ref_file, 'w') as f: - f.write('0\n') + tools.write_file(ref_file, b'0\n') # Test with no Kconfig files - should return False self.assertFalse( @@ -1140,8 +1139,7 @@ class TestBuild(unittest.TestCase): # Create a Kconfig file newer than the reference kconfig = os.path.join(tmpdir, 'Kconfig') - with open(kconfig, 'w') as f: - f.write('config TEST\n') + tools.write_file(kconfig, b'config TEST\n') # Should now return True since Kconfig is newer self.assertTrue( @@ -1149,8 +1147,7 @@ class TestBuild(unittest.TestCase): # Create a new reference file (newer than Kconfig) time.sleep(0.1) - with open(ref_file, 'w') as f: - f.write('0\n') + tools.write_file(ref_file, b'0\n') # Should now return False since reference is newer self.assertFalse( @@ -1165,8 +1162,8 @@ class TestBuild(unittest.TestCase): subdir = os.path.join(tmpdir, 'sub') os.makedirs(subdir) time.sleep(0.1) - with open(os.path.join(subdir, 'Kconfig.sub'), 'w') as f: - f.write('config SUBTEST\n') + tools.write_file(os.path.join(subdir, 'Kconfig.sub'), + b'config SUBTEST\n') # Should return True due to newer Kconfig.sub in subdir self.assertTrue( @@ -1174,8 +1171,7 @@ class TestBuild(unittest.TestCase): # Create a new reference file (newer than all Kconfig files) time.sleep(0.1) - with open(ref_file, 'w') as f: - f.write('0\n') + tools.write_file(ref_file, b'0\n') # Should now return False self.assertFalse( @@ -1185,8 +1181,8 @@ class TestBuild(unittest.TestCase): configs_dir = os.path.join(tmpdir, 'configs') os.makedirs(configs_dir) time.sleep(0.1) - with open(os.path.join(configs_dir, 'sandbox_defconfig'), 'w') as f: - f.write('CONFIG_SANDBOX=y\n') + tools.write_file(os.path.join(configs_dir, 'sandbox_defconfig'), + b'CONFIG_SANDBOX=y\n') # Without target, defconfig is not checked self.assertFalse( From patchwork Tue Jan 6 14:28:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1290 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=1767709766; bh=xbuBqR9hRkLsVBDMiL0I7RXK6BGONWv+6buR41S6PoM=; 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=O65xqumcL16R+EWGj2/Onq9B4nAtL1bzagaKs7+jEScM3+obX0XcUYNZsvn8LbNwz ddYubFKdO07ayO55IMzK7Wmpr/IywpB7oInzXBnj8ROiXY7/1OADPFk9bxCkmAGp+9 4L+rBq8KbsnxchlTtsdGenLt5RFaSe1gcMHWM6Zp8R3zeMMnjVGjIyPUzt/kz2ikxQ xV4t6yD3Ryup3gii/ME2TA0S0n2mvFn9Jytk3ETtP0TTr9+vL4E/dqWjUuXJ36MKZH SnydWgCc1J5IhKFNaUHwJkAnUBO88KIzxYD+BbR3f3zhzrIHxJIGLUbZmmBCUppjvE s34qpvH9kZspA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 139326912C for ; Tue, 6 Jan 2026 07:29:26 -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 MOh2eOgKrzVF for ; Tue, 6 Jan 2026 07:29:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709766; bh=xbuBqR9hRkLsVBDMiL0I7RXK6BGONWv+6buR41S6PoM=; 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=O65xqumcL16R+EWGj2/Onq9B4nAtL1bzagaKs7+jEScM3+obX0XcUYNZsvn8LbNwz ddYubFKdO07ayO55IMzK7Wmpr/IywpB7oInzXBnj8ROiXY7/1OADPFk9bxCkmAGp+9 4L+rBq8KbsnxchlTtsdGenLt5RFaSe1gcMHWM6Zp8R3zeMMnjVGjIyPUzt/kz2ikxQ xV4t6yD3Ryup3gii/ME2TA0S0n2mvFn9Jytk3ETtP0TTr9+vL4E/dqWjUuXJ36MKZH SnydWgCc1J5IhKFNaUHwJkAnUBO88KIzxYD+BbR3f3zhzrIHxJIGLUbZmmBCUppjvE s34qpvH9kZspA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 03E0769122 for ; Tue, 6 Jan 2026 07:29:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709765; bh=0qYAtuNqQjMcX48eNoBL2gooIGYJieCuGP9AX8LqOWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BVeLiGZsCIfSVZccQhULjqZsUYTt16OUPhyDPAivBQaihoC0Mzxv9n8gxirUoUTIB Gtm/lHhrT5q2wVwpp6LDnvpgWBRvrFf8cw0ubiAVwdwqzJcbYqvb2yKOrMc+gxT0p+ Mpg+JhvzPiCaOoZ1/Hv+DU8KVpAsee6PHPL6nluW/JG/1U04hKM3jHJBfpqx7ng7ux IfgPwyO9/XJmZXleEA5vVtYklyQHJCfdw5gH6fkbYlgAA7KfqnRaPcxBKMj7OWNtxK x10Ep9K4VBFVtlRL5dMGt2tXNHzkt4rbeWlCfEsAwzGbOy6m2aPA9mZW+A/ueCHAF9 qqGn740bhkMTg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3F1FA69054; Tue, 6 Jan 2026 07:29:25 -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 MVo7vrPaa9oO; Tue, 6 Jan 2026 07:29:25 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709761; bh=SCF/mBHaQLmaEvX7QrELFr2iuEESAo7POkndcIVhmE8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W7XqGW6OZ7FbrNF3MpviAbkCbaF7QXXsLh48QhFGEnoE/Bh7366c9jLLLZPo/usAR j5EpBn8HGwQhnyrSapTBWuU6985ygSz9w75XGhS+DKsjuy7fvJqFNazcLF/Jqwv6Ia I0KaG4fNP6Uf9St7gTK673it+Yh+qJGRs7Spu8Wi0ELsyhNXUTIuu+BFZWSrCSf6Ux GQtBB7qG4Kg9FymXWNTrvkRlq9867x2ei17gSocCLJfIcnri0yA4rQtJpTK2T/X8Gs Lmoz7RfB8mLY4xEg2wWRGVwG84bEC34E8aewztgfATyhASrs4tgp0VfPqAOKk7/6cl jmo4J489zxkCQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1FE9269118; Tue, 6 Jan 2026 07:29:21 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:14 -0700 Message-ID: <20260106142834.2511220-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: MOSHASTIVD6VHXRIFWC2EOSRL7GGD5SH X-Message-ID-Hash: MOSHASTIVD6VHXRIFWC2EOSRL7GGD5SH 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 09/22] buildman: Use set comprehension in test.py 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 Use set comprehension instead of set() with list comprehension to fix pylint R1718 warning. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 8b015e22090..e59c623f6bf 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -712,7 +712,7 @@ class TestBuild(unittest.TestCase): build.commits = self.commits build.commit_count = len(commits) result = set(build._get_output_space_removals()) - expected = set([os.path.join(base_dir, f) for f in to_remove]) + expected = {os.path.join(base_dir, f) for f in to_remove} self.assertEqual(expected, result) def test_adjust_cfg_nop(self): From patchwork Tue Jan 6 14:28:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1291 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=1767709771; bh=/JTBzBdSOmGNIHL03MAkkypQmURwsowgeX9kNSubIyA=; 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=eEQ4yxf4EFvuAZ4lldPSSyPu4M8+Amj8antoGw6+QcDtG9zI6M/+VLws9+srb7tIi vVEVZjUjAQ/J9kDaMS4r0vTyEv3NOmf19OIe8Q+mC2X4BHlGtx9+gmJLEMTQgHLk9S QOz865kgNfqHlbNnfD+gNRckvZ7hSmfcCpJRjh/kLcG802mUrJUBnRg998gtv+EbDg kQ8mgKx1VuwJ3HYlrSE96f6Yl4gCLXZu6mRj8fVSt1k8C6eFzTHotqB2KkKrOCJ55t MDAanCEgdonEhGYZHlxOgQOyB11q/eCoSCQUEcTuhrw+qHEL0+h1lgMmv/D1MxIKbI 2SY8iXf3Jt13A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 818576912C for ; Tue, 6 Jan 2026 07:29:31 -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 Y7UyB7UYe4_g for ; Tue, 6 Jan 2026 07:29:31 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709771; bh=/JTBzBdSOmGNIHL03MAkkypQmURwsowgeX9kNSubIyA=; 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=eEQ4yxf4EFvuAZ4lldPSSyPu4M8+Amj8antoGw6+QcDtG9zI6M/+VLws9+srb7tIi vVEVZjUjAQ/J9kDaMS4r0vTyEv3NOmf19OIe8Q+mC2X4BHlGtx9+gmJLEMTQgHLk9S QOz865kgNfqHlbNnfD+gNRckvZ7hSmfcCpJRjh/kLcG802mUrJUBnRg998gtv+EbDg kQ8mgKx1VuwJ3HYlrSE96f6Yl4gCLXZu6mRj8fVSt1k8C6eFzTHotqB2KkKrOCJ55t MDAanCEgdonEhGYZHlxOgQOyB11q/eCoSCQUEcTuhrw+qHEL0+h1lgMmv/D1MxIKbI 2SY8iXf3Jt13A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6E6E269118 for ; Tue, 6 Jan 2026 07:29:31 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709769; bh=fPjAXDLQ8/Xk6q8zsch4Q0JGGUJDZ4bqktINDLNBzBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2OxmttvTFhhCaAEsk5vWQVyPkvzhD8LdckUO/EAwghKlHa+ihbcnpBUC5/WbZ1lD JGTUmD/oElK3hNl0Fgx+cIEM/lGu1Z+NrJxALwKCf4gDy8Fcut6HvoR7TE9TDCGvE2 r/f+esMWuU/1I3/zU+JtK1/luP4NdTpWeV7SwvCTDO86M4OXgNKXyXYljCOSQAa9eV +gpOWTwbEeCHxXqcmcC9peyNe+lJlGwnxqEXWK0suBMouvEHBBWYkCgNoD3lfBdmon RO01MoDqeCdyPxGkU18rEjXAnfe78nGsCaJ9rbdqeRge3ZFij9yDr1g+WBCNJrzXvN FR4y9EZdm6jRQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EB1F069054; Tue, 6 Jan 2026 07:29:29 -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 cMqap1-xbpSX; Tue, 6 Jan 2026 07:29:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709765; bh=8z4pwDXlFHmlJtMM0QqvKiQ9zrA9HJqWtSO8rB0gSts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JsLHAfKy2LNzzQ7I5CprybGnlNtbJDYbmVOi78gXgCFVxO72y9TcrmcyvreSTFfbi 4EzugYM7RwjzBFgFVIt4HEE4/FJ4hTzUw9X+GEjHi02YsPER7hVlzsPogVu95Of73g NwXlI58ij3KLD+SK8yxrtF1ayi7UoOXsKChXdreIo1Ef6YFiaSTjy0YTbssJ4fc0zS dTNihbEA2776xAFiDYPn2qAwSmBjd0YcEi6y0Qn6IM/7Z/xqPvH+NgvkG5y8QDlfKP Y8kzqTp1v6fu8NWu1rLRKYV7uMmFCVyelGVVSMb1YWHKXb9ceuEa12VCjGIbzY9mNS 4K0zKxRxdre1Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 831E569083; Tue, 6 Jan 2026 07:29:25 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:15 -0700 Message-ID: <20260106142834.2511220-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: KAO6PZ77BL7T44SJMWKOKDOEI763SC5T X-Message-ID-Hash: KAO6PZ77BL7T44SJMWKOKDOEI763SC5T 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 10/22] buildman: Fix docstring in add_line_prefix() 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 Add missing 'brds' parameter documentation and add type annotations to fix pylint W9015/W9016 warnings. Also fix typo 'training' to 'trailing'. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index e59c623f6bf..eae614b56b5 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -287,16 +287,17 @@ class TestBuild(unittest.TestCase): def add_line_prefix(prefix, brds, error_str, colour): """Add a prefix to each line of a string - The training \n in error_str is removed before processing + The trailing newline in error_str is removed before processing Args: - prefix: String prefix to add - error_str: Error string containing the lines - colour: Expected colour for the line. Note that the board list, - if present, always appears in magenta + prefix (str): String prefix to add + brds (str): Board names to include in the output + error_str (str): Error string containing the lines + colour (int): Expected colour for the line. Note that the board + list, if present, always appears in magenta Returns: - New string where each line has the prefix added + str: New string where each line has the prefix added """ lines = error_str.strip().splitlines() new_lines = [] From patchwork Tue Jan 6 14:28:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1292 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=1767709775; bh=GnlD9EiPLNWu6y2OVzXiJLHfwl2GOpLb81HbDU6pRj4=; 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=nq+8i3MAo6OcF7zqpamM1e5raRZR6fa0zIxdcyIEq+Zz79CYtRwKCrUa6q6yXALmb 0VrhhvQcVlsRNlmq2kmXGzSdaRsXg2mtHwKInD8TDNeln28w+MuAOswmrhrDhesU2O lF1IfMj+r7vhT34FX481NQXfM4ZMhkmp2D8nW68q8i/KMhB1hHWfIspHdSwUc9Gt1m 8MbMGKbVYDva7VYilpRuTCUgfRIRM+EMjXWJy6SpylmaJ63BOqM0gJkuv1XQJvM88X c7N0YL8MIHRMhZg292x5vq8VIgeEtgNDstqjtGc3+YNU8bDuTIIl4cyUfL/DDDMz3o y0ruHV5l+WZsA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4C23069122 for ; Tue, 6 Jan 2026 07:29:35 -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 N3BILAUdR-hm for ; Tue, 6 Jan 2026 07:29:35 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709775; bh=GnlD9EiPLNWu6y2OVzXiJLHfwl2GOpLb81HbDU6pRj4=; 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=nq+8i3MAo6OcF7zqpamM1e5raRZR6fa0zIxdcyIEq+Zz79CYtRwKCrUa6q6yXALmb 0VrhhvQcVlsRNlmq2kmXGzSdaRsXg2mtHwKInD8TDNeln28w+MuAOswmrhrDhesU2O lF1IfMj+r7vhT34FX481NQXfM4ZMhkmp2D8nW68q8i/KMhB1hHWfIspHdSwUc9Gt1m 8MbMGKbVYDva7VYilpRuTCUgfRIRM+EMjXWJy6SpylmaJ63BOqM0gJkuv1XQJvM88X c7N0YL8MIHRMhZg292x5vq8VIgeEtgNDstqjtGc3+YNU8bDuTIIl4cyUfL/DDDMz3o y0ruHV5l+WZsA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 36D9E6913C for ; Tue, 6 Jan 2026 07:29:35 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709774; bh=PcErWoj+lLetYlRdps8V4lOoyuQ8MmCMSGIMcyCTH+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nlzFm3vFMF3T99WT7esWgag8xpyvI3uDTuMDwwBikqr3owmHTDzQ3+Rro5tInFnMY mFlokueqKEukpNfsoGJ6nIsRgrjkRy18dj2l0jCA5ULIPguBJKeYsHPW55I/apKey0 Q1/gu2FMkzdBlTQecdAYFb3kpfBqV/c1m0GBb40hFq3iR+SP7sS1LZeOu212hvdjOC XoWMcJiqENYRKbw04awzXqBUua0WPzuj0/NnWeGX1tO/+0CdBAMuC8PDaP/sMSIrYr pfx+pL9/yZi04i+VFlwzMeOrZV+fgBvqnSxHvyZLPONqk2xml/D3Sb5wJAZK89ZXDp ODWH/pt9EHp1Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 73D1769054; Tue, 6 Jan 2026 07:29:34 -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 YxDuoIGF84-8; Tue, 6 Jan 2026 07:29:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709770; bh=YFt0vbetw0bkXZUUAQ64Qwge7XvpWadqk80VwZFIqZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JFYMnCVuMuiudzDjtAmW4G2sWdKD9HJAdQa70H3/12MlIKB1bDTvMpxh42zKtLk1K OrtGmRSna1o0dztjsMuitG4qDnHkzeXwZAOMAdKs1TSsxTHeqwlIefmFUMejfSYQWg sGx9fng167mGfQyDLhI+s2tyIQi9AKOAXdLPlNFoDvFvN/fLNNsKGc+sSovb1kl+3i Nu+DySHiFwO9/oIjMHAWt8s/mzUllWUjCy9ig4r301eifb1OMKgP2mtvzXHN+gzTBG VmJ6kIp07oeVwpyssAdZs41Q/cKYvm/QIwtztePHObcFLmmEbutQidXzoSMkWlH38/ e3/CMA2hZcwRA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3F06169083; Tue, 6 Jan 2026 07:29:30 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:16 -0700 Message-ID: <20260106142834.2511220-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: RTMKD6MLCUGDTI3WEQW7HBWQZEPF2R25 X-Message-ID-Hash: RTMKD6MLCUGDTI3WEQW7HBWQZEPF2R25 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 11/22] buildman: Remove unused variables in test.py 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 Remove unused stdout/stderr from terminal.capture() context and remove unused diff_paths variable to fix pylint W0612 warnings. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index eae614b56b5..31458c35f57 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -634,7 +634,7 @@ class TestBuild(unittest.TestCase): def test_toolchain_download(self): """Test that we can download toolchains""" if use_network: - with terminal.capture() as (stdout, stderr): + with terminal.capture(): url = self.toolchains.locate_arch_url('arm') self.assertRegex(url, 'https://www.kernel.org/pub/tools/' 'crosstool/files/bin/x86_64/.*/' @@ -1000,7 +1000,6 @@ class TestBuild(unittest.TestCase): new_path = None if b'PATH' in diff: new_path = diff[b'PATH'].split(b':') - diff_paths = [p for p in new_path if p not in orig_path] diff_path = b':'.join(p for p in new_path if p not in orig_path) if diff_path: diff[b'PATH'] = diff_path From patchwork Tue Jan 6 14:28:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1293 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=1767709780; bh=ekz8p64zQko1XqvFZ1ZL+B/Kot6x9w0q3Cu6vl8FRbo=; 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=d491SMc8mE5xky9SjWov96IRCLdYr3g5zwMXUCtjb7BIoBuSfnGC6UruAOTylJQMA yHf1HG/6r24UNkoaLtzmBr2Ao6+xxGzaLLH6cwm+6RqF2+T85aatnI2MuFbnX2apkl D+zQGbWD8cGMdTDUl8n4yboKk/bk9513zQhxbpk60MCqnH2GJmEIrYKuqc6fu+FdWo f9Ue/MG80yBtTi7cQItzWPZuDlf/yKQKE0Ixq41aWsgJPZ96EuFZWlk8BqttVsNVsC OwzlycKcQABVXjy+cteaKzuI6XzSTbDoNNHbC9WFJAe6TE9TMFZdr8dGy+778xAior IXfNjjdl0+3Ow== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BA3A669145 for ; Tue, 6 Jan 2026 07:29:40 -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 VgZ5_Zy_upDA for ; Tue, 6 Jan 2026 07:29:40 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709780; bh=ekz8p64zQko1XqvFZ1ZL+B/Kot6x9w0q3Cu6vl8FRbo=; 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=d491SMc8mE5xky9SjWov96IRCLdYr3g5zwMXUCtjb7BIoBuSfnGC6UruAOTylJQMA yHf1HG/6r24UNkoaLtzmBr2Ao6+xxGzaLLH6cwm+6RqF2+T85aatnI2MuFbnX2apkl D+zQGbWD8cGMdTDUl8n4yboKk/bk9513zQhxbpk60MCqnH2GJmEIrYKuqc6fu+FdWo f9Ue/MG80yBtTi7cQItzWPZuDlf/yKQKE0Ixq41aWsgJPZ96EuFZWlk8BqttVsNVsC OwzlycKcQABVXjy+cteaKzuI6XzSTbDoNNHbC9WFJAe6TE9TMFZdr8dGy+778xAior IXfNjjdl0+3Ow== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A9B4F69118 for ; Tue, 6 Jan 2026 07:29:40 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709778; bh=UUFALpaP4BDqa/efZi7PEk56EqvhVW9IgBPjiTWxP3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sKb7aGNwtxO06gGfSLMiuCTFD5ClAGMUoN6QWVKknjofHkvwvn0y18XQpk+uaOFO/ TeIg0TbPVFsFyYT+mPL8mnY0oX9y+MZX9TLpK6sTzwmIp9NTtyagqCvU7kNmo8nMtT g+ksHYno0s6qhYPQYIjG1w8cYbpNaS2ctuz1O9I8XO24vd351dNnsFDRzPsLBVAHdA GwOc3IDsBNCZ33O7Sim2vT5Nl82Mc9IGhipd1AAhvqlRl2AtMyXS20YqBOxHphl/T2 yzApDiOda/I/WtW64zmE504Gu7B44QtEzJWW3sjbemW1FCqsw481CPwh2GZnIRlRAh YuHTKDL6ONHiA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D4B3469054; Tue, 6 Jan 2026 07:29:38 -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 jOdHHCkBbSbR; Tue, 6 Jan 2026 07:29:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709775; bh=dXO/lnrHZxwlzssmkaNYTx+i8ekjQqML781Z2zLW9xI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kEQAVuWiUFr66hKdRnUSicOoncsqJdXcUcfKMfYHVooFH8F+MQKF/ajSEP9heK6CX GwnWrxnpW0XkbuloE9Vb47gFUSf9y3G+Z74nY8OHSqlsGZpifd9KUiYU+gVS2t/nyX mRJHlrdxAvdieRpHKjx1gdN/2PmgAZpn8xG0KMSr5op6MxYsLpBRfJwouTkNXNG37q 2GOPPaF+23MMLBQwuecOLkCsnBQbOGQwjJaNGyg6+EuApk1MxOaiaQn0ATnwfU7o2j eV76MjFVmHA43ihVyHgQWqt7NXDvL2rsegyJgVqULW/ZxWUYmzOBRpeRst71YTS3j3 1WJ8yzuVdBRnA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id B6D2469083; Tue, 6 Jan 2026 07:29:34 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:17 -0700 Message-ID: <20260106142834.2511220-13-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: YD46YPKV2KWNPX4XZBL5MFWHEEEBBV4R X-Message-ID-Hash: YD46YPKV2KWNPX4XZBL5MFWHEEEBBV4R 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 12/22] buildman: Fix implicit string concatenation in test.py 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 Add missing comma between strings in list to fix pylint W1404 warning. This was a latent bug where 'Tester' '&' was concatenated to 'Tester&' instead of being two separate list items. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 31458c35f57..75b10a1d219 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -550,7 +550,7 @@ class TestBuild(unittest.TestCase): def test_board_two_and(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['Tester', '&', 'arm', - 'Tester' '&', 'powerpc', + 'Tester', '&', 'powerpc', 'sandbox']), ({'sandbox': ['board4'], 'all': ['board0', 'board1', 'board2', 'board3', From patchwork Tue Jan 6 14:28:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1294 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=1767709786; bh=i1lsFSNoXveC5Hj+lP8Ehrjl92TKolNV+zGV96KHu+U=; 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=KlJC4wSHsHdSzi7fWFWJ4qlDx2lP03m/+fho0x3a8LQ74marrdK4uK3xKznTdAdRt Zej8xucgkUgi2fmIqtIiljrHNq4MnOaMw434zTquat+P0Y3eQxbr4ka4hl1PVDDyMe 4L5sUz0wHSL665gtfSmDNL0vSeG6GaIJcH2ehevQxZ4yxW1SqCQDfxYW7omdhVwNuw 7V9AJ2vDn2WWhfmTu6xhrrsRKofnLIdrrrMZ644jzf1Z2ctwvuivxki+3rqGWn4iGx qCb+fYoWetupDUEKu6b1IJjEo1IbxsKX788q/S9tOQdEDGkN/iIwy7/diqcBs7+1R3 MmzkO92cc2T9g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 557C369142 for ; Tue, 6 Jan 2026 07:29:46 -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 Wb4EiKHO0D_p for ; Tue, 6 Jan 2026 07:29:46 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709786; bh=i1lsFSNoXveC5Hj+lP8Ehrjl92TKolNV+zGV96KHu+U=; 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=KlJC4wSHsHdSzi7fWFWJ4qlDx2lP03m/+fho0x3a8LQ74marrdK4uK3xKznTdAdRt Zej8xucgkUgi2fmIqtIiljrHNq4MnOaMw434zTquat+P0Y3eQxbr4ka4hl1PVDDyMe 4L5sUz0wHSL665gtfSmDNL0vSeG6GaIJcH2ehevQxZ4yxW1SqCQDfxYW7omdhVwNuw 7V9AJ2vDn2WWhfmTu6xhrrsRKofnLIdrrrMZ644jzf1Z2ctwvuivxki+3rqGWn4iGx qCb+fYoWetupDUEKu6b1IJjEo1IbxsKX788q/S9tOQdEDGkN/iIwy7/diqcBs7+1R3 MmzkO92cc2T9g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 418A869118 for ; Tue, 6 Jan 2026 07:29:46 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709783; bh=becBVdnqHkAFvVaKVNrjCK4ClPjTavvup16eHbp/CXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uwnLLnQdiV+1EnRgJ934P+yXohjKTLy+9oC5XV02DMFgVUk4XeB6PvO44WR9E8k8p 2Tm8nnDt3lCxo6tl4Bz9KjvL0gm30iPLH2eEsIPI19ioU2jxbW4R4ToK00qfOP9WXA 4Q7mqEQ22dUF2MThzEQDpfyuhLVg0oSyc2taZZHgeb8eSwjN1ow1JtozWYOkj02avi lGec7DDXtaNz6GQ4F7QHGhqeZyI9gPMyxz3IAzAodZk7YLTiWdGeZzoWOY2bDmHFMj 0q+XV9rd1mLCEGb+AMG5R2SNOaW7W4o3jL+6LaCELANoTSKMrdO8XxF3kMxSXp4lsO RT4lFoTM2ltCQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 92E7869054; Tue, 6 Jan 2026 07:29:43 -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 nM0pMypqftvz; Tue, 6 Jan 2026 07:29:43 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709779; bh=6ah5fiYVGSQ8HrZkiANRggLK3THnth92bu148deRUL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A3VUaxQy9amsuVvgrsFFfo7Uz/khvjvHq6lsohEEGJDKNwcXNyo6ekFbDSgCtY96F BfIN7okl2mRW6LiMxFO9BxVgMgiMIMbI7FfC/WjNMpKX8VknTtoWf8/aUtU+HVhR9u EaHtrXtbXVEOgNfgAQb3vlYhB2ImST7iRjRTFUT0/+Qqsk/AA6unlqaMLE8/g9pmle 9TQ1lGWuZSoQo8ZZm5aOuPMVqaFfpYmDCkxVSrm7L4B8Ga18IlnZyfYfSqqWYulZ/q 5Pyl06LG6TddhU9kICrGhxJrIc0mPSBe/ByIUQrPhkfGGJEyFGmLUxtZCN5n35DlDu M/ZeOxiGw5dTw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2698969083; Tue, 6 Jan 2026 07:29:39 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:18 -0700 Message-ID: <20260106142834.2511220-14-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: IF364DCCKA7GT64HV5QBEMWOOFKRVDDL X-Message-ID-Hash: IF364DCCKA7GT64HV5QBEMWOOFKRVDDL 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 13/22] buildman: Mark unused arguments in test.py 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 Prefix unused arguments with underscore to indicate they are intentionally unused in mock functions, fixing pylint W0613 warnings. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 75b10a1d219..365a35e16a2 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -204,7 +204,7 @@ class TestBuild(unittest.TestCase): def tearDown(self): shutil.rmtree(self.base_dir) - def make(self, commit, brd, stage, *args, **kwargs): + def make(self, commit, brd, _stage, *_args, **_kwargs): """Mock make function for testing build output""" result = command.CommandResult() boardnum = int(brd.target[-1]) @@ -868,7 +868,7 @@ class TestBuild(unittest.TestCase): self.valid_pids = [pid for pid in self.valid_pids if pid != self.finish_pid] - def kill(self, pid, signal): + def kill(self, pid, _signal): """Mock kill function that validates process IDs""" if pid not in self.valid_pids: raise OSError('Invalid PID') From patchwork Tue Jan 6 14:28:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1295 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=1767709786; bh=a/BY/JRx/P/lEAYlW2w9z05174D11E5Rwo8RecR0qT0=; 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=MF2URU/Vw57DNBh3IuL8Jy09+OxoaTVILqB4rKBPdZxjd5ygGdxOeY3MPV3t0oHnq uLSpoBFh7VcIzECwn8QES/pEeBub5AUXY3jDATTjs9Ppf14pLPE7A3UliFFs4zEF2B Uhytkdv/7uunL2xMxYaBC4EkMoWYdn06GnRYd9qiSz7/+3CANGPTyCO6+iJz5g1wu4 AzGnVy9FS/4fZS0kv8m7vtYXpREMYP3H9o3iQ5fSNvlxnsN2yti+DNNaQerwlQYNIE ripQpdI5aEOTj3A7yBehGIWv6ryU5DyipGQR9xCTWdqs3jrs84bYxbnyKwckW4ANVL pfGNgX8bn8Rag== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E91E369122 for ; Tue, 6 Jan 2026 07:29:46 -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 b5_wek0wH2vW for ; Tue, 6 Jan 2026 07:29:46 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709786; bh=a/BY/JRx/P/lEAYlW2w9z05174D11E5Rwo8RecR0qT0=; 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=MF2URU/Vw57DNBh3IuL8Jy09+OxoaTVILqB4rKBPdZxjd5ygGdxOeY3MPV3t0oHnq uLSpoBFh7VcIzECwn8QES/pEeBub5AUXY3jDATTjs9Ppf14pLPE7A3UliFFs4zEF2B Uhytkdv/7uunL2xMxYaBC4EkMoWYdn06GnRYd9qiSz7/+3CANGPTyCO6+iJz5g1wu4 AzGnVy9FS/4fZS0kv8m7vtYXpREMYP3H9o3iQ5fSNvlxnsN2yti+DNNaQerwlQYNIE ripQpdI5aEOTj3A7yBehGIWv6ryU5DyipGQR9xCTWdqs3jrs84bYxbnyKwckW4ANVL pfGNgX8bn8Rag== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CF08B69145 for ; Tue, 6 Jan 2026 07:29:46 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709784; bh=YdAP74Pu94vfEurXctvKpDs9Gd75ufyo++/RYLDUfEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y/KmOR1thfLDoFa1Sy6hz6yluKnwP3KA8Qea37XK4B4aykSb188iBLOLVyLiyhAKI iYMcnyubA50zT7cfJrnkUHhHp66WNMLAPI49kDaeo+6GX5Bhk81CI4//mLdiM7/uim aiVzAktRRwBtp1NDM+MuCSbn0cqM7GXod0qz2EfIQ/ASl4c7nV+VVS00lX6+BzXdU6 hQI15/bAx6CLcSeui3OuX5XwgxYMzYCff/Ca3WlNLoj9p9Axe73gHHDlILCiccYAMH n0tiBKtnVdjoIivoafwIn2CcNQHeYembMkP5HHoBp2CuEpXmncCVqi50JtfjH1ND/X EGJ/tzQrmh0kw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 61D8969118; Tue, 6 Jan 2026 07:29:44 -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 SOXGJ7p5fUsi; Tue, 6 Jan 2026 07:29:44 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709784; bh=rGbobRFaac/Tx9FevkSiJdKFp9LJoAtGHjN6evoErvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j+imm8uZO4y2uu44EaxtYzVWTqpsuiFHU3b/UU5NkLTpC1CkqZoBsqiHoaxWlwod5 6Pk91qZS7wM5RovpRxLVHbeJu+eJB5Mi8teTakiJxkmlI6rmpSlEouScpRStKRMr+R VABXIlc/t1+2x5DNQ6c7JMDxfOdtyqvNzkihr56bvzsbpk6+Lxl6B212DItTXetxUT 8Hk0NuTzoboZzvoM3wfHpwsGP4XRpSnYt1dfOZSHMtRsiXmbDCFLSlH/n/7flRSrzZ oDDnsMx7j7LAWm08QGvBV+VqTf/ruHnULJ/VtEZ12g2NKme2JUmTNPJPDmkU+0xj/S GGmD69Z4GuMsg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D52DD69083; Tue, 6 Jan 2026 07:29:43 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:19 -0700 Message-ID: <20260106142834.2511220-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TA7NCYZGSZ37456C4PUPGFDTMLUGC7ZO X-Message-ID-Hash: TA7NCYZGSZ37456C4PUPGFDTMLUGC7ZO 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 14/22] buildman: Disable protected-access warning in test.py 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 Add a pylint-disable comment for legitimate test access to protected method _get_output_space_removals() Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 365a35e16a2..0b6469517cc 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -712,6 +712,7 @@ class TestBuild(unittest.TestCase): build = builder.Builder(self.toolchains, base_dir, None, 1, 2) build.commits = self.commits build.commit_count = len(commits) + # pylint: disable=protected-access result = set(build._get_output_space_removals()) expected = {os.path.join(base_dir, f) for f in to_remove} self.assertEqual(expected, result) From patchwork Tue Jan 6 14:28:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1296 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=1767709791; bh=QR1Cwpw6zh8POPrmWYS7Fw1DhihH7qLJDou+DJFw4Go=; 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=KLQsvHFhktYM+nqqXBtr939DguqwYBQ5gjEqBarFM+EWXpryItrAHkW9MqHXwLnWP y0m/SBgcDMD8MDG3iXpXy7Vo7TnKhw3k5xBtdXZw+EgVXQQuOEUCaArQQjpirmrMi+ W9OM37HZHMIftxBOiiJvvoRwhqaKoKgAJJhqOGlbxiGzz7wsTJXmV/r1kPTR0g2rMA IqdplWfW/e9ZIf382wcKSGTGPYiX2tb4KnYOD19cdU//NTPjVi+RdORCX29uISqCOc SsPRxDT1YFGb8aB1HuC6zID0YqGg3i5GKqKte5IxJzFyMjSBFFcAqut6Bgm5s/J6rw OHIrMilbzmklg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9287469142 for ; Tue, 6 Jan 2026 07:29:51 -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 Me7yQpFZODQR for ; Tue, 6 Jan 2026 07:29:51 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709791; bh=QR1Cwpw6zh8POPrmWYS7Fw1DhihH7qLJDou+DJFw4Go=; 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=KLQsvHFhktYM+nqqXBtr939DguqwYBQ5gjEqBarFM+EWXpryItrAHkW9MqHXwLnWP y0m/SBgcDMD8MDG3iXpXy7Vo7TnKhw3k5xBtdXZw+EgVXQQuOEUCaArQQjpirmrMi+ W9OM37HZHMIftxBOiiJvvoRwhqaKoKgAJJhqOGlbxiGzz7wsTJXmV/r1kPTR0g2rMA IqdplWfW/e9ZIf382wcKSGTGPYiX2tb4KnYOD19cdU//NTPjVi+RdORCX29uISqCOc SsPRxDT1YFGb8aB1HuC6zID0YqGg3i5GKqKte5IxJzFyMjSBFFcAqut6Bgm5s/J6rw OHIrMilbzmklg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8068569122 for ; Tue, 6 Jan 2026 07:29:51 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709789; bh=ImtCaDiyN93FqNkqIDfSCJ3zxbvuaRu99tDrHDbExGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IXQz/3VhKK9uYTC9Hptx8DdP2Ix1fW68V+6B2Vel3lRaY64vUynmePEzHzgkcpMkZ MsRcnzPz3mFysKY+QANX+X1Lc1oniR+uDN0vshUw4+hSfwHIibgPjULLDxmu/hu+OF fjzYNseXFGHxAgru5oPYB+8nD1VN4A9HPkItxPAZfp0MhTWkLFJvVNaBO1SxKEJ19j WgHKgxlC7Rbo57pBY4h04pwoEI/+eog/ZgFcq4etFF1P3pL2ohaQUKJ4pB270Ex24M nwQw9V6rS1MFi7Coh8krmQnaWnSVHkof8hCQj7KvnCq42KPjYmmlg6i6bHcAPxdUj+ UCiBK4vSOBEHQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 56B2569083; Tue, 6 Jan 2026 07:29:49 -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 rrs5GCOeVJDI; Tue, 6 Jan 2026 07:29:49 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709784; bh=u9eBEOW6QB+nYIe3p49VehyemF15IzDC5GRdZMU5NcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DvRIDOnlNlR7Wvl9RxpH5orZVekdyoAmspW2pKzvY7CIOByupdvjvdT8j+cJrzcuq N2r38qt67ZjordW1hlESxFr3EpBTiFw5HBZrKius2o12yofjDTPRpolDe4ucuPX0qk tQovZ2VVO2nnxJ1BexYpxCxwwzejHKQK7OfQcIpvj9xs0QoTXIBhJ/YtxqB97zLxNA rKSeYrme8FSADZV0NOM/ZR2DufFCeoWZPiLBcGYKdUB1RrRcPzyf5xcZ0UvSUt7zyi dGbQ0iEm7L3HlD00JzolLrnzQlkqAO0RIIxnyN0XH7WGPjLHJ6brWknYvbkOslLi3v UGL1gGUMEOs9w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A4EE869054; Tue, 6 Jan 2026 07:29:44 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:20 -0700 Message-ID: <20260106142834.2511220-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: VNLGJ4KJVDW27QUED55XR3BBRZUQG6C5 X-Message-ID-Hash: VNLGJ4KJVDW27QUED55XR3BBRZUQG6C5 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 15/22] buildman: Rename commit parameter to avoid shadowing in test.py 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 Rename 'commit' parameter to 'cmt' in make() to avoid shadowing the 'commit' module import, fixing pylint W0621 warning. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 0b6469517cc..361d65ccf81 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -204,20 +204,20 @@ class TestBuild(unittest.TestCase): def tearDown(self): shutil.rmtree(self.base_dir) - def make(self, commit, brd, _stage, *_args, **_kwargs): + def make(self, cmt, brd, _stage, *_args, **_kwargs): """Mock make function for testing build output""" result = command.CommandResult() boardnum = int(brd.target[-1]) result.return_code = 0 result.stderr = '' result.stdout = (f'This is the test output for board {brd.target}, ' - f'commit {commit.hash}') - if ((boardnum >= 1 and boardnum >= commit.sequence) or - boardnum == 4 and commit.sequence == 6): - result.return_code = commit.return_code - result.stderr = (''.join(commit.error_list) + f'commit {cmt.hash}') + if ((boardnum >= 1 and boardnum >= cmt.sequence) or + boardnum == 4 and cmt.sequence == 6): + result.return_code = cmt.return_code + result.stderr = (''.join(cmt.error_list) % {'basedir' : self.base_dir + '/.bm-work/00/'}) - elif commit.sequence < 6: + elif cmt.sequence < 6: result.stderr = migration result.combined = result.stdout + result.stderr From patchwork Tue Jan 6 14:28:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1297 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=1767709796; bh=eV8h22ABD1oOn9e5IF/mUrh363qeHVzW/EF+D7cWizs=; 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=EJYpdintz7c/yjSJ40vlvRpKVMCULLV34/OosDuhLP6DGd3eRwF4wBj8CjFcOVf3e pyZaP13I2gzQNzQzf3e2LT5pbMx3wLX9dCXdMNZIBai67nuFcp8rsEaH8ab67hkasL qIss5No7jaCaa5IRHMHFvr5Zxlb1h3vCC3GJVUMeRsKcEUFmB74v4dXbLMpIJ+lw0r u8pONk9MdafeJKjlnDKS40FYq02qzcQcl5rwYJQkJZBHfC8y+pgbYu2Vzh6NWUByon +bZAx68CscFNMGzPRa3ZfgQMptTV8s94l10VDKjbiZjbcSv3uuf995m0udgOSZuElo CsUpiEXkPnwFA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 172A769142 for ; Tue, 6 Jan 2026 07:29:56 -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 10vjkB1kiIZ8 for ; Tue, 6 Jan 2026 07:29:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709796; bh=eV8h22ABD1oOn9e5IF/mUrh363qeHVzW/EF+D7cWizs=; 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=EJYpdintz7c/yjSJ40vlvRpKVMCULLV34/OosDuhLP6DGd3eRwF4wBj8CjFcOVf3e pyZaP13I2gzQNzQzf3e2LT5pbMx3wLX9dCXdMNZIBai67nuFcp8rsEaH8ab67hkasL qIss5No7jaCaa5IRHMHFvr5Zxlb1h3vCC3GJVUMeRsKcEUFmB74v4dXbLMpIJ+lw0r u8pONk9MdafeJKjlnDKS40FYq02qzcQcl5rwYJQkJZBHfC8y+pgbYu2Vzh6NWUByon +bZAx68CscFNMGzPRa3ZfgQMptTV8s94l10VDKjbiZjbcSv3uuf995m0udgOSZuElo CsUpiEXkPnwFA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 02A3669083 for ; Tue, 6 Jan 2026 07:29:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709794; bh=cufVL6kHUbtiPS1JYIEk/yevjWTbdG8xc5V8TIGhA5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ni7neQvcn5v8E5GmouUr5bIKCrFPeaFBumBYnfxwXxQ1Brho8MTGLTH/SHjX7G8Fq hNMzyA8YSLqRflaSrob91U5KuM6LWFBKII3ji+Uiqt2YS+/8EHGCHL3KM9y84AL9ws 15O5p2+6+OzIyx7mTt85Xqq3RC+B8UMV/DIato+6me/j+jCOn+7aLoiw0yZIpToIJv 5XxEBBz7eIHjSl43NojTAPDFoy9QqRMKNg3cvr3m05pds1+tmIuX1kga8C6JjnnlwT 61+LzCB26VSUqgvMb9PT2HSzTg+66LLy1Tf9eVEVZzceyeHKi0AvIa2UD7zHndYrUR cQSJb5v/6Axsw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0325369122; Tue, 6 Jan 2026 07:29:54 -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 gKd5A5BeuX94; Tue, 6 Jan 2026 07:29:53 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709789; bh=8j8VAR4ylS3ziawqkIrYYc01X5+VhT96UgJwN5LNXHg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gERIsi2g/Sh7LPSgGEpqtw/x6FJGrSHwtIAS7+V1/fUgv0ucg4guAxVryNSAYIMnu qqAhz85pZsHtq4/1njG7T8LIFAp/WpqLoMWAeiPSwEwsFdis0lS45uTkHwfJobOORn cjWy+bNkq6G2ss+uuiuDHIdSt0xRfFgPSnexO3MXMtDzXagGVpftOCGt7BbAUuc5H/ 83FhjObX6kf3mJs/ciEjmHQmoIGWpNOH1uY59EU/Mtj2cXSejhX6tCfK3FLsoXa5fD +/e96nxFOVgZpy/2aSiZbzAR5Y90iiAPTurcRnLomvMEHZA3U0xHJ24K8SJLYN6SFI BcLJ1HuDOmthA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5F64B69054; Tue, 6 Jan 2026 07:29:49 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:21 -0700 Message-ID: <20260106142834.2511220-17-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: X265BSVZQCP2ID2ZNDFPLPMTX752CWDO X-Message-ID-Hash: X265BSVZQCP2ID2ZNDFPLPMTX752CWDO 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 16/22] buildman: Rename constants to UPPER_CASE in test.py 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 Rename module-level constants to use UPPER_CASE naming style to conform to Python conventions and fix pylint C0103 warnings. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 88 +++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 361d65ccf81..588044fe20c 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -27,9 +27,9 @@ from u_boot_pylib import command from u_boot_pylib import terminal from u_boot_pylib import tools -use_network = True +USE_NETWORK = True -settings_data = ''' +SETTINGS_DATA = ''' # Buildman settings file [toolchain] @@ -39,7 +39,7 @@ main: /usr/sbin x86: i386 x86_64 ''' -settings_data_wrapper = ''' +SETTINGS_DATA_WRAPPER = ''' # Buildman settings file [toolchain] @@ -49,7 +49,7 @@ main: /usr/sbin wrapper = ccache ''' -settings_data_homedir = ''' +SETTINGS_DATA_HOMEDIR = ''' # Buildman settings file [toolchain] @@ -59,7 +59,7 @@ main = ~/mypath x86 = ~/mypath-x86- ''' -migration = '''===================== WARNING ====================== +MIGRATION = '''===================== WARNING ====================== This board does not use CONFIG_DM. CONFIG_DM will be compulsory starting with the v2020.01 release. Failure to update may result in board removal. @@ -67,7 +67,7 @@ See doc/develop/driver-model/migration.rst for more info. ==================================================== ''' -errors = [ +ERRORS = [ '''main.c: In function 'main_loop': main.c:260:6: warning: unused variable 'joe' [-Wunused-variable] ''', @@ -108,16 +108,16 @@ make: *** [sub-make] Error 2 ] -# hash, subject, return code, list of errors/warnings -commits = [ +# hash, subject, return code, list of ERRORS/warnings +COMMITS = [ ['1234', 'upstream/master, migration warning', 0, []], - ['5678', 'Second commit, a warning', 0, errors[0:1]], - ['9012', 'Third commit, error', 1, errors[0:2]], - ['3456', 'Fourth commit, warning', 0, [errors[0], errors[2]]], - ['7890', 'Fifth commit, link errors', 1, [errors[0], errors[3]]], + ['5678', 'Second commit, a warning', 0, ERRORS[0:1]], + ['9012', 'Third commit, error', 1, ERRORS[0:2]], + ['3456', 'Fourth commit, warning', 0, [ERRORS[0], ERRORS[2]]], + ['7890', 'Fifth commit, link errors', 1, [ERRORS[0], ERRORS[3]]], ['abcd', 'Sixth commit, fixes all errors', 0, []], ['ef01', 'Seventh commit, fix migration, check directory suppression', 1, - [errors[4]]], + [ERRORS[4]]], ] BOARDS = [ @@ -159,13 +159,13 @@ class TestBuild(unittest.TestCase): # Set up commits to build self.commits = [] sequence = 0 - for commit_info in commits: + for commit_info in COMMITS: comm = commit.Commit(commit_info[0]) comm.subject = commit_info[1] comm.return_code = commit_info[2] comm.error_list = commit_info[3] if sequence < 6: - comm.error_list += [migration] + comm.error_list += [MIGRATION] comm.sequence = sequence sequence += 1 self.commits.append(comm) @@ -178,7 +178,7 @@ class TestBuild(unittest.TestCase): # Add some test settings bsettings.setup(None) - bsettings.add_file(settings_data) + bsettings.add_file(SETTINGS_DATA) # Set up the toolchains self.toolchains = toolchain.Toolchains() @@ -218,7 +218,7 @@ class TestBuild(unittest.TestCase): result.stderr = (''.join(cmt.error_list) % {'basedir' : self.base_dir + '/.bm-work/00/'}) elif cmt.sequence < 6: - result.stderr = migration + result.stderr = MIGRATION result.combined = result.stdout + result.stderr return result @@ -265,7 +265,7 @@ class TestBuild(unittest.TestCase): # We should get two starting messages, an update for every commit built # and a summary message - self.assertEqual(count, len(commits) * len(BOARDS) + 3) + self.assertEqual(count, len(COMMITS) * len(BOARDS) + 3) build.set_display_options(**kwdisplay_args) build.show_summary(self.commits, board_selected) if echo_lines: @@ -321,7 +321,7 @@ class TestBuild(unittest.TestCase): boards4 = 'board4' if list_error_boards else '' # Upstream commit: migration warnings only - self.assertEqual(next(lines).text, f'01: {commits[0][1]}') + self.assertEqual(next(lines).text, f'01: {COMMITS[0][1]}') if not filter_migration_warnings: self.assert_summary(next(lines).text, 'arm', 'w+', @@ -332,10 +332,10 @@ class TestBuild(unittest.TestCase): outcome=OUTCOME_WARN) self.assertEqual(next(lines).text, - add_line_prefix('+', boards01234, migration, col.RED)) + add_line_prefix('+', boards01234, MIGRATION, col.RED)) # Second commit: all archs should fail with warnings - self.assertEqual(next(lines).text, f'02: {commits[1][1]}') + self.assertEqual(next(lines).text, f'02: {COMMITS[1][1]}') if filter_migration_warnings: self.assert_summary(next(lines).text, 'arm', 'w+', @@ -347,10 +347,10 @@ class TestBuild(unittest.TestCase): # Second commit: The warnings should be listed self.assertEqual(next(lines).text, - add_line_prefix('w+', boards1234, errors[0], col.YELLOW)) + add_line_prefix('w+', boards1234, ERRORS[0], col.YELLOW)) # Third commit: Still fails - self.assertEqual(next(lines).text, f'03: {commits[2][1]}') + self.assertEqual(next(lines).text, f'03: {COMMITS[2][1]}') if filter_migration_warnings: self.assert_summary(next(lines).text, 'arm', '', ['board1'], outcome=OUTCOME_OK) @@ -360,10 +360,10 @@ class TestBuild(unittest.TestCase): # Expect a compiler error self.assertEqual(next(lines).text, - add_line_prefix('+', boards234, errors[1], col.RED)) + add_line_prefix('+', boards234, ERRORS[1], col.RED)) # Fourth commit: Compile errors are fixed, just have warning for board3 - self.assertEqual(next(lines).text, f'04: {commits[3][1]}') + self.assertEqual(next(lines).text, f'04: {COMMITS[3][1]}') if filter_migration_warnings: expect = f"{'powerpc':>10}: " expect += ' ' + col.build(col.GREEN, '') @@ -381,22 +381,22 @@ class TestBuild(unittest.TestCase): # Compile error fixed self.assertEqual(next(lines).text, - add_line_prefix('-', boards234, errors[1], col.GREEN)) + add_line_prefix('-', boards234, ERRORS[1], col.GREEN)) if not filter_dtb_warnings: self.assertEqual( next(lines).text, - add_line_prefix('w+', boards34, errors[2], col.YELLOW)) + add_line_prefix('w+', boards34, ERRORS[2], col.YELLOW)) # Fifth commit - self.assertEqual(next(lines).text, f'05: {commits[4][1]}') + self.assertEqual(next(lines).text, f'05: {COMMITS[4][1]}') if filter_migration_warnings: self.assert_summary(next(lines).text, 'powerpc', '', ['board3'], outcome=OUTCOME_OK) self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) - # The second line of errors[3] is a duplicate, so buildman will drop it - expect = errors[3].rstrip().split('\n') + # The second line of ERRORS[3] is a duplicate, so buildman will drop it + expect = ERRORS[3].rstrip().split('\n') expect = [expect[0]] + expect[2:] expect = '\n'.join(expect) self.assertEqual(next(lines).text, @@ -405,10 +405,10 @@ class TestBuild(unittest.TestCase): if not filter_dtb_warnings: self.assertEqual( next(lines).text, - add_line_prefix('w-', boards34, errors[2], col.CYAN)) + add_line_prefix('w-', boards34, ERRORS[2], col.CYAN)) # Sixth commit - self.assertEqual(next(lines).text, f'06: {commits[5][1]}') + self.assertEqual(next(lines).text, f'06: {COMMITS[5][1]}') if filter_migration_warnings: self.assert_summary(next(lines).text, 'sandbox', '', ['board4'], outcome=OUTCOME_OK) @@ -416,17 +416,17 @@ class TestBuild(unittest.TestCase): self.assert_summary(next(lines).text, 'sandbox', 'w+', ['board4'], outcome=OUTCOME_WARN) - # The second line of errors[3] is a duplicate, so buildman will drop it - expect = errors[3].rstrip().split('\n') + # The second line of ERRORS[3] is a duplicate, so buildman will drop it + expect = ERRORS[3].rstrip().split('\n') expect = [expect[0]] + expect[2:] expect = '\n'.join(expect) self.assertEqual(next(lines).text, add_line_prefix('-', boards4, expect, col.GREEN)) self.assertEqual(next(lines).text, - add_line_prefix('w-', boards4, errors[0], col.CYAN)) + add_line_prefix('w-', boards4, ERRORS[0], col.CYAN)) # Seventh commit - self.assertEqual(next(lines).text, f'07: {commits[6][1]}') + self.assertEqual(next(lines).text, f'07: {COMMITS[6][1]}') if filter_migration_warnings: self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) else: @@ -437,13 +437,13 @@ class TestBuild(unittest.TestCase): self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) # Pick out the correct error lines - expect_str = errors[4].rstrip().replace('%(basedir)s', '').split('\n') + expect_str = ERRORS[4].rstrip().replace('%(basedir)s', '').split('\n') expect = expect_str[3:8] + [expect_str[-1]] expect = '\n'.join(expect) if not filter_migration_warnings: self.assertEqual( next(lines).text, - add_line_prefix('-', boards01234, migration, col.GREEN)) + add_line_prefix('-', boards01234, MIGRATION, col.GREEN)) self.assertEqual(next(lines).text, add_line_prefix('+', boards4, expect, col.RED)) @@ -595,7 +595,7 @@ class TestBuild(unittest.TestCase): build.commits = self.commits build.commit_count = len(self.commits) subject = self.commits[1].subject.translate(builder.trans_valid_chars) - dirname = f'/{2:02d}_g{commits[1][0]}_{subject[:20]}' + dirname = f'/{2:02d}_g{COMMITS[1][0]}_{subject[:20]}' self.check_dirs(build, dirname) def test_output_dir_current(self): @@ -633,7 +633,7 @@ class TestBuild(unittest.TestCase): def test_toolchain_download(self): """Test that we can download toolchains""" - if use_network: + if USE_NETWORK: with terminal.capture(): url = self.toolchains.locate_arch_url('arm') self.assertRegex(url, 'https://www.kernel.org/pub/tools/' @@ -663,7 +663,7 @@ class TestBuild(unittest.TestCase): # Test config with ccache wrapper bsettings.setup(None) - bsettings.add_file(settings_data_wrapper) + bsettings.add_file(SETTINGS_DATA_WRAPPER) tc = self.toolchains.select('arm') self.assertEqual('ccache arm-linux-', @@ -685,7 +685,7 @@ class TestBuild(unittest.TestCase): # Test config with ccache wrapper bsettings.setup(None) - bsettings.add_file(settings_data_wrapper) + bsettings.add_file(SETTINGS_DATA_WRAPPER) tc = self.toolchains.select('arm') env = tc.make_environment(False) @@ -711,7 +711,7 @@ class TestBuild(unittest.TestCase): build = builder.Builder(self.toolchains, base_dir, None, 1, 2) build.commits = self.commits - build.commit_count = len(commits) + build.commit_count = len(COMMITS) # pylint: disable=protected-access result = set(build._get_output_space_removals()) expected = {os.path.join(base_dir, f) for f in to_remove} @@ -1088,7 +1088,7 @@ class TestBuild(unittest.TestCase): """Test using ~ in a toolchain or toolchain-prefix section""" # Add some test settings bsettings.setup(None) - bsettings.add_file(settings_data_homedir) + bsettings.add_file(SETTINGS_DATA_HOMEDIR) # Set up the toolchains home = os.path.expanduser('~') From patchwork Tue Jan 6 14:28:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1298 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=1767709800; bh=n2L494J3JLlFYhviWad2emb51W0KH9Li8NjAz+lxnSg=; 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=qHOSN4Q2n/QpVrpvNgWUwO+fBy16hGwKyZF49Q+cmHvRPWg/sh8+8Kh8xD46wx0ff I+v6/Vgtza2Ic/vqS8dk0dv8QacOn/GdgpXA89Gym0e8Vt6tDqMidYMJuKGe6H13Yr 2B1Mwv6uFJaMa9t1JEE1FGb43K4jz3AlyGxz3eMt6Ly5EYuf8QIYbyfKb1bj6/RBv2 4/ea4hcxMEXY0Pb10isx1LRlmJYnmXt7RF3rYhLJckrdutNqHrNxHUc5PavlNAnsTn AfnaBdMPiVxO3waZuXejqoAgJM2LCp4Lhl/p0nHsai66dvN6EeVYJlfZjNSq4eyO0q N/XlBK6PhcEDA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 877A869054 for ; Tue, 6 Jan 2026 07:30:00 -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 1Srf5ZHHXVFj for ; Tue, 6 Jan 2026 07:30:00 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709800; bh=n2L494J3JLlFYhviWad2emb51W0KH9Li8NjAz+lxnSg=; 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=qHOSN4Q2n/QpVrpvNgWUwO+fBy16hGwKyZF49Q+cmHvRPWg/sh8+8Kh8xD46wx0ff I+v6/Vgtza2Ic/vqS8dk0dv8QacOn/GdgpXA89Gym0e8Vt6tDqMidYMJuKGe6H13Yr 2B1Mwv6uFJaMa9t1JEE1FGb43K4jz3AlyGxz3eMt6Ly5EYuf8QIYbyfKb1bj6/RBv2 4/ea4hcxMEXY0Pb10isx1LRlmJYnmXt7RF3rYhLJckrdutNqHrNxHUc5PavlNAnsTn AfnaBdMPiVxO3waZuXejqoAgJM2LCp4Lhl/p0nHsai66dvN6EeVYJlfZjNSq4eyO0q N/XlBK6PhcEDA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 76BDB69118 for ; Tue, 6 Jan 2026 07:30:00 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709798; bh=sUR1Bt7FvZDxD39AdzDRd19ge0ie/4PtXTL3gJ5D0Kw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xev+JyFP64vAw6cOzqwhegVl8F8DeJ/2r+mGiy+YJj5dviFeis36FkN5N6ZEbznyw UfZdFM9/7VZQMeL3ztwBH363eMh6zRTTXHclS+w3FHB31fmEVb2nA4uSLdILkXi5nH 5d3YHjOkW2gPJJKlDqW3HJcMzjXGGwHeWBQbatdu5bV5gMpbD+KbTqgA0AG+7I+Z6P IfMfSFhWTq0S8yAV3T6AxZ3iD+V/LZv+pQ1Q8zpdl6hzM5ySeB2LJtgwXJRLND1TUE 5JLGumOolS1lpLg3iIjixyrnO1ffdIuNhId1tirmAfwbENVGcyI5rbVSrbEW7EPeU0 9cbtNdPwgRGLw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7DF2F69054; Tue, 6 Jan 2026 07:29:58 -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 DcX_NHQDYg-o; Tue, 6 Jan 2026 07:29:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709794; bh=3nLT0r/LbSnVWVU4hR8+mrJGQC5pzzE1FsJc7807D8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cuQ1m/rzrFf8qoEVx1C8kiCBvu774oiTLz+HlmIlJMkLWsHLbL2mFaj0Ym+cYHMF+ ak4Nvj9WI0EmnuL0qgVYy77uGsMfkMndDgD7r0dXTFDaQ20/3tMIAXWSolDCqw7eOv ngUretR55+A2rvbj7KIvsv4icPyIzalFjEva4FMRNEQvjZSDKpa/jsI1Ev/bCVehRb bjasg/gzaD2PWHKeM1T+0awyGRoXd+OPx//TBGY1v/XfMuQmn57yQwQXO6szaF9aWA Q9IZVbC19P+tIdatRhjmDnyoOGsh44RhP8h9z80ppymKOCz+51f27NO9Nnoqh+/v+k GtoZ9IhF3Arig== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E68D469118; Tue, 6 Jan 2026 07:29:53 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:22 -0700 Message-ID: <20260106142834.2511220-18-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: NCNWFLV5E5AIEOP3GS747NUBXU7Q2FAL X-Message-ID-Hash: NCNWFLV5E5AIEOP3GS747NUBXU7Q2FAL 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 17/22] buildman: Shorten long lines in test.py 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 Shorten test-data strings and reformat code to reduce line lengths. Two lines in errors[4] remain over 80 chars since changing them breaks the output-comparison tests. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/test.py | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 588044fe20c..d5d55277ee0 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -73,7 +73,7 @@ main.c:260:6: warning: unused variable 'joe' [-Wunused-variable] ''', '''main.c: In function 'main_loop2': main.c:295:2: error: 'fred' undeclared (first use in this function) -main.c:295:2: note: each undeclared identifier is reported only once for each function it appears in +main.c:295:2: note: each undeclared identifier is reported only once make[1]: *** [main.o] Error 1 make: *** [common/libcommon.o] Error 2 Make failed @@ -84,25 +84,27 @@ without "ranges" or child "reg" property ''', '''powerpc-linux-ld: warning: dot moved backwards before `.bss' powerpc-linux-ld: warning: dot moved backwards before `.bss' -powerpc-linux-ld: u-boot: section .text lma 0xfffc0000 overlaps previous sections -powerpc-linux-ld: u-boot: section .rodata lma 0xfffef3ec overlaps previous sections -powerpc-linux-ld: u-boot: section .reloc lma 0xffffa400 overlaps previous sections -powerpc-linux-ld: u-boot: section .data lma 0xffffcd38 overlaps previous sections -powerpc-linux-ld: u-boot: section .u_boot_cmd lma 0xffffeb40 overlaps previous sections -powerpc-linux-ld: u-boot: section .bootpg lma 0xfffff198 overlaps previous sections +powerpc-linux-ld: u-boot: section .text lma 0xfffc0000 overlaps previous +powerpc-linux-ld: u-boot: section .rodata lma 0xfffef3ec overlaps previous +powerpc-linux-ld: u-boot: section .reloc lma 0xffffa400 overlaps previous +powerpc-linux-ld: u-boot: section .data lma 0xffffcd38 overlaps previous +powerpc-linux-ld: u-boot: section .u_boot_cmd lma 0xffffeb40 overlaps previous +powerpc-linux-ld: u-boot: section .bootpg lma 0xfffff198 overlaps previous ''', '''In file included from %(basedir)sarch/sandbox/cpu/cpu.c:9:0: -%(basedir)sarch/sandbox/include/asm/state.h:44:0: warning: "xxxx" redefined [enabled by default] -%(basedir)sarch/sandbox/include/asm/state.h:43:0: note: this is the location of the previous definition +%(basedir)sarch/sandbox/include/asm/state.h:44:0: warning: "xxxx" redefined +%(basedir)sarch/sandbox/include/asm/state.h:43:0: note: this is the location \ +of the previous definition %(basedir)sarch/sandbox/cpu/cpu.c: In function 'do_reset': %(basedir)sarch/sandbox/cpu/cpu.c:27:1: error: unknown type name 'blah' -%(basedir)sarch/sandbox/cpu/cpu.c:28:12: error: expected declaration specifiers or '...' before numeric constant +%(basedir)sarch/sandbox/cpu/cpu.c:28:12: error: expected specifiers before num make[2]: *** [arch/sandbox/cpu/cpu.o] Error 1 make[1]: *** [arch/sandbox/cpu] Error 2 make[1]: *** Waiting for unfinished jobs.... In file included from %(basedir)scommon/board_f.c:55:0: -%(basedir)sarch/sandbox/include/asm/state.h:44:0: warning: "xxxx" redefined [enabled by default] -%(basedir)sarch/sandbox/include/asm/state.h:43:0: note: this is the location of the previous definition +%(basedir)sarch/sandbox/include/asm/state.h:44:0: warning: "xxxx" redefined +%(basedir)sarch/sandbox/include/asm/state.h:43:0: note: this is the location \ +of the previous definition make: *** [sub-make] Error 2 ''' ] @@ -121,11 +123,11 @@ COMMITS = [ ] BOARDS = [ - ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 1', 'board0', ''], + ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 1', 'board0', ''], ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 2', 'board1', ''], - ['Active', 'powerpc', 'powerpc', '', 'Tester', 'PowerPC board 1', 'board2', ''], - ['Active', 'powerpc', 'mpc83xx', '', 'Tester', 'PowerPC board 2', 'board3', ''], - ['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', ''], + ['Active', 'powerpc', 'powerpc', '', 'Tester', 'PowerPC 1', 'board2', ''], + ['Active', 'powerpc', 'mpc83xx', '', 'Tester', 'PowerPC 2', 'board3', ''], + ['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox', 'board4', ''], ] BASE_DIR = 'base' @@ -430,8 +432,8 @@ class TestBuild(unittest.TestCase): if filter_migration_warnings: self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) else: - self.assert_summary(next(lines).text, 'arm', '', ['board0', 'board1'], - outcome=OUTCOME_OK) + self.assert_summary(next(lines).text, 'arm', '', + ['board0', 'board1'], outcome=OUTCOME_OK) self.assert_summary(next(lines).text, 'powerpc', '', ['board2', 'board3'], outcome=OUTCOME_OK) self.assert_summary(next(lines).text, 'sandbox', '+', ['board4']) @@ -848,7 +850,8 @@ class TestBuild(unittest.TestCase): # Check failure to add CONFIG value result = cfgutil.check_cfg_lines([], {'MARY':'MARY="mary"'}) self.assertEqual([ - ['MARY="mary"', 'Missing expected line: CONFIG_MARY="mary"']], result) + ['MARY="mary"', 'Missing expected line: CONFIG_MARY="mary"']], + result) def get_procs(self): """Get list of running process IDs from the running file""" From patchwork Tue Jan 6 14:28:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1299 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=1767709805; bh=+w2rB1alcKC1l1TLjZ9bksIz2M0hEzg1HgLwFM4bE0I=; 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=NhOsLtVBpUJN2Q842YPmqpSLaMmTM9J3fKmiJk6mGfnYysqetJxtNpGJsJZp4799o egEYN+CIbYAFE54/xrRt0gE4M2By5to7ylGhGTtq6k+vVllo2BUiKkYwbfDn61s5bZ 1wsSPyAMCgZVqCkQ659qiknAh3L4rN8DMhwiALBpkUWZY4IoBZZhc9+uQYao0j29bQ JyG0FEFR7ZHX6PztJjVzgfYW+LTxbDJ1Lq7Kyp0mIN7UUakEnTqqv+YcYQ3tyo2vLe PSpKTSiPS3fNVJ3kcQkwCisYZ5IzboFxU7SsUgURDMvMd1KZWmwp0S5PfCQqXeaB5J DMsPyWjlPt5sQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0A7E769142 for ; Tue, 6 Jan 2026 07:30:05 -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 CH_qSal1e4H5 for ; Tue, 6 Jan 2026 07:30:04 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709804; bh=+w2rB1alcKC1l1TLjZ9bksIz2M0hEzg1HgLwFM4bE0I=; 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=kUG0eQDnOieu29MdfAwgRWZyL0cHY3xr1I9bvRQpGh5/TSBTkOgTvd5iY28ZhLJsS uLHNmT5FeG/JiyIYIFJTG6WGmUe5PfUUj4fnkJNvmvUi2q83pHXIp4bUhpnf8Ud2p/ QNLYGztwR0ekNAWY4ZWKzT2pdlwIrjZIOSXuVUsAwzfVLqVLntuQDOoqWxCRz8xTmA UtKrq+6gNp2uVV4HRTZM7amu50caaLQAd7dP0tcd8KBSpM7vmh2teDbszp7QkRI/k7 Jk3C/oYxSwebpQypkNS+jHKkKbX/cEyx7OsSU+txzLsR49vwg0HWyAiAPE55DbKWYo t+X1xnBGUkE6g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E525269118 for ; Tue, 6 Jan 2026 07:30:04 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709803; bh=BSTSPP7tdQG6sdw+sagTYdwgfg0h6D0go960BHg3DYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VPqwAQQ7U6AFleipMhCRQJQZtPSJBi4oasWB9qUuTrlrhxziJBHYIFSp7BQ/Sg9Ar Wdxs3Je5dS/YACv91GqSlvN93RDty8iXkp6PKT45KJZ7vgVtHDpjXIJ75+FPY/musb 3F7wRA/rX4UF++2ZtkiFHWUVzyVhMt0VjnqMrL0mzxcWLV+fPeem7wdETGN75aCcTo hPWbBRmSOfU0jIpFSMsH6oVmlYARc69AcyxFZCK6R+keqZMhfY39NN6wT1HNx05OJI 9uD3kku5hbpyhw7opDSvrPKnAU2sEkhe4+hd+eCsjHSOWrBWjzwS/D7jmlQlI3IWut 3t12Ew+IfTt0Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0DFA069122; Tue, 6 Jan 2026 07:30:03 -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 6aDyYIgBIEXU; Tue, 6 Jan 2026 07:30:02 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709799; bh=O0rY+KaoN/sDyvc2AmTXmXcaJoC5RVuyucCn6RvH3Qg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fR4oMKbhQ/VNz9Hp1dff2Be5SzKOP1C+QrNdfUA3J9778gtW9WRgj1U3OC1STEYCW GcqJKNvuuqnxV4IYUJEHk9XxseUohCFc/qlWXyRhaB6ACotgHhKEFkrfACkCC05P+I rdYxXdrSM1nx2PhJqcCQw1lJiITczVIU5ESxovfh8CgneCTNYqQjHEfRaEDVlEY3WS CblzOsrgfViZ3lsJvsrBIm2pCYzXu3WMAo1jMgZmP7/3/2KYPTl8Mgtw/Xave2G9Bq ul4d6qLCGar3xcBRYOXZvmj2INY1yQbiQW0BNzYDQ1FdCdt7WKHGVqERfcmJdzAyAa h9m1se5poRuoA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A652A69083; Tue, 6 Jan 2026 07:29:58 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:23 -0700 Message-ID: <20260106142834.2511220-19-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: SDNN7AYSENJB7FTIZ6XW3DD4WFZRWYAI X-Message-ID-Hash: SDNN7AYSENJB7FTIZ6XW3DD4WFZRWYAI 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 18/22] buildman: Disable pylint warnings for Options in test.py 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 Disable R0902 (too-many-instance-attributes) and R0903 (too-few-public-methods) for the Options class. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index d5d55277ee0..904f4e9a212 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -134,6 +134,7 @@ BASE_DIR = 'base' OUTCOME_OK, OUTCOME_WARN, OUTCOME_ERR = range(3) +# pylint: disable=too-many-instance-attributes,too-few-public-methods class Options: """Class that holds build options""" def __init__(self): From patchwork Tue Jan 6 14:28:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1300 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=1767709809; bh=Fdb1N73sebWCGGFDVjbjIbUgMv9qvjGEqx37PAiTHFs=; 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=axeMFaATO7b3vDQmgQNuKBbYMAoZsxyESyd92asz49r52pEuMReJKGfdvb4mJEa5L REjCgUi2MONZmchGrZA8TzUjmz1lO4hsaQXSpN+3UMxkfZtvURH3H42mmXfdFXjYWD ag4lp/PyO903LC5GWYodV4FZvbViuXbaQpwDcVbWcpE9fsaVxtv1nwAJLspvQgiVdl RKcTaO3klMKWeQvWAg+RJXx0JzGK4OMkDEpKRWRBDCfkFWCNtkzqOl5KSYd0Hu3q7X RFCdHdVnOscx7sJmZ1EWF1u8HcidhLcr7CK81l3AhUeMXITOMjbvaHe5KqjYNpaNCa GsJ0v+PIu1igA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 31B0B69118 for ; Tue, 6 Jan 2026 07:30:09 -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 zzJAmC_2cUVP for ; Tue, 6 Jan 2026 07:30:09 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709809; bh=Fdb1N73sebWCGGFDVjbjIbUgMv9qvjGEqx37PAiTHFs=; 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=axeMFaATO7b3vDQmgQNuKBbYMAoZsxyESyd92asz49r52pEuMReJKGfdvb4mJEa5L REjCgUi2MONZmchGrZA8TzUjmz1lO4hsaQXSpN+3UMxkfZtvURH3H42mmXfdFXjYWD ag4lp/PyO903LC5GWYodV4FZvbViuXbaQpwDcVbWcpE9fsaVxtv1nwAJLspvQgiVdl RKcTaO3klMKWeQvWAg+RJXx0JzGK4OMkDEpKRWRBDCfkFWCNtkzqOl5KSYd0Hu3q7X RFCdHdVnOscx7sJmZ1EWF1u8HcidhLcr7CK81l3AhUeMXITOMjbvaHe5KqjYNpaNCa GsJ0v+PIu1igA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1DE3B69122 for ; Tue, 6 Jan 2026 07:30:09 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709807; bh=nwT0mH+CIPpyP6ZhvFjOVhsmrBXNR6ry2FDGn0MKqkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Il6d/WcY8KZQ7VDHBUNNECUzKSYycXM0x3AjjLGqxbPNlruyI1R9AzPm51WYHb6Hx +icZDmJdOdSnb9qcKNDtiiiqto5VrR+tHlQvhxB2KuD1gsnX+2PMA0PoclVWAnfha6 Z9OO7YSrzyXZJYoj0w1pQux4mTvl3BE7w3+YLkcZGPPIDEsztvgQi0y8swl9ESyjog 88FX28fJ87MAuuOJuSjX2ItUd4pNj0ewzF9b/Q51od5VzSakXk8luLZHCnmVCzZsds fqIaqnNSO8GLFI0RPCcOIDVAVWj7sgcUuVGBlBggjzOTUb9OpS7A2UG5C2ijt40gJd +DfgefsSaIKhg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3C25D69118; Tue, 6 Jan 2026 07:30:07 -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 4AH5s9MSW5vj; Tue, 6 Jan 2026 07:30:07 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709803; bh=mUY7uAi/Etv/SY6Cu//tWAjv5d8l0KbkHND2JKnCfyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WC4MtAWsnSoYd+k0jUs4On7EJ8vVBBF10ebADDdCesrdiJlN0pC2sU6KDcSBKpmIw nhEQSOxuzN41tyJSEg9HQVlCz1ZbrqkuU0H7Ry5vRiKXLIRNlWWD3qVeHQCcimGoHj e3nX0hSXOVmxtXE6vNNn33XBuB6X6G+R4+z3SqhKlmPJa2MG83P3K7zDakPrnwbrM7 G3z8dOlgEa2uE2Xaa6aZd2HRKlvry7Q4Ht/4uYQIpmGYSwygUrbAQSpH6WUHD2qIYf ejav+gP4321kvTD2im3YBFXiOi8gVAKFFSVb9L+29NtykSncpO2h8/WZzHmNwKop2w Rw/YvtolzZ/qw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2665E69054; Tue, 6 Jan 2026 07:30:03 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:24 -0700 Message-ID: <20260106142834.2511220-20-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: AYFVSQC3DQDONQ663L2SOR4BPQFHYBOC X-Message-ID-Hash: AYFVSQC3DQDONQ663L2SOR4BPQFHYBOC 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 19/22] buildman: Split TestBuild into multiple classes in test.py 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 Split TestBuild into a base class and five subclasses to improve code organisation and reduce method count per class: - TestBuildBase: Common setUp/tearDown - TestBuildOutput: Output and summary tests - TestBuildBoards: Board-selection tests - TestBuild: Output-directory and toolchain tests - TestBuildConfig: Config-adjustment tests - TestBuildMisc: Process-limit and other tests Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/main.py | 6 ++++-- tools/buildman/test.py | 31 +++++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/tools/buildman/main.py b/tools/buildman/main.py index 914dfe04988..d85e8dd428d 100755 --- a/tools/buildman/main.py +++ b/tools/buildman/main.py @@ -48,8 +48,10 @@ def run_tests(skip_net_tests, debug, verbose, args): # 'entry' module. result = test_util.run_test_suites( 'buildman', debug, verbose, False, False, args.threads, test_name, [], - [test.TestBuild, func_test.TestFunctional, test_boards.TestBoards, - test_bsettings.TestBsettings, 'buildman.toolchain']) + [test.TestBuildOutput, test.TestBuildBoards, test.TestBuild, + test.TestBuildConfig, test.TestBuildMisc, func_test.TestFunctional, + test_boards.TestBoards, test_bsettings.TestBsettings, + 'buildman.toolchain']) return (0 if result.wasSuccessful() else 1) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 904f4e9a212..40ddb351b3c 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -153,11 +153,10 @@ class Options: self.show_errors = False self.keep_outputs = False -class TestBuild(unittest.TestCase): - """Test buildman +# pylint: disable=too-many-instance-attributes +class TestBuildBase(unittest.TestCase): + """Base class for buildman tests with common setup""" - TODO: Write tests for the rest of the functionality - """ def setUp(self): # Set up commits to build self.commits = [] @@ -207,6 +206,10 @@ class TestBuild(unittest.TestCase): def tearDown(self): shutil.rmtree(self.base_dir) + +class TestBuildOutput(TestBuildBase): + """Tests for build output and summary display""" + def make(self, cmt, brd, _stage, *_args, **_kwargs): """Mock make function for testing build output""" result = command.CommandResult() @@ -518,6 +521,10 @@ class TestBuild(unittest.TestCase): args = ['tegra20'] control.do_buildman(options, args) + +class TestBuildBoards(TestBuildBase): + """Tests for board selection""" + def test_board_single(self): """Test single board selection""" self.assertEqual(self.brds.select_boards(['sandbox']), @@ -578,6 +585,14 @@ class TestBuild(unittest.TestCase): self.assertEqual(self.brds.select_boards(['sandbox sandbox', 'sandbox']), ({'all': ['board4'], 'sandbox': ['board4']}, [])) + + +class TestBuild(TestBuildBase): + """Tests for buildman functionality + + TODO: Write tests for the rest of the functionality + """ + def check_dirs(self, build, dirname): """Check that the output directories are correct""" self.assertEqual(f'base{dirname}', build.get_output_dir(1)) @@ -720,6 +735,10 @@ class TestBuild(unittest.TestCase): expected = {os.path.join(base_dir, f) for f in to_remove} self.assertEqual(expected, result) + +class TestBuildConfig(TestBuildBase): + """Tests for config adjustment functionality""" + def test_adjust_cfg_nop(self): """check various adjustments of config that are nops""" # enable an enabled CONFIG @@ -854,6 +873,10 @@ class TestBuild(unittest.TestCase): ['MARY="mary"', 'Missing expected line: CONFIG_MARY="mary"']], result) + +class TestBuildMisc(TestBuildBase): + """Miscellaneous buildman tests""" + def get_procs(self): """Get list of running process IDs from the running file""" running_fname = os.path.join(self.base_dir, control.RUNNING_FNAME) From patchwork Tue Jan 6 14:28:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1301 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=1767709814; bh=hXHi8+K7HSCeg4hLsjTUlxTwwChSiw5GFs+9SBTOBHU=; 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=Ob7o4TE6x4uisOrAAhpFvmzk7IdlcBLT9Cr5bjGv9yPXm5E5MbimPDutME5dT3qOi tC/hjot++nNV/TK1tY86fPJuU0+6g+UH69ax16GskuYn0tW9kWHH1m8bdahcTL84yD s7H1c5l4gl/7+/lFi3zA/KoTGoYdxIF+r4wmjuJzALqaDyod8fwMqN5/V4UsjC5opV bpImvkjD8+CB6VdyIWBExHhB8L7NjN20CFQ1k/eS8Y1z638CRvlgz9bRgwJhcIT0nC QLoSVEXFedFgeA7CfsV2X6uB7RhfD+gXka3M/NLxvYB0CWLo8M1a5yEqf9GbeKlpAm yLxO7yiwHeNzg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CC24269087 for ; Tue, 6 Jan 2026 07:30: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 10024) with ESMTP id cx6ilE8yopxO for ; Tue, 6 Jan 2026 07:30:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709814; bh=hXHi8+K7HSCeg4hLsjTUlxTwwChSiw5GFs+9SBTOBHU=; 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=Ob7o4TE6x4uisOrAAhpFvmzk7IdlcBLT9Cr5bjGv9yPXm5E5MbimPDutME5dT3qOi tC/hjot++nNV/TK1tY86fPJuU0+6g+UH69ax16GskuYn0tW9kWHH1m8bdahcTL84yD s7H1c5l4gl/7+/lFi3zA/KoTGoYdxIF+r4wmjuJzALqaDyod8fwMqN5/V4UsjC5opV bpImvkjD8+CB6VdyIWBExHhB8L7NjN20CFQ1k/eS8Y1z638CRvlgz9bRgwJhcIT0nC QLoSVEXFedFgeA7CfsV2X6uB7RhfD+gXka3M/NLxvYB0CWLo8M1a5yEqf9GbeKlpAm yLxO7yiwHeNzg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B985669118 for ; Tue, 6 Jan 2026 07:30:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709812; bh=WSv9+v+tjbRQuknS3OwbMUCEFZeHrstT9CEYHCgmPbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a4uHLRbLX3YqJFsNuecXBrnBP5PEMxrCG7eW+XCUpvVGKgIkVuNxRKBa9pyQDmG2L RqS9O08Tfw2iWlTsZDyGzfPexxcmmQr7c4DgJr4ZuhgH6x0xCunVIVGX47YSb2h3Pc DKzSpr7g3Oe3utTcR3W6B9rcYrmF/kqZdtbclurlqgmUKfWAmHZoOjf9QYtN9UtnE0 Ykt3HxTKBpg1COc/UWjRFZ1Eqvvm68s9btjLxKGc6t1/5QkI+rVTfitrD2cM/hx0WT s79LUW7blB9CAq+C0U9fu45ozxRq+mRp2vnrUCnh/y+yVQcntXtKRPVnPKM5y3Dea6 S89JBmfwTYrpQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 367D169087; Tue, 6 Jan 2026 07:30:12 -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 RG-n2h8_-nNZ; Tue, 6 Jan 2026 07:30:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709807; bh=ufxgd3EEeEeRf7wYgRaqqmFA+8WVQeZZ1qzNehnc/zU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNb6dThnCueubWPpmV02bRyqw7HtGukDBUAVT02P+3dK9UaaycIuUfKNnbNOxS0TH s9KIgrluwqvO34ndcHRs5TuW/yMQDsgtkdqhRg0wt2ikCVtWCXWTM2jaHohti32oRF Z+267kGIyGhxqBFVxgaEBXHg75yWGGWeN0CCOgLr0hEtl/YX/6aDmS2aIXdIZ86cg3 4HoJyq1nap84UFPokanzfyCNGxcUstZTOIVMkrdR71j3O4KHhxBdocvQvN9vRrXsAM 5nPMpLnTLoPJuCcZ4veAd6GeLM95CIy4J4gPBRhpLFiFaKoNyBldfuqh8Pb+FGNNYX v+fh0bnwxTCBw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 7C7D969054; Tue, 6 Jan 2026 07:30:07 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:25 -0700 Message-ID: <20260106142834.2511220-21-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TJQW3GBFNN7V5YRCX56POPM5OUE2ZWPM X-Message-ID-Hash: TJQW3GBFNN7V5YRCX56POPM5OUE2ZWPM 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 20/22] buildman: Refactor _check_output() in test.py 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 add_line_prefix() out of _check_output() to be a standalone class method. Split _check_output() into two parts, with _check_output_part2() handling commits 5-7. This reduces the complexity of _check_output() and improves readability. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/test.py | 98 +++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 40 deletions(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 40ddb351b3c..eafe2acb122 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -278,6 +278,34 @@ class TestBuildOutput(TestBuildBase): terminal.echo_print_test_lines() return iter(terminal.get_print_test_lines()) + def _add_pfx(self, prefix, brds, error_str, colour): + """Add a prefix to each line of a string + + The trailing newline in error_str is removed before processing + + Args: + prefix (str): String prefix to add + brds (str): Board names to include in the output + error_str (str): Error string containing the lines + colour (int): Expected colour for the line. Note that the board + list, if present, always appears in magenta + + Returns: + str: New string where each line has the prefix added + """ + lines = error_str.strip().splitlines() + new_lines = [] + for line in lines: + if brds: + expect = self._col.build(colour, prefix + '(') + expect += self._col.build(self._col.MAGENTA, brds, + bright=False) + expect += self._col.build(colour, f') {line}') + else: + expect = self._col.build(colour, prefix + line) + new_lines.append(expect) + return '\n'.join(new_lines) + def _check_output(self, lines, list_error_boards=False, filter_dtb_warnings=False, filter_migration_warnings=False): @@ -290,34 +318,6 @@ class TestBuildOutput(TestBuildBase): filter_dtb_warnings: Adjust the check for output produced with the --filter-dtb-warnings flag """ - def add_line_prefix(prefix, brds, error_str, colour): - """Add a prefix to each line of a string - - The trailing newline in error_str is removed before processing - - Args: - prefix (str): String prefix to add - brds (str): Board names to include in the output - error_str (str): Error string containing the lines - colour (int): Expected colour for the line. Note that the board - list, if present, always appears in magenta - - Returns: - str: New string where each line has the prefix added - """ - lines = error_str.strip().splitlines() - new_lines = [] - for line in lines: - if brds: - expect = self._col.build(colour, prefix + '(') - expect += self._col.build(self._col.MAGENTA, brds, - bright=False) - expect += self._col.build(colour, f') {line}') - else: - expect = self._col.build(colour, prefix + line) - new_lines.append(expect) - return '\n'.join(new_lines) - col = terminal.Color() boards01234 = ('board0 board1 board2 board3 board4' if list_error_boards else '') @@ -338,7 +338,7 @@ class TestBuildOutput(TestBuildBase): outcome=OUTCOME_WARN) self.assertEqual(next(lines).text, - add_line_prefix('+', boards01234, MIGRATION, col.RED)) + self._add_pfx('+', boards01234, MIGRATION, col.RED)) # Second commit: all archs should fail with warnings self.assertEqual(next(lines).text, f'02: {COMMITS[1][1]}') @@ -353,7 +353,7 @@ class TestBuildOutput(TestBuildBase): # Second commit: The warnings should be listed self.assertEqual(next(lines).text, - add_line_prefix('w+', boards1234, ERRORS[0], col.YELLOW)) + self._add_pfx('w+', boards1234, ERRORS[0], col.YELLOW)) # Third commit: Still fails self.assertEqual(next(lines).text, f'03: {COMMITS[2][1]}') @@ -366,7 +366,7 @@ class TestBuildOutput(TestBuildBase): # Expect a compiler error self.assertEqual(next(lines).text, - add_line_prefix('+', boards234, ERRORS[1], col.RED)) + self._add_pfx('+', boards234, ERRORS[1], col.RED)) # Fourth commit: Compile errors are fixed, just have warning for board3 self.assertEqual(next(lines).text, f'04: {COMMITS[3][1]}') @@ -387,13 +387,31 @@ class TestBuildOutput(TestBuildBase): # Compile error fixed self.assertEqual(next(lines).text, - add_line_prefix('-', boards234, ERRORS[1], col.GREEN)) + self._add_pfx('-', boards234, ERRORS[1], col.GREEN)) if not filter_dtb_warnings: self.assertEqual( next(lines).text, - add_line_prefix('w+', boards34, ERRORS[2], col.YELLOW)) + self._add_pfx('w+', boards34, ERRORS[2], col.YELLOW)) + + self._check_output_part2(lines, col, boards01234, boards34, boards4, + filter_dtb_warnings, filter_migration_warnings) + def _check_output_part2(self, lines, col, boards01234, boards34, boards4, + filter_dtb_warnings, filter_migration_warnings): + """Check expected output from the build summary (commits 5-7) + + Args: + lines: Iterator containing the lines returned from the summary + col: terminal.Color object for building expected output + boards01234: Board string for all boards (or empty) + boards34: Board string for boards 3-4 (or empty) + boards4: Board string for board 4 (or empty) + filter_dtb_warnings: Adjust the check for output produced with the + --filter-dtb-warnings flag + filter_migration_warnings: Adjust the check for output produced + with the --filter-migration-warnings flag + """ # Fifth commit self.assertEqual(next(lines).text, f'05: {COMMITS[4][1]}') if filter_migration_warnings: @@ -406,12 +424,12 @@ class TestBuildOutput(TestBuildBase): expect = [expect[0]] + expect[2:] expect = '\n'.join(expect) self.assertEqual(next(lines).text, - add_line_prefix('+', boards4, expect, col.RED)) + self._add_pfx('+', boards4, expect, col.RED)) if not filter_dtb_warnings: self.assertEqual( next(lines).text, - add_line_prefix('w-', boards34, ERRORS[2], col.CYAN)) + self._add_pfx('w-', boards34, ERRORS[2], col.CYAN)) # Sixth commit self.assertEqual(next(lines).text, f'06: {COMMITS[5][1]}') @@ -427,9 +445,9 @@ class TestBuildOutput(TestBuildBase): expect = [expect[0]] + expect[2:] expect = '\n'.join(expect) self.assertEqual(next(lines).text, - add_line_prefix('-', boards4, expect, col.GREEN)) + self._add_pfx('-', boards4, expect, col.GREEN)) self.assertEqual(next(lines).text, - add_line_prefix('w-', boards4, ERRORS[0], col.CYAN)) + self._add_pfx('w-', boards4, ERRORS[0], col.CYAN)) # Seventh commit self.assertEqual(next(lines).text, f'07: {COMMITS[6][1]}') @@ -449,16 +467,16 @@ class TestBuildOutput(TestBuildBase): if not filter_migration_warnings: self.assertEqual( next(lines).text, - add_line_prefix('-', boards01234, MIGRATION, col.GREEN)) + self._add_pfx('-', boards01234, MIGRATION, col.GREEN)) self.assertEqual(next(lines).text, - add_line_prefix('+', boards4, expect, col.RED)) + self._add_pfx('+', boards4, expect, col.RED)) # Now the warnings lines expect = [expect_str[0]] + expect_str[10:12] + [expect_str[9]] expect = '\n'.join(expect) self.assertEqual(next(lines).text, - add_line_prefix('w+', boards4, expect, col.YELLOW)) + self._add_pfx('w+', boards4, expect, col.YELLOW)) def test_output(self): """Test basic builder operation and output From patchwork Tue Jan 6 14:28:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1302 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=1767709819; bh=FpvBufLCGvzCSmbtWfyfrpGA/+7IuMr15uBRUNs+v3Y=; 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=dj3QXNMj4WAQYD6rn5CqCXi14GW10X1Ra2ct7pfXwaxBn3x1h3JobrxwJ8F0TC9KN X/FgTEUEVuhYDa5lnkozwt7MBD9rNTo7Ek6DfxVumVObuskJRrY6xj+wwlhAfW10nV fGT5fbvL2DAdkm1114PIDKRPB0EZ7FbeqaKiPpSR6PnS3nLhN6ojAOFPuVJYxrOwyP HFl/5SuodfmijCD/dK0kBARVcAKfGmmK0/0/QF2E/yXvywQDkOd3mXTlegETwAFugA /G6RfKWOEWAr+wf1hRyckItrFd+ZTNPkX2Wv1LA4UOY88vc4C0NlqiiJRSapwyw3lD 4E3rskAwDS8FA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8B48969142 for ; Tue, 6 Jan 2026 07:30:19 -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 R3wDzls2XJSz for ; Tue, 6 Jan 2026 07:30:19 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709819; bh=FpvBufLCGvzCSmbtWfyfrpGA/+7IuMr15uBRUNs+v3Y=; 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=dj3QXNMj4WAQYD6rn5CqCXi14GW10X1Ra2ct7pfXwaxBn3x1h3JobrxwJ8F0TC9KN X/FgTEUEVuhYDa5lnkozwt7MBD9rNTo7Ek6DfxVumVObuskJRrY6xj+wwlhAfW10nV fGT5fbvL2DAdkm1114PIDKRPB0EZ7FbeqaKiPpSR6PnS3nLhN6ojAOFPuVJYxrOwyP HFl/5SuodfmijCD/dK0kBARVcAKfGmmK0/0/QF2E/yXvywQDkOd3mXTlegETwAFugA /G6RfKWOEWAr+wf1hRyckItrFd+ZTNPkX2Wv1LA4UOY88vc4C0NlqiiJRSapwyw3lD 4E3rskAwDS8FA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 755C769118 for ; Tue, 6 Jan 2026 07:30:19 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709817; bh=fboVpwy9EWt/hGF3bNAtPNjRbY9zpe58qifmJYq5rLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vuGCujibgnKeQWu1G5eIPtoc3QctaxsGmzMhJWSH8u74C76SzX/7PV7DM74B8wGiq IgEa+D2cGaJ121vDu1Pp+4klfL9/FGqNkM+PJEmot0wl4pgezBwNd3SR4sun1ww7N1 C9TVtmsZSI5VdrVK8lXcahbEOORdoZXwv8NaH4tm5EEIimRKqX8nuPefA+7Y8Fx+Ok YkrHaQmy26TIy+ILnf8ksiIzdrnnKOOn5WMrBvfOy8yxB2s/xNH6sgTzoFdaKt7hpI wy9v5t+Ep2tDfrL8VwH92WPhME8bdf9HMng9Y9onR8NjXfW+QOxXunHWY7KTiPJzS2 dHjEzTJbpOQTw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3D6FF69087; Tue, 6 Jan 2026 07:30:17 -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 fgIP3miqrc1T; Tue, 6 Jan 2026 07:30:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709812; bh=cfOvzxUFIQSUjwR4AousL0mYnZfg0EsQCgJILTiH2fI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=krCXjDGS1DGFi/IPUcRW+xVYPsxGkdhaIvSWBfWVCtgHD0ekGj+bipjYTPAyYjy6m LyrU6yU0x33k2w2aFrgMa1foxxHAfVYMeTgpofcwSI2Hm/3RzaduhTOGmD8ZsDWnsX r375Se/QDw96ROUbFDmlpLse9yE6RZQjFy+3choHNWYUHZINqQdC2hWSoq0sfLEA+W FFQKiC/MmDecnQC5qVey+LpNV6dw08IWXmKHCPWmSTcUNOldlizJJ3jRi8cgGSpn8S uYborowqkg5DbpATsPbf4G/1FlqvjtEugf+3wXgTplBiYEZCvnDVI1OGpIi0OQfcx9 JHf6CcFOGQHKQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 7266169054; Tue, 6 Jan 2026 07:30:12 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:26 -0700 Message-ID: <20260106142834.2511220-22-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: VPHVCYBXOQWMLJQDHYDO74QDP2FQJKGB X-Message-ID-Hash: VPHVCYBXOQWMLJQDHYDO74QDP2FQJKGB 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 21/22] buildman: Split test_process_limit() into two tests in test.py 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 Split the test into test_process_limit() for basic operation, timeout and lock-busting, and test_process_limit_dead() for dead process handling. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/test.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index eafe2acb122..f37f868da60 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -986,6 +986,26 @@ class TestBuildMisc(TestBuildBase): self.assertEqual(control.RUN_WAIT_S, self.cur_time) lock.release() + def test_process_limit_dead(self): + """Test wait_for_process_limit() with dead processes""" + tmpdir = self.base_dir + + with (patch('time.time', side_effect=self.get_time), + patch('time.perf_counter', side_effect=self.get_time), + patch('time.monotonic', side_effect=self.get_time), + patch('time.sleep', side_effect=self.inc_time), + patch('os.kill', side_effect=self.kill)): + # Set up initial state with PIDs 1, 2, 3 in file + control.wait_for_process_limit(1, tmpdir=tmpdir, pid=1) + self.valid_pids = [1] + control.wait_for_process_limit(1, tmpdir=tmpdir, pid=2) + self.valid_pids = [1, 2] + lock_fname = os.path.join(tmpdir, control.LOCK_FNAME) + lock = FileLock(lock_fname) + lock.acquire(timeout=1) + control.wait_for_process_limit(1, tmpdir=tmpdir, pid=3) + lock.release() + # Check handling of dead processes. Here we have PID 2 as a running # process, even though the PID file contains 1, 2 and 3. So we can # add one more PID, to make 2 and 4 From patchwork Tue Jan 6 14:28:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1303 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=1767709824; bh=zTzNMrjt+Hy+fMyTEKgrLvhC1nIU8iGj14FSzj8GlMg=; 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=jguKf8FV05XjoinJ736oaNp8Ao4CW9F7JsPVUsdn3+wvPKNNjitTAaixoXUC0pCus 1IkkMyOXA1ZSYW4x4QntZXpafuFlzL5FIDjIEh5FMDgDGAijnpbYoWZDfgUj9xYRT8 21dISvtqEv0zeahKuIrbdb7EnRipd+0hNIrH8JeWZYz28OvQdsYuyEyPSVtx+JwgUF aW+Xcm+BnXlQjw2B3zEgHBil/uxtWVX3B/yobu1G+AFtoVQixldrk09AMX9j4SiJzd WjoWDsLlLJKZ42kOqi0dr9IS/HGzTKMuQi8Vwxy8NL/iDBVAGf5HtUFZFdywtkubF9 NWA8yJTIgE1Yg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1262A69122 for ; Tue, 6 Jan 2026 07:30:24 -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 XyC_ekN-gEq3 for ; Tue, 6 Jan 2026 07:30:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709824; bh=zTzNMrjt+Hy+fMyTEKgrLvhC1nIU8iGj14FSzj8GlMg=; 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=jguKf8FV05XjoinJ736oaNp8Ao4CW9F7JsPVUsdn3+wvPKNNjitTAaixoXUC0pCus 1IkkMyOXA1ZSYW4x4QntZXpafuFlzL5FIDjIEh5FMDgDGAijnpbYoWZDfgUj9xYRT8 21dISvtqEv0zeahKuIrbdb7EnRipd+0hNIrH8JeWZYz28OvQdsYuyEyPSVtx+JwgUF aW+Xcm+BnXlQjw2B3zEgHBil/uxtWVX3B/yobu1G+AFtoVQixldrk09AMX9j4SiJzd WjoWDsLlLJKZ42kOqi0dr9IS/HGzTKMuQi8Vwxy8NL/iDBVAGf5HtUFZFdywtkubF9 NWA8yJTIgE1Yg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0209269087 for ; Tue, 6 Jan 2026 07:30:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709822; bh=ZT6JaHQlxH3qpzDSdiOhTUMVrmowA2E39BfDQdMVFQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VTokt2U57nojjbytcDOm8D1VUGNNeNUoO1RgRGOwnToHdL+OkhUcGZI1boB/m9DjR ImtYWxmT/Pja9A2m5QtQ7nY7cQApBCV1Bq9gSZuLtFZsysYYjR+z0anFrYAwFRzu9e jw3lQZO6SO+JTh4GK5aPdkaTraoV8gh/CEKhgsD4d0rabqDrpAVW9SWvF690fnS74k G4aXvVE1uNlx4nYrNdAtPgbkMR06y5AkTZFUMus8pyoCTOBVtFfuhdVk+FJI91BX8a IKUBXvXpkyoNsL3xkuZj0Pk98PCvBfSHrLsSKmRFVflPs3Bo7gIiDYXedPTunCO/wP GcCUfI4OYA0hA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 01AAB69087; Tue, 6 Jan 2026 07:30:22 -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 U7URVizrUpPZ; Tue, 6 Jan 2026 07:30:21 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767709817; bh=y4RcAA2dyeZNAJU9kcgK22qgS/WVia0fp27PFRQapCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TQBO9jBkXGjhzuJ94wzC1NpdGCRB0W2JiGCYPQ1oKNYt8xM4upgGxHq+if8Hazc65 s3SDtfCrutrY+Byaum1HGlvCgsruoQvv1RyJFHMqMn3/d/aZ/x2vvki6O6Gc1mofmz 5wvC8HQs+6urTzCX2k4vIPV/VIoxW0Nbx8BhJf4aii8aLxDQpMO7P0lp8nYn+L8z6C xeGz+CQbsaZOZvVqoDBrR9HQ5Y6N839qQrIEcQeodK5ID9zzqtalWwEAL/bB5z4zdF M1QBFfc8UfFD5hBOxbwlxGqhrODiYL0oxrxl3k3OZt4wO1xBq7cOpSQD1pRlfkW8EU 6WBnfouenQyng== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 7BBFC69054; Tue, 6 Jan 2026 07:30:17 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 07:28:27 -0700 Message-ID: <20260106142834.2511220-23-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106142834.2511220-1-sjg@u-boot.org> References: <20260106142834.2511220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 5N6ARPMK6P74GJEA4O3LDYSNIWMFTCYT X-Message-ID-Hash: 5N6ARPMK6P74GJEA4O3LDYSNIWMFTCYT 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 22/22] buildman: Disable some final pylint warnings in test.py 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 Also disable too-many-lines at module level, and too-many-arguments for assert_summary() and _check_output_part2() Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index f37f868da60..fb5dcd09555 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -4,6 +4,8 @@ """Tests for the buildman build tool""" +# pylint: disable=too-many-lines + import os import shutil import sys @@ -229,6 +231,7 @@ class TestBuildOutput(TestBuildBase): result.combined = result.stdout + result.stderr return result + # pylint: disable=too-many-arguments def assert_summary(self, text, arch, plus, brds, outcome=OUTCOME_ERR): """Check that the summary text matches expectations""" col = self._col @@ -397,6 +400,7 @@ class TestBuildOutput(TestBuildBase): self._check_output_part2(lines, col, boards01234, boards34, boards4, filter_dtb_warnings, filter_migration_warnings) + # pylint: disable=too-many-arguments def _check_output_part2(self, lines, col, boards01234, boards34, boards4, filter_dtb_warnings, filter_migration_warnings): """Check expected output from the build summary (commits 5-7)