From patchwork Fri Jan 9 18:30:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1385 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=1767983528; bh=FlukVmOqe06x1nucbcK16XSnYPio2uHVE0kU+49lIoY=; 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=lnu2a8pPL6tmfmZwGBk44DtkJrThdkMKeJSBqLq6OD03Tk2kfZiNuLr3PdmICok/w 5prCQo1iWH07o/THfgygQYDip+QLsoG9Zme5yvdasw/pHi5t9XtuXrnWBhJRwopyl7 ZBMDZelwMveGmSIKDkwPcJTrXWg+Yzjpscd4lSGWEJPL6mVZUMmmDzeKFcDVNR2UlR jEc4GujTWBF3Nw7zHRezlvnby72/z+ehJ7py0QD8GaxFfelzmveHpy2gICqVLWIWAo vhiUeKKY0Ce0zBLQUoHiqMTSiBubRfu2it3rMAAaaBrFe9KWN04So8tlJ6r3tGeQBr SGLnFkX5iuSvA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7CF7269218 for ; Fri, 9 Jan 2026 11:32: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 0FQRyJtV_WRS for ; Fri, 9 Jan 2026 11:32:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983528; bh=FlukVmOqe06x1nucbcK16XSnYPio2uHVE0kU+49lIoY=; 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=lnu2a8pPL6tmfmZwGBk44DtkJrThdkMKeJSBqLq6OD03Tk2kfZiNuLr3PdmICok/w 5prCQo1iWH07o/THfgygQYDip+QLsoG9Zme5yvdasw/pHi5t9XtuXrnWBhJRwopyl7 ZBMDZelwMveGmSIKDkwPcJTrXWg+Yzjpscd4lSGWEJPL6mVZUMmmDzeKFcDVNR2UlR jEc4GujTWBF3Nw7zHRezlvnby72/z+ehJ7py0QD8GaxFfelzmveHpy2gICqVLWIWAo vhiUeKKY0Ce0zBLQUoHiqMTSiBubRfu2it3rMAAaaBrFe9KWN04So8tlJ6r3tGeQBr SGLnFkX5iuSvA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6BB9369211 for ; Fri, 9 Jan 2026 11:32:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983525; bh=Vl1BRl7RswciBTLgjdFQ3S49Ev8GY/YQwhtTTrEhRNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B5HKkue4J64UMmgYLNCOniLndI+eJV/PGX3XKaju2/kaw2zxqQHWBv15wlEAxABfh WiVp2p4Gzc0ZnxlK53kkQa75zftvW6AjGcNQ2Q6kao7EDQGczf/v+ijRMTfsFIo85k 0ltbzUzOBr3ynMPzcEUHc+QTg6gme7V3ZObydNEhVjNLUorBxR0eUXUiooN6VZyllW z+Y++IwZtGghryqColyT29w9I32fed7E+WKKlqFb2NBdKzah5qMrmS0ZrvIAb91AU8 V+TpUSdIR6Y7dRIQKPwk+zDKt72ODag1FoiPzNvvVNZa03rsVFMqXpmVU1Gl+GFafQ WbJ6HDZOxSPZg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9559F6920A; Fri, 9 Jan 2026 11:32:05 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id LU-f3NgbKjUi; Fri, 9 Jan 2026 11:32:05 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983521; bh=bSCnATkCAkicYDjWrNAnJq3p8+Mu6ZlELzWKaE/E3C0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DJWzdu/ViZ8X5HIomfjJAepZfCsHkgOzotxvdGfYAGTRxG/nLaPGi9nxoNYIUPccI hposs99X4wQy7AcDts/63ZBNiujXTZRspeRkA3/1U+NiHP9FeHOnu3Ow7afuCKEbGy uZJSvZWvV+pRroUaVy/FHAmVkFUnuxyHBsi0EJjnpRfU2pu8w3wqUHu+KdyhIp8cqY sUnwVOws4ZEA+sZT6FIHq43BMJCCOCbTUiJgsYBvxGrZIUepW49m5HL+o9x0Ls6fJS uncSHaLuSX+gcA9m63vosnZBi8Nol7waSQGlhzQO9v4n+wd4xdgT7PD8STqO+rhNIO 24tLFnxYFKcqA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 390B869209; Fri, 9 Jan 2026 11:32:01 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 9 Jan 2026 11:30:59 -0700 Message-ID: <20260109183116.3262115-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260109183116.3262115-1-sjg@u-boot.org> References: <20260109183116.3262115-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: CMLQ6LYKMT2QSXGPKYRUMD5GLINISXIT X-Message-ID-Hash: CMLQ6LYKMT2QSXGPKYRUMD5GLINISXIT 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: Heinrich Schuchardt , Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/18] buildman: Add a test for -E flag (warnings as errors) 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 testWarningsAsErrors() to verify the -E flag adds KCFLAGS=-Werror and HOSTCFLAGS=-Werror to make arguments. Also add infrastructure to capture make arguments for inspection by tests. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index b80779017b4..f224a80a3f9 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -482,6 +482,9 @@ Idx Name Size VMA LMA File off Algn kwargs: Arguments to pass to command.run_one() """ self._make_calls += 1 + # Capture args for tests that need to inspect them + if hasattr(self, '_captured_make_args') and stage == 'build': + self._captured_make_args.append(args) out_dir = '' for arg in args: if arg.startswith('O='): @@ -657,6 +660,21 @@ Some images are invalid''' self.assertIn('CONFIG_VALUE', text) # Value change self.assertIn('(no errors to report)', lines[-1].text) + def testWarningsAsErrors(self): + """Test the -E flag adds -Werror to make arguments""" + self._captured_make_args = [] + self._RunControl('-o', self._output_dir, '-E') + + # Check that at least one build had -Werror flags + found_werror = False + for args in self._captured_make_args: + args_str = ' '.join(args) + if 'KCFLAGS=-Werror' in args_str: + found_werror = True + self.assertIn('HOSTCFLAGS=-Werror', args_str) + break + self.assertTrue(found_werror, 'KCFLAGS=-Werror not found in make args') + def testCount(self): """Test building a specific number of commitst""" self._RunControl('-b', TEST_BRANCH, '-c2', '-o', self._output_dir)