From patchwork Fri Jan 9 18:30:52 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 94 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=1767983493; bh=C4KX0ANhJAh5X4qNszuD22X3DZzX57EpLX69Pr3RoOA=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=dJd1iPVmFoQSmXRvMTI9SveYW5ElwzUOcmMxM8fMQyMHCDBMMkAuSCHeQOfJE9Igy a58U306rgBW66tO/7R/wl6LYCyx1NfXb4qHFeFPX9BUGPTj2vI8DIZlIAZj+WcXZ5i ZMfcdbEuYZwVr0UqhgxQPzvwPkV0DNmFRxK21TEDIlVri9Azj5Np3CdsmNiB7vkgvo ZkVqvT8h+nGjh6g/VJhewnLMPe0h8TNCYTAu/lOST/b3XdG4wCid5JPA52EQvK8p3T tTaw+cIUwVJXjhN/hc0IX7+LeLwjL0WIePLC1RmCTHrLS07Fj9laW9LtobrXQmjcxp ca0iynKkhPQuQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4CEB669218 for ; Fri, 9 Jan 2026 11:31: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 10024) with ESMTP id p1QFRo5U6DIB for ; Fri, 9 Jan 2026 11:31:33 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983493; bh=C4KX0ANhJAh5X4qNszuD22X3DZzX57EpLX69Pr3RoOA=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=dJd1iPVmFoQSmXRvMTI9SveYW5ElwzUOcmMxM8fMQyMHCDBMMkAuSCHeQOfJE9Igy a58U306rgBW66tO/7R/wl6LYCyx1NfXb4qHFeFPX9BUGPTj2vI8DIZlIAZj+WcXZ5i ZMfcdbEuYZwVr0UqhgxQPzvwPkV0DNmFRxK21TEDIlVri9Azj5Np3CdsmNiB7vkgvo ZkVqvT8h+nGjh6g/VJhewnLMPe0h8TNCYTAu/lOST/b3XdG4wCid5JPA52EQvK8p3T tTaw+cIUwVJXjhN/hc0IX7+LeLwjL0WIePLC1RmCTHrLS07Fj9laW9LtobrXQmjcxp ca0iynKkhPQuQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3A5FC6920C for ; Fri, 9 Jan 2026 11:31:33 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983491; bh=w7BalzhOstLPIx+jONcRTN66grtZuhwg5soa9q7HzrI=; h=From:To:Cc:Subject:Date:From; b=nuKglSna/Ewl78VrhscN3gG/dX7YM2h2IdtlN3qhuM6pyZN8f92AarFk5xIFkx3Rn 8tndDXwVz3ghLFlpVAxfsB7wf1S8Mv7TMucAIKbJmDfyTbBgtv0OTQs1wFjL3haWge 2jhUMSEJO+ArhbUoYRF8aspQ8ozAghaBDP6gAPmRlbgbG5mQngN5jAOWtgLZ760f/i deZg/GDDs29iTG5XQFB7Rs2WDkHNhd+DNcyH7WtP5bNqgdVgmSastHetVVUpQ/4RJo 1TftM7Dzgiuoff5eI8IBeT9PT3FQxP/GNVRurAJWoI1H4FMvzr+LtOTSfsaUq0BTjQ NOqq05UR6h2Aw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5FC1F6920A; Fri, 9 Jan 2026 11:31: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 10026) with ESMTP id 1MsQ1in9DykA; Fri, 9 Jan 2026 11:31:31 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983487; bh=2mcgwwGlBPPs/iUqr9VUsYgUvzp0wynGTB0lxZEqKEM=; h=From:To:Cc:Subject:Date:From; b=eavlkta7rcI4QrRi9sF0mrRQd8ap9QMXjkBzj+Git6tdbNMX9F/xhCZ0vUdvOKEEP qwTC9tfeaEYM+UmFLnXzk2zmUZMUtJ9WvMOo48mgfBHSM8CzN4T4f8/typj8rafwnY aMWIFh/ErUtKz1sZ7kxJ6wB/bEPw+PJW2WUCwZBD6GYi5tCmp8RhAxwuITS6CbtMC+ v0gBXeFAPdoWNsM0cqawG1JEe5PKHaw2TYNZH+bYRHytFWaoG36sig61o3KI1AJv6u uvMneVfaswu2zEDx5Y7vFeM6rSZTJ1kRt1yVdCgo+9BJVxvbLxORxAO7UuUBAaZvOD 0k2pF+BI7InEg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id C299669209; Fri, 9 Jan 2026 11:31:26 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 9 Jan 2026 11:30:52 -0700 Message-ID: <20260109183116.3262115-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: 2V3CIUZPOERS6JWX6TML3FN6U247S7EF X-Message-ID-Hash: 2V3CIUZPOERS6JWX6TML3FN6U247S7EF 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/18] buildman: Improve test coverage for builder.py List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass This series improves the test coverage for builder.py from 11% to 97% by adding unit tests for various functions. It extracts several functions to make them more testable: - _print_build_summary() from build_boards() - _check_output_for_loop() from make() It also fixes a bug in _calc_config_changes() where value changes in existing config options are not detected. New unit tests cover: - Function size detail output (bloat-o-meter style) - Thread preparation and working space setup - Output space management and cleanup - Build loop detection in make output - The make() method execution flow - Build summary message formatting - Detection of boards not built due to missing toolchains Functional tests are added for -K, -E, -U flags, IDE mode output, branch summary display, and toolchain error reporting. Simon Glass (18): buildman: Add missing return documentation in builder.py buildman: Add tests for builder helper functions buildman: Add test for branch summary display buildman: Add unit tests for print_func_size_detail() buildman: Add test for -K flag (show config changes) buildman: Fix config value change detection buildman: Add a test for -E flag (warnings as errors) buildman: Add test for -U flag (show environment changes) buildman: Add test for IDE mode output buildman: Add unit tests for _prepare_thread() buildman: Add unit tests for _prepare_working_space() buildman: Add unit tests for _prepare_output_space() buildman: Test _show_not_built() and toolchain errors buildman: Detect toolchain errors in _show_not_built() buildman: Add unit tests for _check_output_for_loop() buildman: Add unit tests for make() buildman: Extract _print_build_summary() from build_boards() buildman: Add unit tests for _print_build_summary() tools/buildman/builder.py | 158 ++++-- tools/buildman/func_test.py | 257 +++++++++- tools/buildman/main.py | 12 +- tools/buildman/test.py | 185 +++++++ tools/buildman/test_builder.py | 854 +++++++++++++++++++++++++++++++++ 5 files changed, 1411 insertions(+), 55 deletions(-) create mode 100644 tools/buildman/test_builder.py