From patchwork Sat Jan 10 23:56: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: 1473 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=1768089427; bh=Jv2ugZ3mMZZpCq5q292aD5SgxcD6Dpald9UCnlC/Arw=; 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=f8SmK6eoHdMPl1NT1oWPAqXV0EkucFcQN+b3MrczeR6nINcJ2aYCx/KCeTbNc2m8C aTn33JCQ3iwV3V6oNUFp3rAHYM4nJ4qlJvGs8ucr7gZ/QUM1B5IHRooLM8xuoGcgn3 AGHCtyBYbvM03C88jPiSCSsoDNqJoUZrlPRiHmnd3Ml5+tZobwKZ1TJwZNQm0m2Lsi mBhpNj3th9YjXTwuuvIsz9die8s+R8NjqmXn5GkMxtbMUU5f6yHm9Kyrn8SUF1AmXh Tr1V9ZwhExosONzgvbYcPgipBAdErOMuueOsUc/RzXljLZWlE/RUMRZ9ONIGTh75sJ Tg5rEymnLC1pQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2D621692B5 for ; Sat, 10 Jan 2026 16:57: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 10024) with ESMTP id 2VuGAUnItusK for ; Sat, 10 Jan 2026 16:57:07 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089427; bh=Jv2ugZ3mMZZpCq5q292aD5SgxcD6Dpald9UCnlC/Arw=; 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=f8SmK6eoHdMPl1NT1oWPAqXV0EkucFcQN+b3MrczeR6nINcJ2aYCx/KCeTbNc2m8C aTn33JCQ3iwV3V6oNUFp3rAHYM4nJ4qlJvGs8ucr7gZ/QUM1B5IHRooLM8xuoGcgn3 AGHCtyBYbvM03C88jPiSCSsoDNqJoUZrlPRiHmnd3Ml5+tZobwKZ1TJwZNQm0m2Lsi mBhpNj3th9YjXTwuuvIsz9die8s+R8NjqmXn5GkMxtbMUU5f6yHm9Kyrn8SUF1AmXh Tr1V9ZwhExosONzgvbYcPgipBAdErOMuueOsUc/RzXljLZWlE/RUMRZ9ONIGTh75sJ Tg5rEymnLC1pQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1B2C7692AE for ; Sat, 10 Jan 2026 16:57:07 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089425; bh=UQ3PLLcl64zA/ZLzkCFVmmmd+MQIBssrnXRxmHGuQP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CdWU3PnibjZUxYEFmuwXeq476UHY8caf60A6ca1j2okVhxs+QcWRy87FCSppxwxGX LIFAbf9CLQfX10Nga6JassmeVfjwA2caYFVsru7xMEZSlwwXugvyKNHMmZI7UiyA8k iNJOpdCWF0dAh1klI1DJbbvQsU7/fLXlmMeRi8ORo8PsNVVyIL77rymM/f03a++qPv ea7A36aFR4mfZ+Vz1SgfLASy4hf8ndtXLhBO3jLM6dxCdhYeGydgVScngc+25LNsFN cLJ+G+Fez1geHAXFlOjPc7SQGFDzVUIMHKk1ti62iesz6xlX8qWey9EHy3rmhQpR83 AL72Z5d2n54xw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F41A4692A1; Sat, 10 Jan 2026 16:57:04 -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 0hIokQhMJ2VJ; Sat, 10 Jan 2026 16:57:04 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089420; bh=RPkdyaKbvTx8UFbf+IodHQ2wi2SUWUXlcngGj+bABEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hE1qqWhemHIHaR6AjTOR+A0yes+qVs8j2VUQiJQ8CeBlO4mpEhSylhw8T5a6N6/TX j4W1RoDGyo3d7MLPzApKCdP6VJJuYscerDjIg0UUr1r4Dzvdld+bxlMKfSUZVxZAdG V1z9IhBirLdOCCEIwPINxarqrh6hOA5BKiAucgMQOrDtIa9GzhhqFJfUNrZVDOkCIB 0RAjWybcn88fo1GjSHqk0MUWs0ZHndlWLjrG2vk7fHU32MvKbuUhYeyBj+M+TBmGoV mtvb1IJa5dyDAwxYDJtxCPfFmSZ31WyaVUc7qwuSdfhF/78OlaJ7UeBFAR8AWfvyNR r3fSGyT7gmQQw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A778169186; Sat, 10 Jan 2026 16:57:00 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:14 -0700 Message-ID: <20260110235633.1064859-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: GRFUTRM3DEL2RA7NNO7AJR7S2PRVC3TL X-Message-ID-Hash: GRFUTRM3DEL2RA7NNO7AJR7S2PRVC3TL 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/14] buildman: Rename module constants to UPPER_CASE in func_test 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 settings_data to SETTINGS_DATA and commit_shortlog to COMMIT_SHORTLOG to follow Python naming conventions for module-level constants. This fixes pylint C0103 warnings. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index fa946c55645..9a067ec5e7a 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -27,7 +27,7 @@ from u_boot_pylib import terminal from u_boot_pylib import test_util from u_boot_pylib import tools -settings_data = ''' +SETTINGS_DATA = ''' # Buildman settings file [global] @@ -51,7 +51,7 @@ BOARDS = [ ['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', ''], ] -commit_shortlog = """4aca821 patman: Avoid changing the order of tags +COMMIT_SHORTLOG = """4aca821 patman: Avoid changing the order of tags 39403bb patman: Use --no-pager' to stop git from forking a pager db6e6f2 patman: Remove the -a option f2ccf03 patman: Correct unit tests to run correctly @@ -192,7 +192,7 @@ class TestFunctional(unittest.TestCase): self._buildman_dir = os.path.dirname(os.path.realpath(sys.argv[0])) command.TEST_RESULT = self._HandleCommand bsettings.setup(None) - bsettings.add_file(settings_data) + bsettings.add_file(SETTINGS_DATA) self.setupToolchains() self._toolchains.add('arm-gcc', test=False) self._toolchains.add('powerpc-gcc', test=False) @@ -202,7 +202,7 @@ class TestFunctional(unittest.TestCase): # Directories where the source been cloned self._clone_dirs = [] - self._commits = len(commit_shortlog.splitlines()) + 1 + self._commits = len(COMMIT_SHORTLOG.splitlines()) + 1 self._total_builds = self._commits * len(BOARDS) # Number of calls to make @@ -303,7 +303,7 @@ class TestFunctional(unittest.TestCase): if '-n0' in args: return command.CommandResult(return_code=0) elif args[-1] == 'upstream/master..%s' % self._test_branch: - return command.CommandResult(return_code=0, stdout=commit_shortlog) + return command.CommandResult(return_code=0, stdout=COMMIT_SHORTLOG) elif args[:3] == ['--no-color', '--no-decorate', '--reverse']: if args[-1] == self._test_branch: count = int(args[3][2:]) From patchwork Sat Jan 10 23:56: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: 1474 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=1768089432; bh=AR8ynysnh34whcsZNG/aGWhKy63igdnZXqszJM65bZ4=; 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=pG3xn0w/B/fceV+niUjah6LmUkVYIgHwpyoXFCrgksqpcph3LjAj9lO9Tlqaxi7Xb lQrWsQue9E+dsMkQxcQhkOSsii7SWo5vkp4dX5cgu02PfaBjGHz9GdSb694gYItax3 c8qlxJwPuHo4Wxpm3SMvRl3C4U2znc8EQS6vmY8pTcQ6teKgKA2mlYx4qS2c/SijWr 1CmbrVZrkiDzqStL8eePNcZ09fR75mxYaN3gods4qk68i0zzvsygCxG1yTkfKGJNoo Erk2yeAY0rKnfSJUQgVFriMZLb+fwm6PjpordxX/RoUDy4WISLcNEZq2sppLUnGNFo yawleTehFgFXQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A8FBE692B9 for ; Sat, 10 Jan 2026 16:57: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 10024) with ESMTP id bOVRj4O6njZr for ; Sat, 10 Jan 2026 16:57:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089432; bh=AR8ynysnh34whcsZNG/aGWhKy63igdnZXqszJM65bZ4=; 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=pG3xn0w/B/fceV+niUjah6LmUkVYIgHwpyoXFCrgksqpcph3LjAj9lO9Tlqaxi7Xb lQrWsQue9E+dsMkQxcQhkOSsii7SWo5vkp4dX5cgu02PfaBjGHz9GdSb694gYItax3 c8qlxJwPuHo4Wxpm3SMvRl3C4U2znc8EQS6vmY8pTcQ6teKgKA2mlYx4qS2c/SijWr 1CmbrVZrkiDzqStL8eePNcZ09fR75mxYaN3gods4qk68i0zzvsygCxG1yTkfKGJNoo Erk2yeAY0rKnfSJUQgVFriMZLb+fwm6PjpordxX/RoUDy4WISLcNEZq2sppLUnGNFo yawleTehFgFXQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 94F90692B0 for ; Sat, 10 Jan 2026 16:57:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089430; bh=7xgVUNZ5sAJaZGldO8PaDkVxSXImAyeZ2+7Q27KhIjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pNVwBqdywW67zDzENzKPXpc8py/8/FZFrDNoQxalj/tPXJf7InWVPxjfCa9a8tOtX EfbRqINrR44LPsHcWlSK3fG6HDgM2IsO8qN0O0SfJaQWxT9VDZOWkcub20PcLlQiXA DysCaWyuYHZ5TUwx3i1vTB6usUnTapJMTbO1waniPeXJWkaNMW1o7kY37rIzepOG8i MYDULSwvEpj6Q3jiWTEq5FbutxcUeFwrr9pVOO/qXxKPiQCLL1PsAhJY9BwxkrgxJz yYTBBVUGGYkncqs9eMI1t1Hig7ND2kMADuX2Qqj2IXZ0j8iB32L2AzmoY1Z6iH013j YXuK8gL8/Auyg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0464E692AE; Sat, 10 Jan 2026 16:57: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 10026) with ESMTP id qCiJO71JuTGd; Sat, 10 Jan 2026 16:57:09 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089425; bh=mKZhs69b1+oIOR5m6p5o5DqEJxb2kOW9XfoPd3N3NEc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hw2cb4dMcR59S9jb5jL5LJ/ZJGDsRixdpdOJiEgQo7DqCUFelgef4FnsKQTlLinh1 o/WxdPZ2JZCmu5oyFn3EWZFcWlkaubUe4P7cT5j4UNuz0I+tySoTDJhgCmNtKwgViW qXG8ESwTUpYDO78XC6edCgt167pLTajJE3rmXrmjlTVCOu+ztfbc+EwE5QkvtQ1frO 3RiEFUY6aQ1ELm9kW9jcCDanCTnslkjI2xeE2+CWoRyoL9K1xMwEpC6MVOiJPXNrdC oNIHh+nr06xDJmezOLjSMyJ5LyqNgLZdF6Aql789QBOXwz4NOsqKirJxyKFhLmG0Dq r1PhaxqrJY9Sw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 44B2369186; Sat, 10 Jan 2026 16:57:05 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:15 -0700 Message-ID: <20260110235633.1064859-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: MCS4ETHX2P7IIP7TDQOKIYTOJALSUEAC X-Message-ID-Hash: MCS4ETHX2P7IIP7TDQOKIYTOJALSUEAC 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/14] buildman: Use snake_case for method names in func_test 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 all methods to use snake_case instead of camelCase to follow Python naming conventions. This includes helper methods like _run_buildman, _run_control, _handle_command*, _handle_make, and all test methods. Also add a pylint disable comment for the maxDiff attribute which is a standard unittest name. This fixes pylint C0103 warnings. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 248 ++++++++++++++++++------------------ 1 file changed, 124 insertions(+), 124 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 9a067ec5e7a..f917e66510b 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -190,10 +190,10 @@ class TestFunctional(unittest.TestCase): self._git_dir = os.path.join(self._base_dir, 'src') self._buildman_pathname = sys.argv[0] self._buildman_dir = os.path.dirname(os.path.realpath(sys.argv[0])) - command.TEST_RESULT = self._HandleCommand + command.TEST_RESULT = self._handle_command bsettings.setup(None) bsettings.add_file(SETTINGS_DATA) - self.setupToolchains() + self.setup_toolchains() self._toolchains.add('arm-gcc', test=False) self._toolchains.add('powerpc-gcc', test=False) self._boards = boards.Boards() @@ -230,15 +230,15 @@ class TestFunctional(unittest.TestCase): shutil.rmtree(self._base_dir) shutil.rmtree(self._output_dir) - def setupToolchains(self): + def setup_toolchains(self): self._toolchains = toolchain.Toolchains() self._toolchains.add('gcc', test=False) - def _RunBuildman(self, *args): + def _run_buildman(self, *args): all_args = [self._buildman_pathname] + list(args) return command.run_one(*all_args, capture=True, capture_stderr=True) - def _RunControl(self, *args, brds=False, clean_dir=False, + def _run_control(self, *args, brds=False, clean_dir=False, test_thread_exceptions=False, get_builder=True): """Run buildman @@ -261,16 +261,16 @@ class TestFunctional(unittest.TestCase): if brds == False: brds = self._boards result = control.do_buildman( - args, toolchains=self._toolchains, make_func=self._HandleMake, + args, toolchains=self._toolchains, make_func=self._handle_make, brds=brds, clean_dir=clean_dir, test_thread_exceptions=test_thread_exceptions) if get_builder: self._builder = control.TEST_BUILDER return result - def testFullHelp(self): + def test_full_help(self): command.TEST_RESULT = None - result = self._RunBuildman('-H') + result = self._run_buildman('-H') help_file = os.path.join(self._buildman_dir, 'README.rst') # Remove possible extraneous strings extra = '::::::::::::::\n' + help_file + '\n::::::::::::::\n' @@ -279,15 +279,15 @@ class TestFunctional(unittest.TestCase): self.assertEqual(0, len(result.stderr)) self.assertEqual(0, result.return_code) - def testHelp(self): + def test_help(self): command.TEST_RESULT = None - result = self._RunBuildman('-h') + result = self._run_buildman('-h') help_file = os.path.join(self._buildman_dir, 'README.rst') self.assertTrue(len(result.stdout) > 1000) self.assertEqual(0, len(result.stderr)) self.assertEqual(0, result.return_code) - def testGitSetup(self): + def test_git_setup(self): """Test gitutils.Setup(), from outside the module itself""" command.TEST_RESULT = command.CommandResult(return_code=1) gitutil.setup() @@ -297,7 +297,7 @@ class TestFunctional(unittest.TestCase): gitutil.setup() self.assertEqual(gitutil.USE_NO_DECORATE, True) - def _HandleCommandGitLog(self, args): + def _handle_command_git_log(self, args): if args[-1] == '--': args = args[:-1] if '-n0' in args: @@ -314,7 +314,7 @@ class TestFunctional(unittest.TestCase): print('git log', args) sys.exit(1) - def _HandleCommandGitConfig(self, args): + def _handle_command_git_config(self, args): config = args[0] if config == 'sendemail.aliasesfile': return command.CommandResult(return_code=0) @@ -330,7 +330,7 @@ class TestFunctional(unittest.TestCase): print('git config', args) sys.exit(1) - def _HandleCommandGit(self, in_args): + def _handle_command_git(self, in_args): """Handle execution of a git command This uses a hacked-up parser. @@ -352,9 +352,9 @@ class TestFunctional(unittest.TestCase): else: sub_cmd = arg if sub_cmd == 'config': - return self._HandleCommandGitConfig(args) + return self._handle_command_git_config(args) elif sub_cmd == 'log': - return self._HandleCommandGitLog(args) + return self._handle_command_git_log(args) elif sub_cmd == 'clone': return command.CommandResult(return_code=0) elif sub_cmd == 'checkout': @@ -366,7 +366,7 @@ class TestFunctional(unittest.TestCase): print('git', git_args, sub_cmd, args) sys.exit(1) - def _HandleCommandNm(self, args): + def _handle_command_nm(self, args): # Return nm --size-sort output with function sizes that vary between # calls to simulate changes between commits self._nm_calls = getattr(self, '_nm_calls', 0) + 1 @@ -378,7 +378,7 @@ class TestFunctional(unittest.TestCase): ''' return command.CommandResult(return_code=0, stdout=stdout) - def _HandleCommandObjdump(self, args): + def _handle_command_objdump(self, args): # Return objdump -h output with .rodata section stdout = ''' u-boot: file format elf32-littlearm @@ -391,10 +391,10 @@ Idx Name Size VMA LMA File off Algn ''' return command.CommandResult(return_code=0, stdout=stdout) - def _HandleCommandObjcopy(self, args): + def _handle_command_objcopy(self, args): return command.CommandResult(return_code=0) - def _HandleCommandSize(self, args): + def _handle_command_size(self, args): # Return size output - vary the size based on call count to simulate # changes between commits self._size_calls = getattr(self, '_size_calls', 0) + 1 @@ -408,7 +408,7 @@ Idx Name Size VMA LMA File off Algn ''' return command.CommandResult(return_code=0, stdout=stdout) - def _HandleCommandCpp(self, args): + def _handle_command_cpp(self, args): # args ['-nostdinc', '-P', '-I', '/tmp/tmp7f17xk_o/src', '-undef', # '-x', 'assembler-with-cpp', fname] fname = args[7] @@ -424,7 +424,7 @@ Idx Name Size VMA LMA File off Algn print(line, file=buf) return command.CommandResult(stdout=buf.getvalue(), return_code=0) - def _HandleCommand(self, **kwargs): + def _handle_command(self, **kwargs): """Handle a command execution. The command is in kwargs['pipe-list'], as a list of pipes, each a @@ -446,21 +446,21 @@ Idx Name Size VMA LMA File off Algn args = pipe_list[0][1:] result = None if cmd == 'git': - result = self._HandleCommandGit(args) + result = self._handle_command_git(args) elif cmd == './scripts/show-gnu-make': return command.CommandResult(return_code=0, stdout='make') elif cmd.endswith('nm'): - return self._HandleCommandNm(args) + return self._handle_command_nm(args) elif cmd.endswith('objdump'): - return self._HandleCommandObjdump(args) + return self._handle_command_objdump(args) elif cmd.endswith('objcopy'): - return self._HandleCommandObjcopy(args) + return self._handle_command_objcopy(args) elif cmd.endswith( 'size'): - return self._HandleCommandSize(args) + return self._handle_command_size(args) elif cmd.endswith( 'cpp'): - return self._HandleCommandCpp(args) + return self._handle_command_cpp(args) elif cmd == 'gcc' and args[0] == '-E': - return self._HandleCommandCpp(args[1:]) + return self._handle_command_cpp(args[1:]) if not result: # Not handled, so abort print('unknown command', kwargs) @@ -470,7 +470,7 @@ Idx Name Size VMA LMA File off Algn result.stdout = len(result.stdout.splitlines()) return result - def _HandleMake(self, commit, brd, stage, cwd, *args, **kwargs): + def _handle_make(self, commit, brd, stage, cwd, *args, **kwargs): """Handle execution of 'make' Args: @@ -534,7 +534,7 @@ Some images are invalid''' return command.CommandResult(return_code=0) # Not handled, so abort - print('_HandleMake failure: make', stage) + print('_handle_make failure: make', stage) sys.exit(1) # Example function to print output lines @@ -544,29 +544,29 @@ Some images are invalid''' print(line) #self.print_lines(terminal.get_print_test_lines()) - def testNoBoards(self): + def test_no_boards(self): """Test that buildman aborts when there are no boards""" self._boards = boards.Boards() with self.assertRaises(SystemExit): - self._RunControl() + self._run_control() - def testCurrentSource(self): + def test_current_source(self): """Very simple test to invoke buildman on the current source""" - self.setupToolchains(); - self._RunControl('-o', self._output_dir) + self.setup_toolchains(); + self._run_control('-o', self._output_dir) lines = terminal.get_print_test_lines() self.assertIn('Building current source for %d boards' % len(BOARDS), lines[0].text) - def testBadBranch(self): + def test_bad_branch(self): """Test that we can detect an invalid branch""" with self.assertRaises(ValueError): - self._RunControl('-b', 'badbranch') + self._run_control('-b', 'badbranch') - def testBadToolchain(self): + def test_bad_toolchain(self): """Test that missing toolchains are detected""" - self.setupToolchains(); - ret_code = self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir) + self.setup_toolchains(); + ret_code = self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) lines = terminal.get_print_test_lines() # Buildman always builds the upstream commit as well @@ -590,19 +590,19 @@ Some images are invalid''' f"No tool chain found for arch '{brd.arch}'"]) fd.close() - def testToolchainErrors(self): + def test_toolchain_errors(self): """Test that toolchain errors are reported in the summary When toolchains are missing, boards cannot be built. The summary should report which boards were not built. """ - self.setupToolchains() + self.setup_toolchains() # Build with missing toolchains - only sandbox will succeed - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) # Now show summary - should report boards not built terminal.get_print_test_lines() # Clear - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir, '-s', + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, '-s', clean_dir=False) lines = terminal.get_print_test_lines() text = '\n'.join(line.text for line in lines) @@ -613,13 +613,13 @@ Some images are invalid''' self.assertIn('board1', text) self.assertIn('board2', text) - def testBranch(self): + def test_branch(self): """Test building a branch with all toolchains present""" - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._builder.fail, 0) - def testCurrentSourceIde(self): + def test_current_source_ide(self): """Test building current source with IDE mode enabled This tests that: @@ -638,7 +638,7 @@ Some images are invalid''' try: sys.stderr = captured_stderr terminal.get_print_test_lines() # Clear any previous output - self._RunControl('-o', self._output_dir, '-I') + self._run_control('-o', self._output_dir, '-I') finally: sys.stderr = old_stderr @@ -654,13 +654,13 @@ Some images are invalid''' # Now run with -s to show summary - output should appear again terminal.get_print_test_lines() # Clear - self._RunControl('-o', self._output_dir, '-s', clean_dir=False) + self._run_control('-o', self._output_dir, '-s', clean_dir=False) lines = terminal.get_print_test_lines() self.assertEqual(len(lines), 2) self.assertIn('Summary of', lines[0].text) self.assertIn('board4', lines[1].text) - def testBranchIde(self): + def test_branch_ide(self): """Test building a branch with IDE mode and summary This tests _print_ide_output() which outputs errors to stderr during @@ -672,7 +672,7 @@ Some images are invalid''' # Build branch normally first (writes results to disk) terminal.get_print_test_lines() - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) self.assertEqual(self._builder.fail, 1) # Run summary with IDE mode - errors go to stderr via _print_ide_output @@ -681,7 +681,7 @@ Some images are invalid''' try: sys.stderr = captured_stderr terminal.get_print_test_lines() - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir, '-sI', + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, '-sI', clean_dir=False) finally: sys.stderr = old_stderr @@ -690,15 +690,15 @@ Some images are invalid''' self.assertEqual(captured_stderr.getvalue(), 'branch_error.c:456: error: branch failure\n') - def testBranchSummary(self): + def test_branch_summary(self): """Test building a branch and then showing a summary""" - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._builder.fail, 0) # Now run with -s to show summary self._make_calls = 0 - self._RunControl('-b', TEST_BRANCH, '-s', '-o', self._output_dir, + self._run_control('-b', TEST_BRANCH, '-s', '-o', self._output_dir, clean_dir=False) # Summary should not trigger any builds self.assertEqual(self._make_calls, 0) @@ -707,7 +707,7 @@ Some images are invalid''' # Now run with -S to show sizes as well self._make_calls = 0 - self._RunControl('-b', TEST_BRANCH, '-sS', '-o', self._output_dir, + self._run_control('-b', TEST_BRANCH, '-sS', '-o', self._output_dir, clean_dir=False) self.assertEqual(self._make_calls, 0) lines = terminal.get_print_test_lines() @@ -719,7 +719,7 @@ Some images are invalid''' # Now run with -B to show bloat (function size changes) self._make_calls = 0 - self._RunControl('-b', TEST_BRANCH, '-sSB', '-o', self._output_dir, + self._run_control('-b', TEST_BRANCH, '-sSB', '-o', self._output_dir, clean_dir=False) self.assertEqual(self._make_calls, 0) lines = terminal.get_print_test_lines() @@ -746,7 +746,7 @@ Some images are invalid''' tools.write_file(cfg_fname, cfg_content.encode('utf-8')) self._make_calls = 0 - self._RunControl('-b', TEST_BRANCH, '-sK', '-o', self._output_dir, + self._run_control('-b', TEST_BRANCH, '-sK', '-o', self._output_dir, clean_dir=False) self.assertEqual(self._make_calls, 0) lines = terminal.get_print_test_lines() @@ -774,7 +774,7 @@ Some images are invalid''' tools.write_file(env_fname, env_content.encode('utf-8')) self._make_calls = 0 - self._RunControl('-b', TEST_BRANCH, '-sU', '-o', self._output_dir, + self._run_control('-b', TEST_BRANCH, '-sU', '-o', self._output_dir, clean_dir=False) self.assertEqual(self._make_calls, 0) lines = terminal.get_print_test_lines() @@ -783,10 +783,10 @@ Some images are invalid''' self.assertIn('bootdelay', text) self.assertIn('(no errors to report)', lines[-1].text) - def testWarningsAsErrors(self): + def test_warnings_as_errors(self): """Test the -E flag adds -Werror to make arguments""" self._captured_make_args = [] - self._RunControl('-o', self._output_dir, '-E') + self._run_control('-o', self._output_dir, '-E') # Check that at least one build had -Werror flags found_werror = False @@ -798,50 +798,50 @@ Some images are invalid''' break self.assertTrue(found_werror, 'KCFLAGS=-Werror not found in make args') - def testCount(self): + def test_count(self): """Test building a specific number of commitst""" - self._RunControl('-b', TEST_BRANCH, '-c2', '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-c2', '-o', self._output_dir) self.assertEqual(self._builder.count, 2 * len(BOARDS)) self.assertEqual(self._builder.fail, 0) # Each board has a config, and then one make per commit self.assertEqual(self._make_calls, len(BOARDS) * (1 + 2)) - def testIncremental(self): + def test_incremental(self): """Test building a branch twice - the second time should do nothing""" - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) # Each board has a mrproper, config, and then one make per commit self.assertEqual(self._make_calls, len(BOARDS) * (self._commits + 1)) self._make_calls = 0 - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir, clean_dir=False) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, clean_dir=False) self.assertEqual(self._make_calls, 0) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._builder.fail, 0) - def testForceBuild(self): + def test_force_build(self): """The -f flag should force a rebuild""" - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) self._make_calls = 0 - self._RunControl('-b', TEST_BRANCH, '-f', '-o', self._output_dir, clean_dir=False) + self._run_control('-b', TEST_BRANCH, '-f', '-o', self._output_dir, clean_dir=False) # Each board has a config and one make per commit self.assertEqual(self._make_calls, len(BOARDS) * (self._commits + 1)) - def testForceReconfigure(self): + def test_force_reconfigure(self): """The -f flag should force a rebuild""" - self._RunControl('-b', TEST_BRANCH, '-C', '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-C', '-o', self._output_dir) # Each commit has a config and make self.assertEqual(self._make_calls, len(BOARDS) * self._commits * 2) - def testMrproper(self): + def test_mrproper(self): """The -f flag should force a rebuild""" - self._RunControl('-b', TEST_BRANCH, '-m', '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-m', '-o', self._output_dir) # Each board has a mkproper, config and then one make per commit self.assertEqual(self._make_calls, len(BOARDS) * (self._commits + 2)) - def testErrors(self): + def test_errors(self): """Test handling of build errors""" self._error['board2', 1] = 'fred\n' - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._builder.fail, 1) @@ -849,49 +849,49 @@ Some images are invalid''' # not be rebuilt del self._error['board2', 1] self._make_calls = 0 - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir, clean_dir=False) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, clean_dir=False) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._make_calls, 0) self.assertEqual(self._builder.fail, 1) # Now use the -F flag to force rebuild of the bad commit - self._RunControl('-b', TEST_BRANCH, '-o', self._output_dir, '-F', clean_dir=False) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, '-F', clean_dir=False) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._builder.fail, 0) self.assertEqual(self._make_calls, 2) - def testBranchWithSlash(self): + def test_branch_with_slash(self): """Test building a branch with a '/' in the name""" self._test_branch = '/__dev/__testbranch' - self._RunControl('-b', self._test_branch, '-o', self._output_dir, + self._run_control('-b', self._test_branch, '-o', self._output_dir, clean_dir=False) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._builder.fail, 0) - def testEnvironment(self): + def test_environment(self): """Test that the done and environment files are written to out-env""" - self._RunControl('-o', self._output_dir) + self._run_control('-o', self._output_dir) board0_dir = os.path.join(self._output_dir, 'current', 'board0') self.assertTrue(os.path.exists(os.path.join(board0_dir, 'done'))) self.assertTrue(os.path.exists(os.path.join(board0_dir, 'out-env'))) - def testEnvironmentUnicode(self): + def test_environment_unicode(self): """Test there are no unicode errors when the env has non-ASCII chars""" try: varname = b'buildman_test_var' os.environb[varname] = b'strange\x80chars' - self.assertEqual(0, self._RunControl('-o', self._output_dir)) + self.assertEqual(0, self._run_control('-o', self._output_dir)) board0_dir = os.path.join(self._output_dir, 'current', 'board0') self.assertTrue(os.path.exists(os.path.join(board0_dir, 'done'))) self.assertTrue(os.path.exists(os.path.join(board0_dir, 'out-env'))) finally: del os.environb[varname] - def testWorkInOutput(self): + def test_work_in_output(self): """Test the -w option which should write directly to the output dir""" board_list = boards.Boards() board_list.add_board(board.Board(*BOARDS[0])) - self._RunControl('-o', self._output_dir, '-w', clean_dir=False, + self._run_control('-o', self._output_dir, '-w', clean_dir=False, brds=board_list) self.assertTrue( os.path.exists(os.path.join(self._output_dir, 'u-boot'))) @@ -900,10 +900,10 @@ Some images are invalid''' self.assertTrue( os.path.exists(os.path.join(self._output_dir, 'out-env'))) - def testWorkInOutputFail(self): + def test_work_in_output_fail(self): """Test the -w option failures""" with self.assertRaises(SystemExit) as e: - self._RunControl('-o', self._output_dir, '-w', clean_dir=False) + self._run_control('-o', self._output_dir, '-w', clean_dir=False) self.assertIn("single board", str(e.exception)) self.assertFalse( os.path.exists(os.path.join(self._output_dir, 'u-boot'))) @@ -911,26 +911,26 @@ Some images are invalid''' board_list = boards.Boards() board_list.add_board(board.Board(*BOARDS[0])) with self.assertRaises(SystemExit) as e: - self._RunControl('-b', self._test_branch, '-o', self._output_dir, + self._run_control('-b', self._test_branch, '-o', self._output_dir, '-w', clean_dir=False, brds=board_list) self.assertIn("single commit", str(e.exception)) board_list = boards.Boards() board_list.add_board(board.Board(*BOARDS[0])) with self.assertRaises(SystemExit) as e: - self._RunControl('-w', clean_dir=False) + self._run_control('-w', clean_dir=False) self.assertIn("specify -o", str(e.exception)) - def testThreadExceptions(self): + def test_thread_exceptions(self): """Test that exceptions in threads are reported""" with terminal.capture() as (stdout, stderr): - self.assertEqual(102, self._RunControl('-o', self._output_dir, + self.assertEqual(102, self._run_control('-o', self._output_dir, test_thread_exceptions=True)) self.assertIn( 'Thread exception (use -T0 to run without threads): test exception', stdout.getvalue()) - def testBlobs(self): + def test_blobs(self): """Test handling of missing blobs""" self._missing = True @@ -939,17 +939,17 @@ Some images are invalid''' logfile = os.path.join(board0_dir, 'log') # We expect failure when there are missing blobs - result = self._RunControl('board0', '-o', self._output_dir) + result = self._run_control('board0', '-o', self._output_dir) self.assertEqual(100, result) self.assertTrue(os.path.exists(os.path.join(board0_dir, 'done'))) self.assertTrue(os.path.exists(errfile)) self.assertIn(b"Filename 'fsp.bin' not found in input path", tools.read_file(errfile)) - def testBlobsAllowMissing(self): + def test_blobs_allow_missing(self): """Allow missing blobs - still failure but a different exit code""" self._missing = True - result = self._RunControl('board0', '-o', self._output_dir, '-M', + result = self._run_control('board0', '-o', self._output_dir, '-M', clean_dir=True) self.assertEqual(101, result) board0_dir = os.path.join(self._output_dir, 'current', 'board0') @@ -957,16 +957,16 @@ Some images are invalid''' self.assertTrue(os.path.exists(errfile)) self.assertIn(b'Some images are invalid', tools.read_file(errfile)) - def testBlobsWarning(self): + def test_blobs_warning(self): """Allow missing blobs and ignore warnings""" self._missing = True - result = self._RunControl('board0', '-o', self._output_dir, '-MW') + result = self._run_control('board0', '-o', self._output_dir, '-MW') self.assertEqual(0, result) board0_dir = os.path.join(self._output_dir, 'current', 'board0') errfile = os.path.join(board0_dir, 'err') self.assertIn(b'Some images are invalid', tools.read_file(errfile)) - def testBlobSettings(self): + def test_blob_settings(self): """Test with no settings""" self.assertEqual(False, control.get_allow_missing(False, False, 1, False)) @@ -975,7 +975,7 @@ Some images are invalid''' self.assertEqual(False, control.get_allow_missing(True, True, 1, False)) - def testBlobSettingsAlways(self): + def test_blob_settings_always(self): """Test the 'always' policy""" bsettings.set_item('global', 'allow-missing', 'always') self.assertEqual(True, @@ -983,7 +983,7 @@ Some images are invalid''' self.assertEqual(False, control.get_allow_missing(False, True, 1, False)) - def testBlobSettingsBranch(self): + def test_blob_settings_branch(self): """Test the 'branch' policy""" bsettings.set_item('global', 'allow-missing', 'branch') self.assertEqual(False, @@ -993,7 +993,7 @@ Some images are invalid''' self.assertEqual(False, control.get_allow_missing(False, True, 1, True)) - def testBlobSettingsMultiple(self): + def test_blob_settings_multiple(self): """Test the 'multiple' policy""" bsettings.set_item('global', 'allow-missing', 'multiple') self.assertEqual(False, @@ -1003,7 +1003,7 @@ Some images are invalid''' self.assertEqual(False, control.get_allow_missing(False, True, 2, False)) - def testBlobSettingsBranchMultiple(self): + def test_blob_settings_branch_multiple(self): """Test the 'branch multiple' policy""" bsettings.set_item('global', 'allow-missing', 'branch multiple') self.assertEqual(False, @@ -1026,7 +1026,7 @@ Some images are invalid''' Returns: list of str: Lines returned in the out-cmd file """ - self._RunControl('-o', self._output_dir, *extra_args) + self._run_control('-o', self._output_dir, *extra_args) board0_dir = os.path.join(self._output_dir, 'current', 'board0') self.assertTrue(os.path.exists(os.path.join(board0_dir, 'done'))) cmd_fname = os.path.join(board0_dir, 'out-cmd') @@ -1039,19 +1039,19 @@ Some images are invalid''' return data.splitlines(), cfg_data - def testCmdFile(self): + def test_cmd_file(self): """Test that the -cmd-out file is produced""" lines = self.check_command()[0] self.assertEqual(2, len(lines)) self.assertRegex(lines[0], b'make O=/.*board0_defconfig') self.assertRegex(lines[0], b'make O=/.*-s.*') - def testNoLto(self): + def test_no_lto(self): """Test that the --no-lto flag works""" lines = self.check_command('-L')[0] self.assertIn(b'NO_LTO=1', lines[0]) - def testFragments(self): + def test_fragments(self): """Test passing of configuration fragments to the make command""" # Single fragment passed as argument extra_args = ['board0', '--fragments', 'f1.config'] @@ -1066,7 +1066,7 @@ Some images are invalid''' r'make O=/.*board0_defconfig\s+f1\.config\s+f2\.config', 'Test multiple fragments') - def testReproducible(self): + def test_reproducible(self): """Test that the -r flag works""" lines, cfg_data = self.check_command('-r') self.assertIn(b'SOURCE_DATE_EPOCH=0', lines[0]) @@ -1295,64 +1295,64 @@ endif self.assertEqual(2, len(params_list)) self.assertFalse(warnings) - def testRegenBoards(self): + def test_regen_boards(self): """Test that we can regenerate the boards.cfg file""" outfile = os.path.join(self._output_dir, 'test-boards.cfg') if os.path.exists(outfile): os.remove(outfile) with terminal.capture() as (stdout, stderr): - result = self._RunControl('-R', outfile, brds=None, + result = self._run_control('-R', outfile, brds=None, get_builder=False) self.assertTrue(os.path.exists(outfile)) def test_print_prefix(self): """Test that we can print the toolchain prefix""" with terminal.capture() as (stdout, stderr): - result = self._RunControl('-A', 'board0') + result = self._run_control('-A', 'board0') self.assertEqual('arm-\n', stdout.getvalue()) self.assertEqual('', stderr.getvalue()) def test_exclude_one(self): """Test excluding a single board from an arch""" - self._RunControl('arm', '-x', 'board1', '-o', self._output_dir) + self._run_control('arm', '-x', 'board1', '-o', self._output_dir) self.assertEqual(['board0'], [b.target for b in self._boards.get_selected()]) def test_exclude_arch(self): """Test excluding an arch""" - self._RunControl('-x', 'arm', '-o', self._output_dir) + self._run_control('-x', 'arm', '-o', self._output_dir) self.assertEqual(['board2', 'board4'], [b.target for b in self._boards.get_selected()]) def test_exclude_comma(self): """Test excluding a comma-separated list of things""" - self._RunControl('-x', 'arm,powerpc', '-o', self._output_dir) + self._run_control('-x', 'arm,powerpc', '-o', self._output_dir) self.assertEqual(['board4'], [b.target for b in self._boards.get_selected()]) def test_exclude_list(self): """Test excluding a list of things""" - self._RunControl('-x', 'board2', '-x' 'board4', '-o', self._output_dir) + self._run_control('-x', 'board2', '-x' 'board4', '-o', self._output_dir) self.assertEqual(['board0', 'board1'], [b.target for b in self._boards.get_selected()]) def test_single_boards(self): """Test building single boards""" - self._RunControl('--boards', 'board1', '-o', self._output_dir) + self._run_control('--boards', 'board1', '-o', self._output_dir) self.assertEqual(1, self._builder.count) - self._RunControl('--boards', 'board1', '--boards', 'board2', + self._run_control('--boards', 'board1', '--boards', 'board2', '-o', self._output_dir) self.assertEqual(2, self._builder.count) - self._RunControl('--boards', 'board1,board2', '--boards', 'board4', + self._run_control('--boards', 'board1,board2', '--boards', 'board4', '-o', self._output_dir) self.assertEqual(3, self._builder.count) def test_print_arch(self): """Test that we can print the board architecture""" with terminal.capture() as (stdout, stderr): - result = self._RunControl('--print-arch', 'board0') + result = self._run_control('--print-arch', 'board0') self.assertEqual('arm\n', stdout.getvalue()) self.assertEqual('', stderr.getvalue()) @@ -1407,7 +1407,7 @@ CONFIG_SOC="fred" 'target': 'board0'}, ['WARNING: board0_defconfig: No TARGET_BOARD0 enabled']), res) - # check handling of #include files; see _HandleCommandCpp() + # check handling of #include files; see _handle_command_cpp() inc = os.path.join(src, 'common') tools.write_file(inc, b'CONFIG_TARGET_BOARD0=y\n') tools.write_file(norm, f'#include <{inc}>', False) @@ -1421,7 +1421,7 @@ CONFIG_SOC="fred" 'config': 'config0', 'target': 'board0'}, []), res) - def testTarget(self): + def test_target(self): """Test that the --target flag works""" lines = self.check_command('--target', 'u-boot.dtb')[0] @@ -1450,7 +1450,7 @@ targets: fname = os.path.join(self._base_dir, 'try.buildman') tools.write_file(fname, data.encode('utf-8')) result = boards.ExtendedParser.parse_file(fname) - self.maxDiff = None + self.maxDiff = None # pylint: disable=C0103 self.assertEqual([ Extended(name='acpi_boards', desc='Build RISC-V QEMU builds with ACPI', @@ -1539,7 +1539,7 @@ something: me # between boards when a thread processes multiple boards sequentially. with mock.patch.object(builderthread, 'kconfig_changed_since', mock_kconfig_changed): - self._RunControl('-b', TEST_BRANCH, '-c2', '-o', self._output_dir, + self._run_control('-b', TEST_BRANCH, '-c2', '-o', self._output_dir, '-P') # Verify kconfig_changed_since was called @@ -1561,7 +1561,7 @@ something: me # Run buildman with kconfig checking disabled (-Z) with mock.patch.object(builderthread, 'kconfig_changed_since', mock_kconfig_changed): - self._RunControl('-b', TEST_BRANCH, '-c2', '-o', self._output_dir, + self._run_control('-b', TEST_BRANCH, '-c2', '-o', self._output_dir, '-Z') # Verify kconfig_changed_since was NOT called (feature disabled) From patchwork Sat Jan 10 23:56: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: 1475 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=1768089437; bh=Bec8o69Ki1ldRYAdm7HdVkdDl79yqATgOotKcgXa6Yo=; 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=YRppc6ZR6frpf1RZ7gMXYUgfD/yfYOLaruYwIFoiCSa47waxvXaLKDphSjiR9YhTr uERlEJVYF6lB+YgRmsX14nX8VwwdHmZ48leoMrRCnPWyE1dLPHy8b75KqyUh0DqgC3 s8JxxvhncSTe6X74/WibcfMvBNlHAWg4ZhDlKIq/urIJPXnaORX40gWi4OAvE+SuMi FSfzPrJievXbFJJxDn6SU6dj3KTyPHCP+M/J3cyu5L+oPpHj5dc+E2rULVDVpeth/i HchKdUtrRpdWmItTXLFOhVnFhQi2G0QiAcYlPUMw238KK6nEE+Y3Uc4ElEZE+h8iKj r7gnlScHD7RQQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3699069186 for ; Sat, 10 Jan 2026 16:57: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 mtn8kU3elwRc for ; Sat, 10 Jan 2026 16:57:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089437; bh=Bec8o69Ki1ldRYAdm7HdVkdDl79yqATgOotKcgXa6Yo=; 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=YRppc6ZR6frpf1RZ7gMXYUgfD/yfYOLaruYwIFoiCSa47waxvXaLKDphSjiR9YhTr uERlEJVYF6lB+YgRmsX14nX8VwwdHmZ48leoMrRCnPWyE1dLPHy8b75KqyUh0DqgC3 s8JxxvhncSTe6X74/WibcfMvBNlHAWg4ZhDlKIq/urIJPXnaORX40gWi4OAvE+SuMi FSfzPrJievXbFJJxDn6SU6dj3KTyPHCP+M/J3cyu5L+oPpHj5dc+E2rULVDVpeth/i HchKdUtrRpdWmItTXLFOhVnFhQi2G0QiAcYlPUMw238KK6nEE+Y3Uc4ElEZE+h8iKj r7gnlScHD7RQQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 25CDD692B0 for ; Sat, 10 Jan 2026 16:57:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089435; bh=HQeeqnU73io28mrHjeGJM0nWmSjRC/veNSaqXQMS7vU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GJjY39xbL4vIsk2O9EcVe3UubGF6/mFlL1wH+L0fYi1bvrASqj0nRhmptbkpRZjUV 7XGKKu26I4fDyKcFFh62ahd9RJpGxFpbhDRSBun64a0P8975Gk4xCb+NgqMrNqksnv VA+3N073PCB1E6JOCZbqvY1kG8BvEw9YhTNH6fHGtGYpqAJvSXTGHMClGtGlNBuqoz au76MPD2WXo20WS5wi4pre02/LXaiZ8MbbB3zofsU/GYtDmGx2Ff15L/A6USzSHl9o tfV1yrbYadUQJHeL1qTclBAk+n4EwfQoO4Zv3UbnbtADou9+BtSei+LRZhamY4dF8w N6cZrGc+vp6LA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3521B692B5; Sat, 10 Jan 2026 16:57:15 -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 mdwLeKG3fwYq; Sat, 10 Jan 2026 16:57:15 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089430; bh=ry1QA8XtoaAyy9vdSbkSr9FR4lkVrqrcEw2VoKlxAiw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vm1g278nL/J5IQgpwE446H1McUbUjW7dWseIVQVFI30OkJROM1luoz+thloDKbHbK YsUssO6cJYwB0X8nci3cWBi08IwGUihQ0khsdhWcBXVFBkbzvIi9IAQ0vqcB2QYJhA SSv4zfgU0UnANQfqm4wvvxle3SKHvOcGiVPytagBhE959IwXS/S62QKVNxAKRb38W8 PjB7KGq2EFK8W252Igt3+BWeKGr7URS8ufKfREZ9N9B0ng2GcDktlWfn/qzcF5XUM/ KAGHMB4EMo/5Evo+PFZmoBkqFQ55NeZss8a/6uWFyvzXpICt5c0Oc4rvQFRW26bBV5 gGZaNRXws1JLQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 40A9B69186; Sat, 10 Jan 2026 16:57:10 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:16 -0700 Message-ID: <20260110235633.1064859-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: UDOHYEFDMCOB5CBTLTHTLBT5NTF4VZPH X-Message-ID-Hash: UDOHYEFDMCOB5CBTLTHTLBT5NTF4VZPH 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 03/14] buildman: Remove unnecessary semicolons in func_test 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 trailing semicolons after function calls which are not needed in Python. This fixes pylint W0301 warnings. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index f917e66510b..45a65c7a014 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -552,7 +552,7 @@ Some images are invalid''' def test_current_source(self): """Very simple test to invoke buildman on the current source""" - self.setup_toolchains(); + self.setup_toolchains() self._run_control('-o', self._output_dir) lines = terminal.get_print_test_lines() self.assertIn('Building current source for %d boards' % len(BOARDS), @@ -565,7 +565,7 @@ Some images are invalid''' def test_bad_toolchain(self): """Test that missing toolchains are detected""" - self.setup_toolchains(); + self.setup_toolchains() ret_code = self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) lines = terminal.get_print_test_lines() From patchwork Sat Jan 10 23:56: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: 1476 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=1768089442; bh=P12MvMM7HRrirevdF1j5yYSY4foQHkuZt/Ok1vJxGmk=; 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=DOwxm+E0JSEQB3sfgCuFeRAfbQ4WemJGY2i5lMouvyIDG/kbEExZ8R2ZLJZPxOAs0 te/Gbf+wQkYTS+1fbshqy3QF9Vt/Leoyi4lf8urAIOeSxU4RDKD0zcoLiqmnhCJubO Mwiv5MPvXR8MIWEPfE0hrdTJ8D6wEfeqHrbSWqQujBVfspgSGueutMLwQThyeOz8ph R82P3LK7WODNCxsPSYvtc+IIbN/wWsNbxqgykMxj+F4W3e5cccSrSx+kZLtNPbSflA N9/j8H1pLCO0rJcuqOFC8dL+/lGTYZyeDBbECtMvksgWSSp+Tkp8UKP+ogzAOx3N8t on9wQvNCx1jZg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0F83B692B7 for ; Sat, 10 Jan 2026 16:57: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 Wb8eKEHEW7nb for ; Sat, 10 Jan 2026 16:57:21 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089441; bh=P12MvMM7HRrirevdF1j5yYSY4foQHkuZt/Ok1vJxGmk=; 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=WXhYhCm0oK4k3+CYxGH9JJZTRygti0zrf4u3jjj0Jg91w+7awYtjMzjQHY3dydD0g kftaT7IGdpjyzPI45YAWUqUFP8xj6JHN5Iy8sfVv6jWZuIGroy1c6qCLL32WQF7VXx yVGOlH3zpCSfJOWmelN0ox2vJZfTGoHuvVqRt5XkxlDvU9MMy5Hfhk9Sf6EpDcobLN msOtJ+smiCFg4w3Q891Ll/yvUEhjdj2rEsyRc33/lpyMmSgRbaG3NXLUnothYLGH/2 WfDZCadB1O0QAdSkgE6ILLv98nzO29bkNYTTMI9S26CAkJF09ktHmXwjmVTGDcmyZB MgLyc0exz+iTA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EEF09692B0 for ; Sat, 10 Jan 2026 16:57:21 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089439; bh=GtUsvuDFUpHKJKGCRQ8dz01EinMrfN+LtzE2Iu5ghKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZYoDlNwvBSzbFzPQ91Eid9buls0iO6zd/C1gF+JbPHKaLOl7aR96uZ3Y8iHOr8M80 hetHhBJIxf1c9TrPP1IJ57ykqTAfKbGh3NuFUmOp+KCXuEQwQUbIUfDDiwUWT7wJrt Fn/8Ok06r3ScdFvWIeAn9yHYuE9B/C/WE64TRqMU8DrZlS65nUha5AiK9UQ/n8QCuC ijriStyaQ62OeJ4OkDFzfzMTlKOm5+y5kY6Y5erraA25CCOShLRXMtFpXny882G+ba Q6Bk67gJhiKx2k5BFAMT+hQZo7I/CkBfA8rVOSD/87lasxxd/f4rPPJYN62/eKEvCs zTZuMiRcDRH3Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 85E43692B7; Sat, 10 Jan 2026 16:57: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 10026) with ESMTP id K2l42IwobCrB; Sat, 10 Jan 2026 16:57:19 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089435; bh=GBJrpWpUPMgUz1caqKM+3ALi4XKJUvBkIkXpRatCTYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYpfKkO/MyelnDvLEWGhd+AbR4k7paOoM9k8WwgkAJX/n19mIAEjD6eg0RziXE13M 5ylc65F+pWfpRbxiDskDpywUCfIsXAL/TossZlBS7vSsLbESkt37/zoDv4YE1gf2Gd Yjcz92TuQZm7OCXyKdhYapRbtoH4QJlqaC9zE3RUFGT00iNiP5AWw1rDVXfyaEHwCx LQDNwz+E06gctjxcF26UdkpoO3keyZXPwDXiRFX792PAQOMr4sIaD+ctnz/2qXk8kQ zkcjgfQBfyIYiDHxSbnKX1o+EexGOYMGOogYIpmEX2eiHTiylXeG1otQwHuG+oBT7m dTAJLZFL26mDg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id C7882692AE; Sat, 10 Jan 2026 16:57:14 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:17 -0700 Message-ID: <20260110235633.1064859-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: WCC4I53L7UAKYEVMFDD3DYNXZD3FESSW X-Message-ID-Hash: WCC4I53L7UAKYEVMFDD3DYNXZD3FESSW 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 04/14] buildman: Use identity comparison for False in func_test 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 False' instead of '== False' for singleton comparison. This fixes pylint C0121 warning. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 45a65c7a014..b72922ab838 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -258,7 +258,7 @@ class TestFunctional(unittest.TestCase): """ sys.argv = [sys.argv[0]] + list(args) args = cmdline.parse_args() - if brds == False: + if brds is False: brds = self._boards result = control.do_buildman( args, toolchains=self._toolchains, make_func=self._handle_make, From patchwork Sat Jan 10 23:56: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: 1477 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=1768089446; bh=fW/1iyBJBZ9K10LrhIU+A8j0mG3ySIiQp0dMs/gWxPs=; 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=C8JE0FWd3wVLo4J/lPrll/HXfa8Ogd0HGA5Rm3iCCoAHnkYy3y9NxC6ZUwcrKD3qx zT/Ke6J6TZ1AlnpRM3fZ9CDz5ADnvEw9qYjHBly2VO1OqXXtkY4yzMYZq7QSNzdvbr mFNnkYm7QAWs0EIWdbH1Rr2rvh1Vxk3birRw6vbnXovmF+cSUaDdJnO4RshP8bWWpy NNFh8T2j6Y39JUGyS2yVuRlKPLo+R/mwj4IHqBeURfLQq1nmXC5LjY9piVBB/k6g15 /bVAwbAhit4Jb8VVDlhGds2GTRPBwCAQe40jCRvEPZnTiFMgrRwYfAwzlBzqpP0R8M hUaABJ9Coi+fQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8D72C692B9 for ; Sat, 10 Jan 2026 16:57: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 5eDHcND4aXfc for ; Sat, 10 Jan 2026 16:57:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089446; bh=fW/1iyBJBZ9K10LrhIU+A8j0mG3ySIiQp0dMs/gWxPs=; 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=C8JE0FWd3wVLo4J/lPrll/HXfa8Ogd0HGA5Rm3iCCoAHnkYy3y9NxC6ZUwcrKD3qx zT/Ke6J6TZ1AlnpRM3fZ9CDz5ADnvEw9qYjHBly2VO1OqXXtkY4yzMYZq7QSNzdvbr mFNnkYm7QAWs0EIWdbH1Rr2rvh1Vxk3birRw6vbnXovmF+cSUaDdJnO4RshP8bWWpy NNFh8T2j6Y39JUGyS2yVuRlKPLo+R/mwj4IHqBeURfLQq1nmXC5LjY9piVBB/k6g15 /bVAwbAhit4Jb8VVDlhGds2GTRPBwCAQe40jCRvEPZnTiFMgrRwYfAwzlBzqpP0R8M hUaABJ9Coi+fQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7A89A692B0 for ; Sat, 10 Jan 2026 16:57:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089444; bh=mleFgxlyRck0ldQnD/LS7vHMQfURqpxPGVQQKkkK9YE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oka7bsnVpUbeRi2vOZVXcn1hLfU1qZRT2MTkAWiZKei4KVINRjNXgNsWIAUCjdy+N xsj6rQdlyN5RiGfWg38PKkzVA2YxPRrYITWF/G/C0CosGENSoMxfI3YxV2RYeJW8Zb DTVAtbdYVk/n2yszix4CYPCzMzQ5BbmQ2duOYSDEyk6AIy73AFVpgoXoYfYvyfIS/u VYCjuM7VZo6mVlN4EedfmzpeJoq9rjyaPF6fBLam2AGRR9S2DsRYv6iwKIPyf7ozWp 6JjWsS02coG8qF9jdo4DDq8vk5nugCz0+Lk3Y3RYwYU1ccGEM733xX67/zbUrs4IQe IjxRWfIYobOSw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8CE5B692B0; Sat, 10 Jan 2026 16:57: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 10026) with ESMTP id dhIE7-0lehJ5; Sat, 10 Jan 2026 16:57:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089439; bh=r+lKeXa8VF5NcQnEpRSIp75S3v2QqG/nc8NsytingvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pxc6bOac2WtrF7eOBsPIGnepgAAomSd5gZgoeBgJrRkMbN+ZzWnfBmn3tWkVok9D3 AT6HljkBdqC/0DTea6CGFduJ1w0FUk+/iY8y9rBWstE5lflv78iIz9vWkYHYrbuzfp xmnSsphIPSuu6oSDoVO670XUPN9W7zPQD+EIkb7dtqycWOqTccQgjPgMQFhbaDk4cs Du0XkBK45hXNgGprC8/etbAVHlbTT9CUMIfkSFWM5vHUO7FCXRKSaXmZbtya8H9DKX X1ExLaA6IL7SGve0tqp9OFGBSPVlXADXEOXC3E1e3SUy/A7jY62mWBYEFykgNNvhwr txw/FHMnLhzhg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6EAF069186; Sat, 10 Jan 2026 16:57:19 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:18 -0700 Message-ID: <20260110235633.1064859-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: N32SIMOHN3RMD2AU6ZPUFJCV64PISZFA X-Message-ID-Hash: N32SIMOHN3RMD2AU6ZPUFJCV64PISZFA 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 05/14] buildman: Remove unused import in func_test 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 the unused test_util import. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index b72922ab838..eb496c327ed 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -24,7 +24,6 @@ from buildman import toolchain from u_boot_pylib import command from u_boot_pylib import gitutil from u_boot_pylib import terminal -from u_boot_pylib import test_util from u_boot_pylib import tools SETTINGS_DATA = ''' From patchwork Sat Jan 10 23:56: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: 1478 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=1768089451; bh=HRAV3rmMVtMOBsZ+UR5fBnFyrmjLTbreipNKi0TTAWA=; 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=EvlUfsQ9YtTv6O6fKvP5sAf2nLMCvmhhWmIJtPd5sFJqbLwGJdmXKDrlxKdZ9LusU +pEwHRI9hhJo+11/YalqqvptbJDydjlZnXmHSGi0iWxa83Nx3P5pT3Zdj31IaldzJY MnvN+PRl69smxwVUhLogDc1QucdRyNy1GjLV0q+Pq6De/mu6az2R9Tuo4iv6j1sEec Y2iLWTIEMU3HB6kK55MlHw+k/jeqqELwkTveFGRMk0CQ8Hacx6IgNdEYdhBHvrnTP1 n20OTQRWYO+HNUsFgcLZdZEN1AGcu59PdqCT2rUPmyO2MEs/ETf2DS3N+80yNy43kY wmOfN+SfItrtQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0C0E9692B9 for ; Sat, 10 Jan 2026 16:57: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 uI5FLEr7GHfj for ; Sat, 10 Jan 2026 16:57:30 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089450; bh=HRAV3rmMVtMOBsZ+UR5fBnFyrmjLTbreipNKi0TTAWA=; 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=UANwTbOqDDRmYbFPS+7rFAE18kskhfKIBLRdr7gBIgqhRN04gz49w4BCsl0by5d/A V7giBy9m3Z9ofSeSXRfJENyDHPX+190p5PNMjbeAwTBWAdV+3glohlfGvuXLiEYBFs /0ucU8y4egFs1rnCKfa2H7rX0atJn8YeZ4dhAbePRlm35V5YMUVSg6a+J7Wht5DAAn oA648njNJhvdmEIizIYIy+4B3OnBbgZCd3QWP4M12OOfDN/W2XEqY36A4kNjU+wElJ Q4nsW2U/lqS5AtzFE5w7vgnEA5poZ+ZZtxCa3QzaTrPxJqfC8sZH/Jvy6qWRdxGG30 fn9OCtMm9KGBQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EDD54692B0 for ; Sat, 10 Jan 2026 16:57:30 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089449; bh=X+SXcAd4SfkQ8Hzb3lot+jWIRhR7KYlvGP+TwCM8SEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kcjpl+WBjalRKTFpGhLcEXzflS12JnOaDVJR6fGjkm1DKV4SUXHjhUpS8JOhjrqNL 7KTO1DNz+7xmZEnzaDIxfSbOzp0IAdIKlIk2t4ZKlsEnNo7SNXBRCazlKfrjJgK9mJ 5uMCa8KIHswFoByRUT7iDJUr1fc9Z1CVnSkOT12hVavSGEsLtxytm5v+QkVdq4UhdL HLnH8O54i+uDStgJJc08vcf0MXFqiWdMTOJlWRw+JLydqCj7BGcAvENdvzV/smVvO2 4JOoFq+Es0iv8y1m5nKkCNLsqts7Whi0qxEiF/1Vft2D4M9rWPrp10JZmB/YeSNggR SWViZKVL59bFg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2C2E4692AE; Sat, 10 Jan 2026 16:57: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 z88ZKqHBGDeb; Sat, 10 Jan 2026 16:57:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089445; bh=VReYo36D8ZnfxVU08Xudkf42227FR4ty//4thPvbxk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DTQ/B3lq1exeOvEUZIHh1QN9+c8Exx+EWErARklXkeVShNWeuLtJFcW5Y9IYR8aIY edS4uPuP6lF37n6GSfCUC+7fUh767UPmvgHFcGONcI/e3BQKJCE/micLzKZYjMujIQ 4wQLw+3npiMFEGQZiPfwutMjXbxx8CAVwMBbrIab/RB4N2ZPmeSjU14lFC2cMOaO+/ hcmfKtt3NLHwoSzrQIthuZoGl/jqtxQjy9SoKVkQC2+WT12oYS82i2L4TRaDbvtdNS Le+tUpVSePxIl+ChjcWvcQ8DuDa4Tb6HbxD4oxkYhOsbDEYOs0y86JcRpP1vuzAk4Q mIAr6C6NwgSTg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D282769186; Sat, 10 Jan 2026 16:57:24 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:19 -0700 Message-ID: <20260110235633.1064859-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 27LEP2ENIENONIUSSN5SYHFZKJGZMN66 X-Message-ID-Hash: 27LEP2ENIENONIUSSN5SYHFZKJGZMN66 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/14] buildman: Fix indentation in func_test 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 inconsistent indentation in test_bad_toolchain() where 2 spaces are used instead of 4 spaces. This fixes pylint W0311 warning. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index eb496c327ed..f677282c11c 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -581,13 +581,13 @@ Some images are invalid''' for commit in range(self._commits): for brd in self._boards.get_list(): if brd.arch != 'sandbox': - errfile = self._builder.get_err_file(commit, brd.target) - fd = open(errfile) - self.assertEqual( - fd.readlines(), - [f'Tool chain error for {brd.arch}: ' - f"No tool chain found for arch '{brd.arch}'"]) - fd.close() + errfile = self._builder.get_err_file(commit, brd.target) + fd = open(errfile) + self.assertEqual( + fd.readlines(), + [f'Tool chain error for {brd.arch}: ' + f"No tool chain found for arch '{brd.arch}'"]) + fd.close() def test_toolchain_errors(self): """Test that toolchain errors are reported in the summary From patchwork Sat Jan 10 23:56: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: 1479 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=1768089455; bh=99G5H26LzE3hMggsNDPQ1O24+IibbY60jsGJQBJDUmY=; 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=lQlD4YyXIJHT5BsHN0n7vxJ9PEwJHaUnkb8KxRCk7pet/MPYWhbsFDQptic9aP52e gqSzkHPCCv8Jvcc413UO7gPaa2yApRGLAsRXeVeoPzuXN53moD8gbAN/DpXLpp7jtN uS1hgW3DJF7ZcFIDZTDdFMmj6klwZlDEx4PNZt7NCrkpT3DtPXyCwyC87bwwE0f4Tr AqD8f1wd6JT6F3TvCQzAD0Dt8lW5xhgHq88Alkk74UEfVDl0S+RhpaeqkT4cBJRSFO Ac8fsjd/kgfaA5PU/vmsBw9HMCo+GwcXE/WZWouFMB7xM0y3aFl20QNb1KSS+LuzEH Bal4oU2twII2g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DA047692AE for ; Sat, 10 Jan 2026 16:57: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 mgEa3VI_29WQ for ; Sat, 10 Jan 2026 16:57:35 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089455; bh=99G5H26LzE3hMggsNDPQ1O24+IibbY60jsGJQBJDUmY=; 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=lQlD4YyXIJHT5BsHN0n7vxJ9PEwJHaUnkb8KxRCk7pet/MPYWhbsFDQptic9aP52e gqSzkHPCCv8Jvcc413UO7gPaa2yApRGLAsRXeVeoPzuXN53moD8gbAN/DpXLpp7jtN uS1hgW3DJF7ZcFIDZTDdFMmj6klwZlDEx4PNZt7NCrkpT3DtPXyCwyC87bwwE0f4Tr AqD8f1wd6JT6F3TvCQzAD0Dt8lW5xhgHq88Alkk74UEfVDl0S+RhpaeqkT4cBJRSFO Ac8fsjd/kgfaA5PU/vmsBw9HMCo+GwcXE/WZWouFMB7xM0y3aFl20QNb1KSS+LuzEH Bal4oU2twII2g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C6CF8692B0 for ; Sat, 10 Jan 2026 16:57:35 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089453; bh=dpHFFfrxj3IaSQ9sSfuGMV3OWp7XSnxbf+7zKqPEZac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E/UNOlrUZt+2rfKQbM8lVBojpiQnWnoT6NWY23kU29/IrGvgI2eLKOSUnL9G+FhEb tdTVpz/iVDEWGTkkD+XTYLJvuwluxNKHMPZQPA//v9BRCHbaQ5t4d7ZvlQEJ8sYfty TblGdq8XR/K0TT+5hHGdgGdYWuzrI1nnV0nJobU+4MVxWEjPe336VdEeVYdLFR7orF X6di1Hlmxy0lAHH3Y91QPTCEX6WqNmuwfUg+XYWJOgk/FRhicj0LsjAr3J4KPXaKg0 ZZRQChEQm2qT7WGpZoMebaerlxf3m824ZIfZk9TsiAum23ygc8HrIU0+QHn/Nc3wXV 3crkPWRD9RTFg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BB944692AE; Sat, 10 Jan 2026 16:57:33 -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 SRzhsiDDS2dy; Sat, 10 Jan 2026 16:57:33 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089449; bh=nEx1gejVvTLE2ATPkOW0NQx/9OSfeGX33ZIlRxqDyD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rOrbSdHRSoMDCc8bjZsJ+F+in4V3Lxr4Xb9XkktNmQFc2CtpwU8HBYOLRhfQh3zyD W/e/Zudejur89QSKYjyjupRPdRkwOn1MKJsVdvNwDEwtBUCkUGPlw+oPgqgMrhuLYZ j/dDIyhr6fb6QIAssqJvLqfNi+4CmLzurScB9/RLpRGh4XLdo4Exi96hJU6BgJRNCt cB2CzgTR+dUZdcej68dJkLkzkVD8clSxx46LUpI0WcNGpw7OqQF9o0si51ZDHiSHwk yUXBZrE4scZB/IPTozwWcx9pv/IoniYfKsqwnbsfKvB2wxsKf5uoV1j1IK13UaW64/ b6Z7butUo3rWQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6EA7F69186; Sat, 10 Jan 2026 16:57:29 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:20 -0700 Message-ID: <20260110235633.1064859-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: KEUBDCH6VFFHHW4IRTBTXOAMHQ3R4VXD X-Message-ID-Hash: KEUBDCH6VFFHHW4IRTBTXOAMHQ3R4VXD 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 07/14] buildman: Convert % formatting to f-strings in func_test 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 old-style % string formatting to f-strings for better readability. This fixes pylint C0209 warnings. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index f677282c11c..ad60b814e1a 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -301,7 +301,7 @@ class TestFunctional(unittest.TestCase): args = args[:-1] if '-n0' in args: return command.CommandResult(return_code=0) - elif args[-1] == 'upstream/master..%s' % self._test_branch: + elif args[-1] == f'upstream/master..{self._test_branch}': return command.CommandResult(return_code=0, stdout=COMMIT_SHORTLOG) elif args[:3] == ['--no-color', '--no-decorate', '--reverse']: if args[-1] == self._test_branch: @@ -319,9 +319,9 @@ class TestFunctional(unittest.TestCase): return command.CommandResult(return_code=0) elif config.startswith('branch.badbranch'): return command.CommandResult(return_code=1) - elif config == 'branch.%s.remote' % self._test_branch: + elif config == f'branch.{self._test_branch}.remote': return command.CommandResult(return_code=0, stdout='upstream\n') - elif config == 'branch.%s.merge' % self._test_branch: + elif config == f'branch.{self._test_branch}.merge': return command.CommandResult(return_code=0, stdout='refs/heads/master\n') @@ -554,7 +554,7 @@ Some images are invalid''' self.setup_toolchains() self._run_control('-o', self._output_dir) lines = terminal.get_print_test_lines() - self.assertIn('Building current source for %d boards' % len(BOARDS), + self.assertIn(f'Building current source for {len(BOARDS)} boards', lines[0].text) def test_bad_branch(self): @@ -569,8 +569,8 @@ Some images are invalid''' lines = terminal.get_print_test_lines() # Buildman always builds the upstream commit as well - self.assertIn('Building %d commits for %d boards' % - (self._commits, len(BOARDS)), lines[0].text) + self.assertIn(f'Building {self._commits} commits for {len(BOARDS)} boards', + lines[0].text) self.assertEqual(self._builder.count, self._total_builds) # Only sandbox should succeed, the others don't have toolchains From patchwork Sat Jan 10 23:56: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: 1480 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=1768089461; bh=GENWpnRRwQi9xevPMpgEU9b0se3pBPwlX9hMKGTmVAg=; 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=odjnzKOf1JIyApVRWFVDOL5SMFYlc87ODGnww9Pgff8OwmLqnhFjnFPMwvjGW1Uf1 7PYPxpn0Xd2jk/ZLXy824BJucSEekjDl52iqahcTexamjCCCeheyN/TqrZAbZH0M09 IGvSkG8GWeeQM9PAHexuEOwAZ7jZHLMm7rmRDjaiKFsCKt+PNh0j4+MApFxSTjMwTV nV4XN8Tzymdhi94CRWve0/MUE5wggmMui80SspsdMkGj3NE0DDXGaGaWGrVQFVZbnK 8Zd6+a5A2eXU9/FE5F6oxok3SehpYP6OA4cLkzROpWbRxl6QcYyAMAVVZrPnbfChVG agxFYApTAuk6A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6C9CB692AE for ; Sat, 10 Jan 2026 16:57:41 -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 LhEyJUNxxGS2 for ; Sat, 10 Jan 2026 16:57:41 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089461; bh=GENWpnRRwQi9xevPMpgEU9b0se3pBPwlX9hMKGTmVAg=; 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=odjnzKOf1JIyApVRWFVDOL5SMFYlc87ODGnww9Pgff8OwmLqnhFjnFPMwvjGW1Uf1 7PYPxpn0Xd2jk/ZLXy824BJucSEekjDl52iqahcTexamjCCCeheyN/TqrZAbZH0M09 IGvSkG8GWeeQM9PAHexuEOwAZ7jZHLMm7rmRDjaiKFsCKt+PNh0j4+MApFxSTjMwTV nV4XN8Tzymdhi94CRWve0/MUE5wggmMui80SspsdMkGj3NE0DDXGaGaWGrVQFVZbnK 8Zd6+a5A2eXU9/FE5F6oxok3SehpYP6OA4cLkzROpWbRxl6QcYyAMAVVZrPnbfChVG agxFYApTAuk6A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5B430692B0 for ; Sat, 10 Jan 2026 16:57:41 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089458; bh=xRUOkutnf/79gQryE1Anh3I4J3PyW780LS1cob1w7x4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O34q2xgRsCN/pKGo2zK7bnKSK1XclHYxYKcfkV6S4Im42f1FDF9saRDQBbY7FA3Fn yMGWtdXmRBEL9Fyj3uCKhF0z4sYwAXamOFyRpMfmN7W8g4yWcCsFlZC80xZ8WPWcTF pX8rE7e0Cuj+OGScz5+FU+Id0FSiw92OP804A5of41iwuKlKnYQNdlJodh3wo6S/3X oY7LoJlXXj26u1MN/HwQI6XwGICzd4NwQZk1Rf7v0hmcV0UJ4rgWgT3Kq9AO/LM53y CMVjrgxWhVYkn+DEfB0xkjDNr4nHS9BZAyRMRczWEUENG061AvVncxxZR/AGZXjMia Dg3VcCwmNEzCA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 610A9692AE; Sat, 10 Jan 2026 16:57: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 pI0AhuCFdXwo; Sat, 10 Jan 2026 16:57:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089454; bh=91TzdiIzrw9QATzCIvoS6cCFFRYhS94SheS6QRPMDLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pDKulkLX3x+3thOGWqugazM0emoZiMjxY6c5h+ANU3ED25JEHiLfZhEzzkdDQkTZ5 /qArIoUqeDKnM9C98hcn7cpgnHU6mVtHW+0vEh1yY2SimQ2zsgS8PQN/kuXfSrSssr RPNdP0xRam7hdgwrN3qI7SdFOsJ78xuPy8ET3RHWVj1FjmGSnGZkp/Rwb9mP3If+EB 6tXvZcekQ6qQY4K0P2fiiv65cNpOInOo9+zP0YRlbJKgMJQaIKkgIB7zpUetk0jYaL OFnXDlbBm5LSviyxSzAPl7Hkf6AyTTuq6YpWn9Zk9vtCwcLmj0BskDLYo8EQdgi+gH mGYEh1F1X8TVw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0BF4769186; Sat, 10 Jan 2026 16:57:33 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:21 -0700 Message-ID: <20260110235633.1064859-9-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: PETTQXJU7P4BQP4P7MSNFUMC5PUQ4N25 X-Message-ID-Hash: PETTQXJU7P4BQP4P7MSNFUMC5PUQ4N25 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 08/14] buildman: Add missing docstrings in func_test 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 module docstring and function docstrings for setup_toolchains(), test_full_help(), test_help(), and print_lines(). This fixes pylint C0114 and C0116 warnings. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index ad60b814e1a..1817bf95485 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -2,6 +2,12 @@ # Copyright (c) 2014 Google, Inc # +"""Functional tests for buildman + +These tests run buildman with mocked commands to verify its behavior +without actually building anything. +""" + import io import os from pathlib import Path @@ -230,6 +236,7 @@ class TestFunctional(unittest.TestCase): shutil.rmtree(self._output_dir) def setup_toolchains(self): + """Set up toolchains for testing""" self._toolchains = toolchain.Toolchains() self._toolchains.add('gcc', test=False) @@ -268,6 +275,7 @@ class TestFunctional(unittest.TestCase): return result def test_full_help(self): + """Test that -H shows the full README.rst file""" command.TEST_RESULT = None result = self._run_buildman('-H') help_file = os.path.join(self._buildman_dir, 'README.rst') @@ -279,6 +287,7 @@ class TestFunctional(unittest.TestCase): self.assertEqual(0, result.return_code) def test_help(self): + """Test that -h shows help text""" command.TEST_RESULT = None result = self._run_buildman('-h') help_file = os.path.join(self._buildman_dir, 'README.rst') @@ -536,8 +545,12 @@ Some images are invalid''' print('_handle_make failure: make', stage) sys.exit(1) - # Example function to print output lines def print_lines(self, lines): + """Print output lines for debugging tests + + Args: + lines (list of str): Lines to print + """ print(len(lines)) for line in lines: print(line) @@ -1524,7 +1537,15 @@ something: me call_count = [0] config_exists = [False] - def mock_kconfig_changed(fname, srcdir='.', target=None): + def mock_kconfig_changed(fname, _srcdir='.', _target=None): + """Mock for kconfig_changed_since that checks if .config exists + + Args: + fname (str): Path to the .config file + + Returns: + bool: True if .config exists, False otherwise + """ call_count[0] += 1 # Return True only if .config exists (i.e. not the first build) # The first build has no .config to compare against @@ -1553,7 +1574,12 @@ something: me """Test that -Z flag disables Kconfig change detection""" call_count = [0] - def mock_kconfig_changed(fname, srcdir='.', target=None): + def mock_kconfig_changed(_fname, _srcdir='.', _target=None): + """Mock for kconfig_changed_since that always returns True + + Returns: + bool: Always True + """ call_count[0] += 1 return True # Would trigger reconfig if checking was enabled From patchwork Sat Jan 10 23:56: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: 1481 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=1768089465; bh=Jy8jhWuJybkKe3baG4ld/myy1/2n6xrJWIunpV7uLaI=; 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=tNCZiOzHmG1VHsmj80gh8VNF/H5jG2s7mfo2Az7M50fuTkqfCLn6UJiBj1ng1qKNx CzuDRzxbcyKQaW6Xa0zbl+KAx7w6GTQMlYtrYqHqF+jNFdmUEKZD00hwdfRXspySS8 l/bjOz07SujAGfE6Ps3OOr8tdMIP6GaXnzzeMybs7tD9OUft3SwWw1rDJaHqHC/YVQ jhhVy0OVovAzhHbpDcDUANIIxcj+4VEAzkYQC8wnDwzC5At/TsvL3Ro3jEAmgngHu4 4ZebRTPfQFC4V930+r3jJ4LbLhhVjzOlbHMFlsvmagl2Jsvf3O3Exhug8rypTMCQsy TULt9eNihGAGA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E07CB692B9 for ; Sat, 10 Jan 2026 16:57:45 -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 AZryqVI6s30z for ; Sat, 10 Jan 2026 16:57:45 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089465; bh=Jy8jhWuJybkKe3baG4ld/myy1/2n6xrJWIunpV7uLaI=; 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=tNCZiOzHmG1VHsmj80gh8VNF/H5jG2s7mfo2Az7M50fuTkqfCLn6UJiBj1ng1qKNx CzuDRzxbcyKQaW6Xa0zbl+KAx7w6GTQMlYtrYqHqF+jNFdmUEKZD00hwdfRXspySS8 l/bjOz07SujAGfE6Ps3OOr8tdMIP6GaXnzzeMybs7tD9OUft3SwWw1rDJaHqHC/YVQ jhhVy0OVovAzhHbpDcDUANIIxcj+4VEAzkYQC8wnDwzC5At/TsvL3Ro3jEAmgngHu4 4ZebRTPfQFC4V930+r3jJ4LbLhhVjzOlbHMFlsvmagl2Jsvf3O3Exhug8rypTMCQsy TULt9eNihGAGA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CFF70692B0 for ; Sat, 10 Jan 2026 16:57:45 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089463; bh=T6IdfEiXeF5KBGXHlu362WWGEa2qDhfyVcSWr6ISJ8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q5FZ/IWm4zcyWx3tcZegtgHa+LmaX1PYIJ/JW22asFi2pC9nhq/Nd90NfdHqBPM5p I5F1+FHD15XkYG/ADNTPgSbA4q36TuN7snj1u3xGu8kLl4ucza8Rgn/jdaDryou17P 3c/+cM7IvPUSUonjh3UAsJcObDZTB6Y48y4nWmnz4khQO+xP4X4ZzYiZIMLfvJiN7L poqLMFPdfK6cOP/0SOHK+2WQ5w84a4cOsTRO92T2SXO9/tL9bUNu2TOE4Yoy2ZLwWZ xp+R/Q5FZvqtDkhKeKBATzPsZhHbIiPTd48yhLAfXbY+eCWMr1RsJbF5kqI7GrHO5K F4bfg+h1UONug== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CD6B5692B0; Sat, 10 Jan 2026 16:57: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 rNi_QKqTPRGq; Sat, 10 Jan 2026 16:57:43 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089458; bh=YGYCV0XNabJwb/v0uroFVNbKpMLA6E1DEh6wEpO6Izk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p1nBB8oJly9YihNFYpQo85b+Ry8qrgHx86stajx2DvZvhw2yKwbaRavO4KgKrIax9 EkDh5ZrJG/B4p73kyJVFVA5KRu4w+uXH8y011q3XkjMjLQvwdzqXyHxa1kF3Jimzgo 4Ty8MYt04NQeuBUSd9R/bmORxaUKDt+0Im0C6pInZ82UqpGDcSQPxogf32GNgyncPK qfMQHhjF9ZbKlNB6+AHYcdGq7rr+t6NSN7qNDoTxAEf4VV8yZ5jLK6g4rTzEwioPEd GpnymMCSBQAndjvV5Fk9uD7E3HABYb3APbi0DTL7+P4B6BrSM/59+3jlSrBhHEqp/4 A1CosoR5D9iRg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A029E69186; Sat, 10 Jan 2026 16:57:38 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:22 -0700 Message-ID: <20260110235633.1064859-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: BSUCS4L5J3PYVRMISDFJPJTNFZQAALDD X-Message-ID-Hash: BSUCS4L5J3PYVRMISDFJPJTNFZQAALDD 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 09/14] buildman: Fix unused variable warnings in func_test 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 pylint W0612 (unused-variable) and W0613 (unused-argument) warnings. For unused function parameters that must remain for API compatibility, prefix them with underscore. For variables that are assigned but never used, either remove them or prefix with underscore to indicate intentional non-use. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 1817bf95485..e0f9d7af67d 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -290,7 +290,6 @@ class TestFunctional(unittest.TestCase): """Test that -h shows help text""" command.TEST_RESULT = None result = self._run_buildman('-h') - help_file = os.path.join(self._buildman_dir, 'README.rst') self.assertTrue(len(result.stdout) > 1000) self.assertEqual(0, len(result.stderr)) self.assertEqual(0, result.return_code) @@ -374,7 +373,7 @@ class TestFunctional(unittest.TestCase): print('git', git_args, sub_cmd, args) sys.exit(1) - def _handle_command_nm(self, args): + def _handle_command_nm(self, _args): # Return nm --size-sort output with function sizes that vary between # calls to simulate changes between commits self._nm_calls = getattr(self, '_nm_calls', 0) + 1 @@ -386,7 +385,7 @@ class TestFunctional(unittest.TestCase): ''' return command.CommandResult(return_code=0, stdout=stdout) - def _handle_command_objdump(self, args): + def _handle_command_objdump(self, _args): # Return objdump -h output with .rodata section stdout = ''' u-boot: file format elf32-littlearm @@ -399,7 +398,7 @@ Idx Name Size VMA LMA File off Algn ''' return command.CommandResult(return_code=0, stdout=stdout) - def _handle_command_objcopy(self, args): + def _handle_command_objcopy(self, _args): return command.CommandResult(return_code=0) def _handle_command_size(self, args): @@ -478,7 +477,7 @@ Idx Name Size VMA LMA File off Algn result.stdout = len(result.stdout.splitlines()) return result - def _handle_make(self, commit, brd, stage, cwd, *args, **kwargs): + def _handle_make(self, commit, brd, stage, cwd, *args, **_kwargs): """Handle execution of 'make' Args: @@ -935,7 +934,7 @@ Some images are invalid''' def test_thread_exceptions(self): """Test that exceptions in threads are reported""" - with terminal.capture() as (stdout, stderr): + with terminal.capture() as (stdout, _stderr): self.assertEqual(102, self._run_control('-o', self._output_dir, test_thread_exceptions=True)) self.assertIn( @@ -948,7 +947,6 @@ Some images are invalid''' board0_dir = os.path.join(self._output_dir, 'current', 'board0') errfile = os.path.join(board0_dir, 'err') - logfile = os.path.join(board0_dir, 'log') # We expect failure when there are missing blobs result = self._run_control('board0', '-o', self._output_dir) @@ -1067,13 +1065,13 @@ Some images are invalid''' """Test passing of configuration fragments to the make command""" # Single fragment passed as argument extra_args = ['board0', '--fragments', 'f1.config'] - lines, cfg_data = self.check_command(*extra_args) + lines, _cfg_data = self.check_command(*extra_args) self.assertRegex(lines[0].decode('utf-8'), r'make O=/.*board0_defconfig\s+f1\.config', 'Test single fragment') # Multiple fragments passed as comma-separated list extra_args = ['board0', '--fragments', 'f1.config,f2.config'] - lines, cfg_data = self.check_command(*extra_args) + lines, _cfg_data = self.check_command(*extra_args) self.assertRegex(lines[0].decode('utf-8'), r'make O=/.*board0_defconfig\s+f1\.config\s+f2\.config', 'Test multiple fragments') @@ -1088,7 +1086,7 @@ Some images are invalid''' # CONFIG_LOCALVERSION_AUTO is not set ''', cfg_data) - with terminal.capture() as (stdout, stderr): + with terminal.capture() as (stdout, _stderr): lines, cfg_data = self.check_command('-r', '-a', 'LOCALVERSION') self.assertIn(b'SOURCE_DATE_EPOCH=0', lines[0]) @@ -1312,15 +1310,14 @@ endif outfile = os.path.join(self._output_dir, 'test-boards.cfg') if os.path.exists(outfile): os.remove(outfile) - with terminal.capture() as (stdout, stderr): - result = self._run_control('-R', outfile, brds=None, - get_builder=False) + with terminal.capture() as (_stdout, _stderr): + self._run_control('-R', outfile, brds=None, get_builder=False) self.assertTrue(os.path.exists(outfile)) def test_print_prefix(self): """Test that we can print the toolchain prefix""" with terminal.capture() as (stdout, stderr): - result = self._run_control('-A', 'board0') + self._run_control('-A', 'board0') self.assertEqual('arm-\n', stdout.getvalue()) self.assertEqual('', stderr.getvalue()) @@ -1364,7 +1361,7 @@ endif def test_print_arch(self): """Test that we can print the board architecture""" with terminal.capture() as (stdout, stderr): - result = self._run_control('--print-arch', 'board0') + self._run_control('--print-arch', 'board0') self.assertEqual('arm\n', stdout.getvalue()) self.assertEqual('', stderr.getvalue()) From patchwork Sat Jan 10 23:56: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: 1482 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=1768089470; bh=Sy325nL7+tiYZmJEsEWqpoiSIJL7qj8myhpch6pgUgQ=; 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=ODyPs7T9ti0KdZzUUgtzKu+BqE9QeFB8nhBFMZJkBEV1+rY2Ao7VLOCk2TuTtp3MY fXVg3qUsTSdqLVwUkKu285pITdvG4jz2eRN3gekoWo2gts8QEY72CrBcaL3cWVvMtp gHifRSvNQPq08LpdPy0zVPQUoAIH/Qh3iO7rxnLXVOxjsmVlKVr6q9B/A2FVcc6VGU zW38K+YC0ARceHyoUo/AyGnSJ/NodQZSJeez7XOU4ZJz28/6r/lCooqYGvW99v8IZG UdSI+qVcLwfuchusQAnBm7EucktmIMLBi/vVSM3pSem2hxGYBIVPCHsrMs+zMzCLju lmbKl6Tdo89Bw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A9D65692B5 for ; Sat, 10 Jan 2026 16:57: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 z9EsPdjfUgeX for ; Sat, 10 Jan 2026 16:57:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089470; bh=Sy325nL7+tiYZmJEsEWqpoiSIJL7qj8myhpch6pgUgQ=; 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=ODyPs7T9ti0KdZzUUgtzKu+BqE9QeFB8nhBFMZJkBEV1+rY2Ao7VLOCk2TuTtp3MY fXVg3qUsTSdqLVwUkKu285pITdvG4jz2eRN3gekoWo2gts8QEY72CrBcaL3cWVvMtp gHifRSvNQPq08LpdPy0zVPQUoAIH/Qh3iO7rxnLXVOxjsmVlKVr6q9B/A2FVcc6VGU zW38K+YC0ARceHyoUo/AyGnSJ/NodQZSJeez7XOU4ZJz28/6r/lCooqYGvW99v8IZG UdSI+qVcLwfuchusQAnBm7EucktmIMLBi/vVSM3pSem2hxGYBIVPCHsrMs+zMzCLju lmbKl6Tdo89Bw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 983BB692AE for ; Sat, 10 Jan 2026 16:57:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089468; bh=KDaxdQQ7BON0aIO/+2bph4JjclPIfxvfH4XdMpVF1Xc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TyfbTk3Ntjwvx6rrJOA7q22QwuyM+Ld5rdRoMqbTv0K7kxr7PQNWeFVu8YEntm/sP lGAB7mUL6+gBYLQ2EdDkalEwXOA4BvzURLVtz3XuLRmnn01ClIOw74afVVncdt0L5a tzu62305OTmA0tiaZdMeXMcgVDyt3kql+BB6DTEZ03MtEXR6F4CZM2kPrEw1DOWugb cDrxWgZekur3ozEKz2O4jONJTHVb8MXfyzYgY+Unvn2vP+J7ELX9SEkgTxYOPOZd2f LHcbvAGZucJC08OWmDBaLbOaFJGg6rX48D4xY2ZQcXwYlAQXrzWoO77f1ZHSVa5sa2 P/dP4RvNKolRQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3FC1E69186; Sat, 10 Jan 2026 16:57:48 -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 eOjvDnNxCTSs; Sat, 10 Jan 2026 16:57:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089463; bh=RVqN4XufZQykKd+nXl5M+XrQ8tTpone2L3PzFgu17yY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hjqsgbx7o41Q0ehzc7vB/eq4hFM+8TX4q6NdN717Shmq4Bi0yBVuElvRNgrxe/lhR JXS5L6PTY1bwR/lGJtegi82iU9zS4Tw0RG/XKUUkxZZQ/nveCBDm8IxSgOql4HFJv4 3QcavnMo51ErEowqJhfqaZD1xcdOF+u+ABTsq1BKa8Vt4pJzbv/rjBYJ91ol5eOYEW mon98Kb8PuemQeXrAeZfm2b2MA6bwxfkm9R2AjPgJenWXWyohmPWUOFfIPniRPQYqJ vZ0uvoy1IKpGVPt5j8KsjNlxUAI+aG1Ym0a5pxnx+NK9BjMM31m0bSTvXK1V6lcJY5 VVKKYh5lx7NKQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 42624692AE; Sat, 10 Jan 2026 16:57:43 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:23 -0700 Message-ID: <20260110235633.1064859-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: Y26KXOLO4LOASSFXSJV3W4ZWNIAFQ5UW X-Message-ID-Hash: Y26KXOLO4LOASSFXSJV3W4ZWNIAFQ5UW 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 10/14] buildman: Fix pylint style warnings in func_test 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 various pylint style warnings: - C0305: Remove trailing newline at end of file - C0325: Remove superfluous parentheses around byte string literal - R1705: Use 'if' instead of 'elif' after return statements Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index e0f9d7af67d..e9bcd954b5b 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -309,9 +309,9 @@ class TestFunctional(unittest.TestCase): args = args[:-1] if '-n0' in args: return command.CommandResult(return_code=0) - elif args[-1] == f'upstream/master..{self._test_branch}': + if args[-1] == f'upstream/master..{self._test_branch}': return command.CommandResult(return_code=0, stdout=COMMIT_SHORTLOG) - elif args[:3] == ['--no-color', '--no-decorate', '--reverse']: + if args[:3] == ['--no-color', '--no-decorate', '--reverse']: if args[-1] == self._test_branch: count = int(args[3][2:]) return command.CommandResult(return_code=0, @@ -325,11 +325,11 @@ class TestFunctional(unittest.TestCase): config = args[0] if config == 'sendemail.aliasesfile': return command.CommandResult(return_code=0) - elif config.startswith('branch.badbranch'): + if config.startswith('branch.badbranch'): return command.CommandResult(return_code=1) - elif config == f'branch.{self._test_branch}.remote': + if config == f'branch.{self._test_branch}.remote': return command.CommandResult(return_code=0, stdout='upstream\n') - elif config == f'branch.{self._test_branch}.merge': + if config == f'branch.{self._test_branch}.merge': return command.CommandResult(return_code=0, stdout='refs/heads/master\n') @@ -360,13 +360,13 @@ class TestFunctional(unittest.TestCase): sub_cmd = arg if sub_cmd == 'config': return self._handle_command_git_config(args) - elif sub_cmd == 'log': + if sub_cmd == 'log': return self._handle_command_git_log(args) - elif sub_cmd == 'clone': + if sub_cmd == 'clone': return command.CommandResult(return_code=0) - elif sub_cmd == 'checkout': + if sub_cmd == 'checkout': return command.CommandResult(return_code=0) - elif sub_cmd == 'worktree': + if sub_cmd == 'worktree': return command.CommandResult(return_code=0) # Not handled, so abort @@ -498,7 +498,7 @@ Idx Name Size VMA LMA File off Algn out_dir = arg[2:] if stage == 'mrproper': return command.CommandResult(return_code=0) - elif stage == 'config': + if stage == 'config': fname = os.path.join(cwd or '', out_dir, '.config') # Vary config based on commit to simulate config changes seq = commit.sequence if hasattr(commit, 'sequence') else 0 @@ -514,9 +514,9 @@ Idx Name Size VMA LMA File off Algn tools.write_file(cfg_fname, cfg_content.encode('utf-8')) return command.CommandResult(return_code=0, combined='Test configuration complete') - elif stage == 'oldconfig': + if stage == 'oldconfig': return command.CommandResult(return_code=0) - elif stage == 'build': + if stage == 'build': stderr = '' fname = os.path.join(cwd or '', out_dir, 'u-boot') tools.write_file(fname, b'U-Boot') @@ -1271,13 +1271,13 @@ Active aarch64 armv8 - armltd total_compute board2 # Add another TARGET to the Kconfig tools.write_file(main, both_data, binary=False) orig_kc_data = tools.read_file(kc_file) - extra = (b''' + extra = b''' if TARGET_BOARD2 config TARGET_OTHER \tbool "other" \tdefault y endif -''') +''' tools.write_file(kc_file, orig_kc_data + extra) params_list, warnings = self._boards.build_board_list(config_dir, src, warn_targets=True) @@ -1591,4 +1591,3 @@ something: me # No reconfigs should be triggered self.assertEqual(0, self._builder.kconfig_reconfig) - From patchwork Sat Jan 10 23:56: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: 1483 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=1768089473; bh=HpeR0/bt/1AVpMDUucKfoN4BsHiiN5YZA23CAiOH81c=; 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=n8CAx+BPIhjQdVElISfQdr6Lce+i+dbjUU6jf3QoxRWV0pbk+rHbiY96IvT/6A7dm mofSajiqgRUUJhAaRAjdqUx1SbKngWXrhiPbiSDtfwvbiyeWJ69XLkFMnZDhqtxzo6 ekg07fSkZWXCcbphQAiaq8rQIbXciO5i9S6WY0ihJaknKLe2z1dvY7aKv9Vl2JF7tw 3MEraBOHMEPyUclrBbRWNzh6rySG3u+ofVFNaDnUpAGR42G+fhE5yrXfdLbCS0L7SH OwT/gK6FTYVCTnKm+0EH6GijY26bv99Ty8qs+sFOJqGGL/Szx4KWD36PzMW4pV5z9v L3W/3/SI/XyVg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1E817692B9 for ; Sat, 10 Jan 2026 16:57: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 10024) with ESMTP id QAajZb8lHBzm for ; Sat, 10 Jan 2026 16:57:53 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089473; bh=HpeR0/bt/1AVpMDUucKfoN4BsHiiN5YZA23CAiOH81c=; 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=n8CAx+BPIhjQdVElISfQdr6Lce+i+dbjUU6jf3QoxRWV0pbk+rHbiY96IvT/6A7dm mofSajiqgRUUJhAaRAjdqUx1SbKngWXrhiPbiSDtfwvbiyeWJ69XLkFMnZDhqtxzo6 ekg07fSkZWXCcbphQAiaq8rQIbXciO5i9S6WY0ihJaknKLe2z1dvY7aKv9Vl2JF7tw 3MEraBOHMEPyUclrBbRWNzh6rySG3u+ofVFNaDnUpAGR42G+fhE5yrXfdLbCS0L7SH OwT/gK6FTYVCTnKm+0EH6GijY26bv99Ty8qs+sFOJqGGL/Szx4KWD36PzMW4pV5z9v L3W/3/SI/XyVg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0F1BF692B5 for ; Sat, 10 Jan 2026 16:57:53 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089472; bh=qctso0NX9pqlzpEH5GQU8NuTrbR4BMTZwZL4qxcnxKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y8VhSbpIJ2yf/0pUj0XtaA/2vLCteg5S2RsPG1Nm/dXiqmWsLYaS5064XKkhwL5O4 BaXJ0vDOG46MLUQzIgFGd6ir9I6GvHlWP34ftorweOfz2GwbtECs9cCrbQfl3lRLsr G7TY2NLDXs9nzrBb5aOpKpZVc+FnUCdGbeeb8izuX/V55CgP3OITNM8sr+pcGJj3ha 86ub8VnHzQ596xtKDmCNfzMrpPt2hRSqxhQcVWO+929OnaAhYHT2lqjiciBIFb8y+1 6l8PamLsWHMO7idqOtCPC5j6Qmj1ahLgbd76OB0RC7mpUqF6tRycnSHj8el9ALEwud Wi6dmGdOmO4nA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3204169186; Sat, 10 Jan 2026 16:57:52 -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 mKPg9fqpg0vG; Sat, 10 Jan 2026 16:57:52 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089468; bh=8Imnvv4MGM8A6qd2QenXHmeeTRz0hq1c8J81Ge6/VBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GtpYIoKs5+uBT1JjbIlBxR93HfvBmRs6gQpmZd9rSGi3yyAulUOCoZ2i7rjVHAsR3 8lJiYeD0+xxUivEMOzxectYrvBAl5wgozE+DUIe/Ug/mLvDDZyNq+V9FTOO8FY5JIX abA8a3hZHoGtsYDTkjkabcNCQc57gNdDeSMNrVdY3nDAAjWjNzBXkIV2SicQkCSqGZ gDDUXQGhNYkTTNoZDEvp+EoJcx5GYbqRD8R+52MXcxHZH+hkdy3EXJvFfYoAU2ORdK SWPagDjWoyUiGScfiiINdBIPdRCLKyy7oZCWLIsTioIjVHSwopwKxM2hKv6L9x1yvx Rrx+Bz14sjm/g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D37D4692B9; Sat, 10 Jan 2026 16:57:47 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:24 -0700 Message-ID: <20260110235633.1064859-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 6ANLPUERJGZZGPQRUFONHWVOGD263MTH X-Message-ID-Hash: 6ANLPUERJGZZGPQRUFONHWVOGD263MTH 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 11/14] buildman: Fix attribute and line-length warnings in func_test 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 pylint warnings: - W0201 (attribute-defined-outside-init): Initialise _builder, _nm_calls, _size_calls, and _captured_make_args in setUp() rather than setting them dynamically - C0301 (line-too-long): Break long lines to stay within 80 characters Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 71 ++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index e9bcd954b5b..4112cde9a7b 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -52,8 +52,10 @@ chromeos_peach=VBOOT=${chroot}/build/peach_pit/usr ${vboot} BOARDS = [ ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 0', 'board0', ''], ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 1', 'board1', ''], - ['Active', 'powerpc', 'powerpc', '', 'Tester', 'PowerPC board 1', 'board2', ''], - ['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', ''], + ['Active', 'powerpc', 'powerpc', '', 'Tester', 'PowerPC board 1', 'board2', + ''], + ['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', + ''], ] COMMIT_SHORTLOG = """4aca821 patman: Avoid changing the order of tags @@ -221,6 +223,16 @@ class TestFunctional(unittest.TestCase): # Set to True to report missing blobs self._missing = False + # Builder instance from control module (set by _run_control) + self._builder = None + + # Counters for mock command handlers + self._nm_calls = 0 + self._size_calls = 0 + + # Captured make arguments for testing + self._captured_make_args = [] + self._buildman_dir = os.path.dirname(os.path.realpath(sys.argv[0])) self._test_dir = os.path.join(self._buildman_dir, 'test') @@ -252,11 +264,11 @@ class TestFunctional(unittest.TestCase): args: List of arguments to pass brds: Boards object, or False to pass self._boards, or None to pass None - clean_dir: Used for tests only, indicates that the existing output_dir - should be removed before starting the build - test_thread_exceptions: Uses for tests only, True to make the threads - raise an exception instead of reporting their result. This simulates - a failure in the code somewhere + clean_dir: Used for tests only, indicates that the existing + output_dir should be removed before starting the build + test_thread_exceptions: Uses for tests only, True to make the + threads raise an exception instead of reporting their result. + This simulates a failure in the code somewhere get_builder (bool): Set self._builder to the resulting builder Returns: @@ -376,7 +388,7 @@ class TestFunctional(unittest.TestCase): def _handle_command_nm(self, _args): # Return nm --size-sort output with function sizes that vary between # calls to simulate changes between commits - self._nm_calls = getattr(self, '_nm_calls', 0) + 1 + self._nm_calls += 1 base = self._nm_calls * 0x10 stdout = f'''{0x100 + base:08x} T main {0x80 + base:08x} T board_init @@ -404,7 +416,7 @@ Idx Name Size VMA LMA File off Algn def _handle_command_size(self, args): # Return size output - vary the size based on call count to simulate # changes between commits - self._size_calls = getattr(self, '_size_calls', 0) + 1 + self._size_calls += 1 text = 10000 + self._size_calls * 100 data = 1000 bss = 500 @@ -524,12 +536,15 @@ Idx Name Size VMA LMA File off Algn # Handle missing blobs if self._missing: if 'BINMAN_ALLOW_MISSING=1' in args: - stderr = '''+Image 'main-section' is missing external blobs and is non-functional: intel-descriptor intel-ifwi intel-fsp-m intel-fsp-s intel-vbt -Image 'main-section' has faked external blobs and is non-functional: descriptor.bin fsp_m.bin fsp_s.bin vbt.bin - -Some images are invalid''' + stderr = ("+Image 'main-section' is missing external " + 'blobs and is non-functional: intel-descriptor ' + 'intel-ifwi intel-fsp-m intel-fsp-s intel-vbt\n' + "Image 'main-section' has faked external blobs " + 'and is non-functional: descriptor.bin fsp_m.bin ' + 'fsp_s.bin vbt.bin\n\nSome images are invalid') else: - stderr = "binman: Filename 'fsp.bin' not found in input path" + stderr = ("binman: Filename 'fsp.bin' not found in " + 'input path') elif type(commit) is not str: stderr = self._error.get((brd.target, commit.sequence)) else: @@ -581,8 +596,9 @@ Some images are invalid''' lines = terminal.get_print_test_lines() # Buildman always builds the upstream commit as well - self.assertIn(f'Building {self._commits} commits for {len(BOARDS)} boards', - lines[0].text) + self.assertIn( + f'Building {self._commits} commits for {len(BOARDS)} boards', + lines[0].text) self.assertEqual(self._builder.count, self._total_builds) # Only sandbox should succeed, the others don't have toolchains @@ -824,7 +840,8 @@ Some images are invalid''' # Each board has a mrproper, config, and then one make per commit self.assertEqual(self._make_calls, len(BOARDS) * (self._commits + 1)) self._make_calls = 0 - self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, clean_dir=False) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, + clean_dir=False) self.assertEqual(self._make_calls, 0) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._builder.fail, 0) @@ -833,7 +850,8 @@ Some images are invalid''' """The -f flag should force a rebuild""" self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) self._make_calls = 0 - self._run_control('-b', TEST_BRANCH, '-f', '-o', self._output_dir, clean_dir=False) + self._run_control('-b', TEST_BRANCH, '-f', '-o', self._output_dir, + clean_dir=False) # Each board has a config and one make per commit self.assertEqual(self._make_calls, len(BOARDS) * (self._commits + 1)) @@ -860,13 +878,15 @@ Some images are invalid''' # not be rebuilt del self._error['board2', 1] self._make_calls = 0 - self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, clean_dir=False) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, + clean_dir=False) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._make_calls, 0) self.assertEqual(self._builder.fail, 1) # Now use the -F flag to force rebuild of the bad commit - self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, '-F', clean_dir=False) + self._run_control('-b', TEST_BRANCH, '-o', self._output_dir, '-F', + clean_dir=False) self.assertEqual(self._builder.count, self._total_builds) self.assertEqual(self._builder.fail, 0) self.assertEqual(self._make_calls, 2) @@ -1072,9 +1092,10 @@ Some images are invalid''' # Multiple fragments passed as comma-separated list extra_args = ['board0', '--fragments', 'f1.config,f2.config'] lines, _cfg_data = self.check_command(*extra_args) - self.assertRegex(lines[0].decode('utf-8'), - r'make O=/.*board0_defconfig\s+f1\.config\s+f2\.config', - 'Test multiple fragments') + self.assertRegex( + lines[0].decode('utf-8'), + r'make O=/.*board0_defconfig\s+f1\.config\s+f2\.config', + 'Test multiple fragments') def test_reproducible(self): """Test that the -r flag works""" @@ -1283,8 +1304,8 @@ endif warn_targets=True) self.assertEqual(2, len(params_list)) self.assertEqual( - ['WARNING: board2_defconfig: Duplicate TARGET_xxx: board2 and other'], - warnings) + ['WARNING: board2_defconfig: Duplicate TARGET_xxx: ' + 'board2 and other'], warnings) # Remove the TARGET_BOARD0 Kconfig option lines = [b'' if line == b'config TARGET_BOARD2\n' else line From patchwork Sat Jan 10 23:56: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: 1484 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=1768089478; bh=qI7uZA08gTcYlJ41myX0Kv4Owov0wVTZnkm3AtgjLIo=; 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=qZSJ9vjVkdCQIyrBwq3CFdYsRU10fOoME3e7wjzTBD2T4MBzi7MBR/Lh507oR7sqZ MxxglHlSwNro88qkEsA8utsH92Nc7kN9gZOa8Qk+DSLlTfDlB1WaKv3jXij86/GDPX 8zWakK/R7ppclAJnmw5HmP3UGvhYoZ04/eFeZkOw1PG2eE6+AQEocHKovSDBkPRWbg So0TvTz+B9qQ8Cgrt2AZi1qMplFn97TpMohc6QeohffuXpQm7cRdwSKYVe0H/uaEmC 4EbZ7Rh+ldEPXjv8b/0rJzhKYgFrXudRrtXKmLACMOWc/Lca2w7UPBynZNoZ6M9RVR oNTwYlseJq04Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AC64A692B9 for ; Sat, 10 Jan 2026 16:57: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 10024) with ESMTP id G0Wv3S_roBYh for ; Sat, 10 Jan 2026 16:57:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089478; bh=qI7uZA08gTcYlJ41myX0Kv4Owov0wVTZnkm3AtgjLIo=; 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=qZSJ9vjVkdCQIyrBwq3CFdYsRU10fOoME3e7wjzTBD2T4MBzi7MBR/Lh507oR7sqZ MxxglHlSwNro88qkEsA8utsH92Nc7kN9gZOa8Qk+DSLlTfDlB1WaKv3jXij86/GDPX 8zWakK/R7ppclAJnmw5HmP3UGvhYoZ04/eFeZkOw1PG2eE6+AQEocHKovSDBkPRWbg So0TvTz+B9qQ8Cgrt2AZi1qMplFn97TpMohc6QeohffuXpQm7cRdwSKYVe0H/uaEmC 4EbZ7Rh+ldEPXjv8b/0rJzhKYgFrXudRrtXKmLACMOWc/Lca2w7UPBynZNoZ6M9RVR oNTwYlseJq04Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9BD7A692B0 for ; Sat, 10 Jan 2026 16:57:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089476; bh=hn4F8C9Nc0cBTWcleJXEEArrWYZd/lZ6uayI/vuBPQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNcP2fffvx8CQsdANHPR5y4oNMJeh6JMyBCI1eS9X/fvJvyolQ2bV1DBkSOR4tjug qGK1LDsaeBq/MdCkfnVxQzq5MEL6wgPwbLXhT/xG8s6146I5g0UCaqgh/yYI8rH3v8 nfYjjxDEtncYQaQSnrXBop3q+ksJjzOZQdcL3kFjocs1JP4mVHLu0vcaFSc+J+ZvM/ w8NihEX6X+gWpVoU1f50phvMQQs1r9mkOg3Qi922N6dxLnrMW8Kec+stRT9IVL0SM+ mykbt8SlXiNX+u9uxqVbSYyQj+i4SUFInkiJ8DjQ/+eOJKKIYTwYNn0BLrwYKiQTgD 4CflKt9z1xV+A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DF4D469186; Sat, 10 Jan 2026 16:57: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 10026) with ESMTP id 5CfgUNRVFqNX; Sat, 10 Jan 2026 16:57:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089472; bh=r5x2U1/75bqpxXiiIchyg687GVg1DjQFrr66oIxXLNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YO51V52s+xRFj8HSOl0wHMFRK9LPzddUlV0TJtmUVD0YtGM2CxRnzamfRlfgoynWo zf4uvsTGBCbOMrz5FifCKHA6CmMdSKMLlydsqhVaRyDmRoiRyl+o5agCwRMFybZI5v 1MXi6KPr/a71v5W+KU3FaBB73yDP3DJmgONrNspRVmZwmpcIW26eK/czrDLim0zvqA PhgLJV+EKStm+ajNqg9o1Cns++soDBR0JbiBEyaBJzfIZqYB32xihReVx7VSqTYhPJ y2xw8WgbZI8sY5XRlZJa5lbvXyIc+2bf4QIZduJpMwxtXho1st0l6UnurMgLmTo/3x gKWWBZK62YwFA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 786B1692AE; Sat, 10 Jan 2026 16:57:52 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:25 -0700 Message-ID: <20260110235633.1064859-13-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: SN6NQA3ERYNNOLGM2LVVEX4FRGUCKJOK X-Message-ID-Hash: SN6NQA3ERYNNOLGM2LVVEX4FRGUCKJOK 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 12/14] buildman: Fix misc pylint warnings in func_test 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 several pylint warnings: - C0123 (unidiomatic-typecheck): Use isinstance() rather than type() - W1404 (implicit-str-concat): Add missing comma between arguments - W1514/R1732: Use tools.read_file() instead of open() without encoding The W1404 fix corrects a bug where '-x' and 'board4' are concatenated into '-xboard4' instead of being separate arguments. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 4112cde9a7b..44ca2499b85 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -545,7 +545,7 @@ Idx Name Size VMA LMA File off Algn else: stderr = ("binman: Filename 'fsp.bin' not found in " 'input path') - elif type(commit) is not str: + elif not isinstance(commit, str): stderr = self._error.get((brd.target, commit.sequence)) else: # For current source builds, commit is 'current' @@ -610,12 +610,11 @@ Idx Name Size VMA LMA File off Algn for brd in self._boards.get_list(): if brd.arch != 'sandbox': errfile = self._builder.get_err_file(commit, brd.target) - fd = open(errfile) + data = tools.read_file(errfile, binary=False) self.assertEqual( - fd.readlines(), + data.splitlines(), [f'Tool chain error for {brd.arch}: ' f"No tool chain found for arch '{brd.arch}'"]) - fd.close() def test_toolchain_errors(self): """Test that toolchain errors are reported in the summary @@ -1362,7 +1361,8 @@ endif def test_exclude_list(self): """Test excluding a list of things""" - self._run_control('-x', 'board2', '-x' 'board4', '-o', self._output_dir) + self._run_control('-x', 'board2', '-x', 'board4', '-o', + self._output_dir) self.assertEqual(['board0', 'board1'], [b.target for b in self._boards.get_selected()]) From patchwork Sat Jan 10 23:56: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: 1485 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=1768089482; bh=P5sRbFGbFCc3Tgh0esTKhb39bxXQAgmbnHnc8CMVX74=; 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=etY3Qyrig2S1zUkrbZalW3Ti3hIuytH8nMvshjvcXoeVARI9inO6Rjo0twNmx1p0E t6SVWlpbo4TGKVkCyYsmYDOCRHR8qEpWiJmTvJH9veKtrPBM02v5q0a2FAubywe+Wn fVLJMmUxY/+4M4oVxq7ZSNMTjOU72bZMm+t6rYzEVXWjPzDaT0xq84mwPcoU16KP8Q ze/Bsri3I1hTLs+ec12z80QKM5EhFn7oTdE30FXjFTBbgODi8w+pG+hiHJBCFwTy39 YijsY1eE2Q/zXxQ7diFXnwFxVa8zCzcaDLk8ZeYe/2M+1hD/Nu4rGXApHUsiN1/LSn 9+m9vVcWgeG4Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 777A569186 for ; Sat, 10 Jan 2026 16:58: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 10024) with ESMTP id jsiW2euFF3-M for ; Sat, 10 Jan 2026 16:58:02 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089482; bh=P5sRbFGbFCc3Tgh0esTKhb39bxXQAgmbnHnc8CMVX74=; 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=etY3Qyrig2S1zUkrbZalW3Ti3hIuytH8nMvshjvcXoeVARI9inO6Rjo0twNmx1p0E t6SVWlpbo4TGKVkCyYsmYDOCRHR8qEpWiJmTvJH9veKtrPBM02v5q0a2FAubywe+Wn fVLJMmUxY/+4M4oVxq7ZSNMTjOU72bZMm+t6rYzEVXWjPzDaT0xq84mwPcoU16KP8Q ze/Bsri3I1hTLs+ec12z80QKM5EhFn7oTdE30FXjFTBbgODi8w+pG+hiHJBCFwTy39 YijsY1eE2Q/zXxQ7diFXnwFxVa8zCzcaDLk8ZeYe/2M+1hD/Nu4rGXApHUsiN1/LSn 9+m9vVcWgeG4Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 636D2692B0 for ; Sat, 10 Jan 2026 16:58:02 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089481; bh=KmkExmRHHdYzBiEKG8yMMCRSSflDXtSyLQduOi+ad5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PjuzFZHUsY4B8dd5mo013ZYM0AYC9Mt8PUM7EZkFBSbuceU8Vt1qH+x+HHJL8OIXN moj4PKVHa2z66hcdRd7C67NQrGAW+E0Mxw0mfeAy/vbMbRn4+680lurY2VYPnDUhlq oCdPI/ufyVgZpj1D75481AtcfQmKLkApruZ8NZzntfZgsiLPy1qYd5ew5q7HFeGj1L 461pAdDlt14eOKVEMhmpSJLcoWfxDSWTkrI5zdhA8OQk7Cnj1iSS2GPvebGbmUxpis edEZ2yAdMZbLfFQ5+E+7c/GkuJgKnKCSoVy71kCiWtkVxura1d+gssanfClzK8OPvd 2cDIc8xhIV/Ew== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7733569186; Sat, 10 Jan 2026 16:58:01 -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 j2vSXTOorNNy; Sat, 10 Jan 2026 16:58:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089477; bh=A13NrIjtC2qRIywdEkmZwryLQUutgRmaBbCbRJKWQMg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UKSjb3yrkehyu0quokfSBR3cp54CJmUrOe6WJj89pJOSBLjJkqGgIZuhw+B1xpeDP 1LYDxQIZg0WgqiCILTVxnD/H8TnuJ3VNlVL08w1eugDLB/qzS2Mu7BfzRVHy1yH+DS quNFIJ+aGECbl6HyF7e0gvioZoEgQoyuMjdsA16Rpgf23tl5xoO5XM9Mf2LCEz/XGd XllxBaA56324ztjPNBoQ47MCzUJWlqDsnjxb4x/K/ec+oMOxWukj0Zl4NcaZBmbpYi DTNj1wHWP6f1AfFKqMqMijg1ssuvVHxrTNCoPua38gvhRG2NepChkGo5OpnkUHhZ1q pnQLJjPsttFDA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2E59A692AE; Sat, 10 Jan 2026 16:57:57 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:26 -0700 Message-ID: <20260110235633.1064859-14-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: A6WIWNNXJZSIV3H2ITOT6JQUUP7CUTDH X-Message-ID-Hash: A6WIWNNXJZSIV3H2ITOT6JQUUP7CUTDH 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 13/14] buildman: Refactor _handle_command() to use single return 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 Refactor _handle_command() to assign results to a variable and return at the end instead of having multiple return statements throughout. This improves readability and makes the control flow clearer. Also fix extra whitespace before 'size' and 'cpp' in endswith() calls. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 44ca2499b85..d784210446b 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -463,24 +463,23 @@ Idx Name Size VMA LMA File off Algn sys.exit(1) cmd = pipe_list[0][0] args = pipe_list[0][1:] - result = None if cmd == 'git': result = self._handle_command_git(args) elif cmd == './scripts/show-gnu-make': - return command.CommandResult(return_code=0, stdout='make') + result = command.CommandResult(return_code=0, stdout='make') elif cmd.endswith('nm'): - return self._handle_command_nm(args) + result = self._handle_command_nm(args) elif cmd.endswith('objdump'): - return self._handle_command_objdump(args) + result = self._handle_command_objdump(args) elif cmd.endswith('objcopy'): - return self._handle_command_objcopy(args) - elif cmd.endswith( 'size'): - return self._handle_command_size(args) - elif cmd.endswith( 'cpp'): - return self._handle_command_cpp(args) + result = self._handle_command_objcopy(args) + elif cmd.endswith('size'): + result = self._handle_command_size(args) + elif cmd.endswith('cpp'): + result = self._handle_command_cpp(args) elif cmd == 'gcc' and args[0] == '-E': - return self._handle_command_cpp(args[1:]) - if not result: + result = self._handle_command_cpp(args[1:]) + else: # Not handled, so abort print('unknown command', kwargs) sys.exit(1) From patchwork Sat Jan 10 23:56: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: 1486 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=1768089488; bh=fQhvgeRhi/lC9jdOsqnRrlIcRQMSof2Xi/ocYzN4a94=; 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=w0nQlYI8dYuWCJafGlC9igNcmrEBNvYP7p/V03/Q8F0X+PxOvKIB8o+Ho5V18yAFj 4w2QJg5CId4KIQnZPYIzfjvQYU6dAgA4o/8seohJYQeAq5N6O+X06urBhzDDpJddlb T+WM5Zdq6EcIP4Y9X4+4+YeymVAZoHxML+QEMwjaU2ztxaUf3dQTTxcHunDMQJdmeN qFAWXThZVwrGMIts9dUCwauujeCMBuZ9Lvjra8sH0KyqWMgbTd4+ALeBGx4Wwz1POx NgEMy7/CX//m/3j/qCbSp35ECJmy9KA0zdEzSD28mNc5hpSDy2Ag14gSq7yvEA1Iq7 7qbKDkohZkLAw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 05340692B9 for ; Sat, 10 Jan 2026 16:58:08 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ioOcjpbh1cwe for ; Sat, 10 Jan 2026 16:58:07 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089487; bh=fQhvgeRhi/lC9jdOsqnRrlIcRQMSof2Xi/ocYzN4a94=; 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=ibaUhaxl2RVmkN5Av1KYQgZwyEVopaA0AXpOUvXC1xFgoucuWjluag/O5z4ym3Miq cn1sBpDggVctCD1oh1GiWDLPjdJpzuAJLL/m/rsEhr9BL0E0H9W7Rzp3tzrD6Tdlsu ON6JAzPuXExmHOfuIpzhTYGRvyUr6cznW/0y0SXfExfU4Z8gOOCxhD9und39/rm4h2 4DLpgi2jRXh8EJqeIjRwy51MCUP9ohczVbMxg5ZLFxDcxqrejjgloEdL5BcxiFcNXW 8QBK50RQJEErIeIl4RwYbi3YzPVhflz96sutpsqRY4JNGHjLSJ1TbVF1UBRnWNYK0+ 9ohfQh2jIir0g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E837B692AE for ; Sat, 10 Jan 2026 16:58:07 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089486; bh=5MOODEWHM3RS9kkv0IH5JWFYekOLt1pxhQ8+ekWyXLE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JWpieEg2PQwmssIh+ZL+grZ8JU9xMnjj09K3wX/0NAJIcfxMZPgHXM10P+GQTpKux 6LoOMaj+zw9+88LmW9hFi0pfbHlgP2IC4ZM/rb735Jqvfz5d5Fz0LX364TsTj6o6ro MaMiBo4DyPuTD7ktsJYFuEG6CA7M2wAgJMg0PyioWtqO5BruQtBHOu4/eesjp3L8Ap 34qitaYuuGJHQ4DhpvcY2t/NrvbVz4NFrDF/m/4Sccw2555XuxjOQR4KtIsxd10Vvj F8sH3+swZPVt+7ulLk9R6adOL9HjVYefOEO87Tf7HeC/g9jf/aLv9QYNHbXaA/gdru 6O05Ia0Bt15MA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1A83669186; Sat, 10 Jan 2026 16:58:06 -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 dbVfczpaHmrv; Sat, 10 Jan 2026 16:58:06 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089482; bh=UXqOoZwh+s+SFsa93iRGSWoCqezA2wt0fZDlT5M3Yws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rozvI9nk52hmcf3kaS0cX/Wi+5aqqbivir91OXdKoTpu0/ppwZNEhBRtjldP5KOgO 37AkEO2xQoqqbQrdkvbr8xh64X+Sck3nWTtP9zqdpbuYfvxqksx4mV6QD9j1PkEK1i ASFZ/zLZExoUUSNFBzBebj2S0g2BG49t83UIcXrvGm0kq9wHZ/DGa3MWE+nLhlnXn0 PJtzNtV7GRjqN0+lNAaysVeolikVwjp94ie0X6t1fuJyufmX9kfQSYPJiFj2MQc4+c XeDVB+/nBsvQK4/xtC8p+m131LMtq0lQ6xrJzE9j3lx6u9INsLQj3SQbXGPZGDkH/t buKHEUu3d1vMA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id BC854692AE; Sat, 10 Jan 2026 16:58:01 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:27 -0700 Message-ID: <20260110235633.1064859-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: IQWWQPYBDRSIPNNKHRDYR64G3V7SA5S3 X-Message-ID-Hash: IQWWQPYBDRSIPNNKHRDYR64G3V7SA5S3 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 14/14] buildman: Suppress pylint warnings for test structure 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 Suppress warnings that are inherent to the test module structure: - too-many-lines: The functional test module necessarily contains many test methods and helper functions - too-many-instance-attributes: The test class requires many attributes for mocking and test state Splitting the module or class would reduce cohesion without improving maintainability. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index d784210446b..4a207bfb00c 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2014 Google, Inc # +# pylint: disable=too-many-lines """Functional tests for buildman @@ -180,6 +181,8 @@ Date: Fri Aug 22 15:57:39 2014 -0600 TEST_BRANCH = '__testbranch' + +# pylint: disable=too-many-instance-attributes disable=too-many-public-methods class TestFunctional(unittest.TestCase): """Functional test for buildman. @@ -443,7 +446,7 @@ Idx Name Size VMA LMA File off Algn print(line, file=buf) return command.CommandResult(stdout=buf.getvalue(), return_code=0) - def _handle_command(self, **kwargs): + def _handle_command(self, **kwargs): # pylint: disable=too-many-branches """Handle a command execution. The command is in kwargs['pipe-list'], as a list of pipes, each a @@ -488,7 +491,7 @@ Idx Name Size VMA LMA File off Algn result.stdout = len(result.stdout.splitlines()) return result - def _handle_make(self, commit, brd, stage, cwd, *args, **_kwargs): + def _handle_make(self, commit, brd, stage, cwd, *args, **_kwargs): # pylint: disable=too-many-branches """Handle execution of 'make' Args: @@ -715,7 +718,7 @@ Idx Name Size VMA LMA File off Algn self.assertEqual(captured_stderr.getvalue(), 'branch_error.c:456: error: branch failure\n') - def test_branch_summary(self): + def test_branch_summary(self): # pylint: disable=too-many-statements """Test building a branch and then showing a summary""" self._run_control('-b', TEST_BRANCH, '-o', self._output_dir) self.assertEqual(self._builder.count, self._total_builds) @@ -1205,7 +1208,7 @@ Active aarch64 armv8 - armltd total_compute board2 Path(os.path.join(config_dir, 'board0_defconfig')).unlink() self.assertFalse(boards.output_is_new(boards_cfg, config_dir, src)) - def test_maintainers(self): + def test_maintainers(self): # pylint: disable=too-many-statements """Test detecting boards without a MAINTAINERS entry""" src = self._git_dir main = os.path.join(src, 'boards', 'board0', 'MAINTAINERS')