From patchwork Fri Jan 9 18:31:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1386 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=1767983533; bh=AH37gtb0WnuJzMYNadIzT0aWbJEhBSQBcg7aeq8U4gI=; 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=VwH8z6O4983gHOszUFnc4P80zt95wzxDEOYxOvnAVZwa/SbQRTNm2IwvFVPyTcC/8 b5IVZx/W7dMJtLJqvBCr1Ar+PZEsCz3aLSI8M4vbMSobuNvp+Se+JJHBpVJKPi+1Cg K5AON6GPLEGYE6flbXmr2/Nfue1ej8RL1aky8+FRh8f7w9YFC+g+z7j/+icfMVfa4E r66rc+OFg5wB1kmh2jks6ThiVgo+xA0sF8yLPLb6CbuurSmA5WOsquWFd6ktUcUcC+ ifIrOsrv9D3pLmoZEGrblWi0K1cBLaj7FeyEqHqw1l59T3/QpiZPsKHlWfRZSKAFMF GiuUBZyu0w/vg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 028ED69209 for ; Fri, 9 Jan 2026 11:32:13 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id fPqqsiAlcXDL for ; Fri, 9 Jan 2026 11:32:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983532; bh=AH37gtb0WnuJzMYNadIzT0aWbJEhBSQBcg7aeq8U4gI=; 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=P0WdSofJEhR8XulnPEbzjUFt9Lxj6zztQ6UzMqCtFtELInGo41E0vBBE2mh/0ER+Z ygoT09OEdsb3FbsCHjiUgdeZJ7zbLePqWwZ8Gzez+rUiA8w10hRRUhjJPRIywyFivl cF+qR2OAXu42icV5szlJRJhPkMqZPhxoeTza1pebQBYkP/quqsIq6CcOqfUTObYmyG d6TqGLPQ12h/i3Sh58R5PwJcoHn/RHEU/7vpsfDVU8xTAYwA7+Y0GTXtNrvEp7JW+s OtnwNYPNXsVAjmUciQIVNvPa6DnNgOVb+KrAsyV4RBWs0vAUe2qOR7VfyAZ7qRgop2 6ZfITBZ++BOhQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E3F3369211 for ; Fri, 9 Jan 2026 11:32:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983530; bh=nvkcly0XO8HGrz+pyN0ga6GeLpe0gweYe2F7f+UIAvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=am5neUitXva9Ez38zgBGhRtAVjxatL7dnYTFLk2uOsYAfdbN4nX92+PdncIbpZclY 4skmr64RvRgFNdDfjMPH0/4KWyu+11dmLLc+OAoiYpEgG4DwtbwRFS4Oq8nNt97h2e ULz8dPEgnZFQCMjcjN8qn7yfoJJLQ8+0wC/J00iNC6wNtMlfqJ36jUjD4OfYS0BRpJ mZmXO7f6qt2GOb27dQv8yyRmZPnGPqNxxQfnB26aWvZOAzM6IKTVh85UsmW28Jayd0 IzxdXzVtoPMr6altjDngzjDt1zclbnp93t93AwOEzIOz9lupLhmk1k8i5J2RejFX+g dIncoWiLfos8A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DF53669211; Fri, 9 Jan 2026 11:32: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 snwon_H0LzjR; Fri, 9 Jan 2026 11:32:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983526; bh=Peo3gBPwaLNBgbEXrWUOPA6ZNIZAySmZl86Jf0V4TEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NlikL7bsoJn49TP1z2wuWXJVc16I4fCSydb6oQD6+9VwbSRtuS+2FLoQcf23jAodW xcK/gtpwLhWK0xcUQ6CaetRGXNNqrWOIiOBYAvlH64y87I6YZTTpQRGqxHnxkf7+PM dUV8lVsU34E1aka7XRLAmWAoGkYmrpiHWbegluAUaa5SWVpaKdV4kzP+f9oBtEMlL3 nZJTZSNNp28a6Ocr7lAcVN9g6y58h63o4sUC/xq48XtC+gQrxuiBSUhLoXcNfjLjVq RSG2TKCJc4TF13rTDNcRLfG8kdkpeRXhzA+GR8kFzRmyE/FJJecn5tLR7shSpoK63t rokg0Lr/8EWAg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D358969209; Fri, 9 Jan 2026 11:32:05 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 9 Jan 2026 11:31:00 -0700 Message-ID: <20260109183116.3262115-9-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: JYZFCT53KV75SJBOYULS4PVYICORUY7D X-Message-ID-Hash: JYZFCT53KV75SJBOYULS4PVYICORUY7D 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 08/18] buildman: Add test for -U flag (show environment changes) 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 Extend testBranchSummary() to test the -U flag which shows environment variable changes between commits. Create uboot.env files with varying content in each commit's output directory to simulate environment changes. This improves coverage of the environment change display code in builder.py including _show_environment_changes() and related functions. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index f224a80a3f9..0ee52d16703 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -660,6 +660,32 @@ Some images are invalid''' self.assertIn('CONFIG_VALUE', text) # Value change self.assertIn('(no errors to report)', lines[-1].text) + # Now run with -U to show environment changes + # Create uboot.env files with varying content between commits + for commit_num in range(self._commits): + for brd in BOARDS: + target = brd[6] # target name is 7th element + board_dir = self._builder.get_build_dir(commit_num, target) + env_fname = os.path.join(board_dir, 'uboot.env') + # Environment uses null-terminated strings + env_content = f'bootdelay={commit_num + 1}\x00' + if commit_num == 0: + # Add a variable that will be removed in later commits + env_content += 'oldvar=removed\x00' + if commit_num > 0: + env_content += 'newvar=value\x00' + tools.write_file(env_fname, env_content.encode('utf-8')) + + self._make_calls = 0 + self._RunControl('-b', TEST_BRANCH, '-sU', '-o', self._output_dir, + clean_dir=False) + self.assertEqual(self._make_calls, 0) + lines = terminal.get_print_test_lines() + text = '\n'.join(line.text for line in lines) + # Check environment variables appear in the output + self.assertIn('bootdelay', text) + 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 = []