Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BEF5C0015E for ; Sun, 16 Jul 2023 00:37:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 84F778627C; Sun, 16 Jul 2023 02:37:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="cQhHGl9T"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4143886272; Sun, 16 Jul 2023 02:37:27 +0200 (CEST) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4ACB7846EE for ; Sun, 16 Jul 2023 02:37:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-785d738d3feso71425639f.0 for ; Sat, 15 Jul 2023 17:37:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467843; x=1692059843; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QZ7WDJZd0H/RC9Z37Sm25q/gsDs5A3Da0bQtV3Ark6k=; b=cQhHGl9TjxgYAJSHgpxCWZ7Lvt0WZUlkueGuxIkxOH7d5wXL76Upghx5D9lRis/1Qw WeHuYSr7oqoDOVSvt0MfgIsVQTDpz0g7qlwa7djHJVvmFWJ06r+aeQbbo39cezbg/RHl OArtFvK8mByGDkmLkHD8FPlXyePGxp4Q/XNWk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467843; x=1692059843; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QZ7WDJZd0H/RC9Z37Sm25q/gsDs5A3Da0bQtV3Ark6k=; b=LmoO8+1PCqi2hSksYzDEgEkrY6qUCTK3IA300CqpfyvFEeG55suPwhtQBh8MJ3nWA9 uKfIWWz1SO43P+AoFYtZW9qBBpJhk3UOA6X+XUGuscGQoJZHXK2L5pCJcLL1bBHT7Y8J 9Wqf1FKwgzPppa7NAZnwPl0ZdS6W8m1ttuFISdhtPcWuF6TNL2YL8cFNUhPUUt2QbHJI 3bWHf/cQP8GXGqWfEEZKV6OfHfFDah7lcpbtjEo+UWPQ3H+y831Z50HOlKe9Pcoe4W7k 2vjBKVLBSqIlTzOgrCufxPWyRBw9kOrPAGA6b9gEU3baYXH8OPPzIOFyk2L8JZYxWcB8 /Azg== X-Gm-Message-State: ABy/qLafFr9J6hv6UzuzMOiJ+mr+rVnMxz9re3LF4V/6V8su86+wVw0l 1hsC9+W4wIKZOlX2BhZcFt1lSzMrALUS738W+nk= X-Google-Smtp-Source: APBJJlG9b4u8vlp0gL1lv6uuEIxPOoV28CzGhbj1tKwhiLjnsN+P9ckVKLVE6U5wltIPMejg8A3UQw== X-Received: by 2002:a6b:c9d1:0:b0:783:58f2:b8f2 with SMTP id z200-20020a6bc9d1000000b0078358f2b8f2mr4664821iof.6.1689467842820; Sat, 15 Jul 2023 17:37:22 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id t3-20020a05663801e300b0042b52dc77e3sm3510512jaq.158.2023.07.15.17.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:37:22 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 00/81] buildman: Refactor code and correct some pylint warnings Date: Sat, 15 Jul 2023 18:35:28 -0600 Message-ID: <20230716003718.231903-1-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.455.g037347b96a-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The buildman code has grown considerable since it was originally written. In places it can be quite hard to understanding and work with. This series improves things, particularly in the control and builder parts, splitting functions into smaller sizes. More work remains in buildthead._write_result() and other places. Changes in v3: - Add new patch to fix verboose typo and add comment - Add new patch to allow --debug to enable debugging - Add new patch to exit with the return code consistently - Add new patch to rename the ARM boards - Add new patch to drop dead code to handle :CONFIG_ construct - Add new patch to avoid globals in leaf functions - Add new patch with a test for Boards.scan_defconfigs() - Add new patch with a test for Boards.output_is_new() - Add new patch with a partial test for ensure_board_list() - Add new patch to tidy up common code in parse_file() - Add new patch to warn about dangling maintainer entries - Add new patch to refactor target handling in Boards.scan() - Add new patch to detect boards with multiple CONFIG_TARGETs defined - Add new patch to detect boards with no CONFIG_TARGET defined - Add new patch to correct operation of MAINTAINERS N: - Add new patch to display a single line for missing maintainers - Add new patch with an option to check maintainers - Use the new --maintainer-check option in CI - Add new patch to test for excluding things - Correct test failure when using incorrect variable - Fix 'scrop' typo - Add new patch to use -D for --debug - Add new patch with an option to check maintains and targets - Fix 'bulidman' typo in three patches Changes in v2: - Correct operation of -A - Use snake case for tests - Add new patch to print the architecture for a board - Drop patch to move -A logic up a little (since it breaks it) Simon Glass (81): buildman: Fix verboose typo and add comment buildman: Allow --debug to enable debugging buildman: Exit with the return code consistently buildman: Rename the ARM boards buildman: Drop dead code to handle :CONFIG_ construct buildman: Avoid globals in leaf functions buildman: Add a test for Boards.scan_defconfigs() buildman: Add a test for Boards.output_is_new() buildman: Add a partial test for ensure_board_list() buildman: Tidy up common code in parse_file() buildman: Warn about dangling maintainer entries buildman: Refactor target handling in Boards.scan() buildman: Detect boards with multiple CONFIG_TARGETs defined buildman: Detect boards with no CONFIG_TARGET defined buildman: Correct operation of MAINTAINERS N: buildman: Just display a single line for missing maintainers buildman: Add an option to check maintainers buildman: Provide an argument to the -R option buildman: Tidy up pylint warnings in main buildman: Convert camel case in control.py buildman: Fix most pylint warnings in control buildman: Move full-help processing to main buildman: Move series calculations into a separate function buildman: Move fetch-arch code into a separate function buildman: Add a test for the -A option buildman: Drop use of builder in show_actions() buildman: Move dry-run handling higher in do_buildman() buildman: Add tests for excluding things buildman: Move board-selection code into a function bulidman: Move more code to determine_series() buildman: Move Boards-object code into a function bulidman: Move toolchain handling to a function bulldman: Set up output_dir earlier buildman: Move output-file setup into one place buildman: Pass option values to get_action_summary() buildman: Pass option values to show_actions() buildman: Build option-adjusting into a function buildman: Move counting of commits into a function buildman: Move setting up the output dir into a function buildman: Move commit numbering into determine_series() buildman: Avoid too many returns in do_buildman() buildman: Move remaining builder properties to constructor buildman: Tweak commits and show_bloat buildman: Moving running of the builder into a function buildman: Drop some unnecessary variables buildman: Adjust show_toolchain_prefix() to not return buildman: Move checking for make into run_builder() buildman: Move getting the adjust_cfg into run_builder() buildman: Use get_alow_missing() directly to avoid var buildman: Create a function to get number of built commits buildman: Convert camel case in cmdline.py buildman: Correct most pylint warnings in cmdline buildman: Add a test for --boards buildman: Convert to argparse buildman: Convert camel case in bsettings.py buildman: Convert camel case in builder.py buildman: Split parser creation in two buildman: Convert camel case in builderthread.py buildman: Correct most pylint warnings in builderthread buildman: Export _get_output_dir() to avoid warnings buildman: Correct invalid use of out_dir variable buildman: Drop unnecessary assignment of config_out buildman: Start a function to set up the make arguments buildman: Move setting of toolchain arguments to _build_args() buildman: Move more things into _build_args() buildman: Convert config_out to string IO buildman: Move reconfigure code into its own function buildman: Move bulid code into its own function buildman: Move reading of the done file into a function buildman: Move code to remove old outputs buildman: Move code to decide output dirs buildman: Move checkout code to a separate function buildman: Create a function to handle config and build buildman: Avoid passing result into _read_done_file() buildman: Tidy up reporting of a toolchain error buildman: Tidy up some comments in builderthread buildman: Move copy_files() out ot BuilderThread class buildman: Add a way to print the architecture for a board buildman: Use -D for --debug buildman: Add an option to check maintainers and targets buildman: Enable test coverage .azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- tools/buildman/board.py | 6 +- tools/buildman/boards.py | 243 ++++-- tools/buildman/bsettings.py | 14 +- tools/buildman/builder.py | 262 +++--- tools/buildman/builderthread.py | 652 +++++++++------ tools/buildman/buildman.rst | 32 +- tools/buildman/cmdline.py | 180 ++-- tools/buildman/control.py | 790 ++++++++++++------ tools/buildman/func_test.py | 311 ++++++- tools/buildman/main.py | 71 +- tools/buildman/test.py | 28 +- tools/buildman/test/Kconfig | 72 ++ tools/buildman/test/boards/board0/MAINTAINERS | 5 + tools/buildman/test/boards/board2/MAINTAINERS | 5 + tools/buildman/test/configs/board0_defconfig | 1 + tools/buildman/test/configs/board2_defconfig | 1 + tools/buildman/toolchain.py | 14 +- tools/moveconfig.py | 2 +- tools/u_boot_pylib/test_util.py | 10 +- 21 files changed, 1840 insertions(+), 863 deletions(-) create mode 100644 tools/buildman/test/Kconfig create mode 100644 tools/buildman/test/boards/board0/MAINTAINERS create mode 100644 tools/buildman/test/boards/board2/MAINTAINERS create mode 100644 tools/buildman/test/configs/board0_defconfig create mode 100644 tools/buildman/test/configs/board2_defconfig -- 2.41.0.455.g037347b96a-goog