From patchwork Sun Jul 2 14:25:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1802339 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=hn09NLIb; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QvBKL3bB1z20Pj for ; Mon, 3 Jul 2023 00:29:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AC472866A7; Sun, 2 Jul 2023 16:27:45 +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="hn09NLIb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9273A865C1; Sun, 2 Jul 2023 16:27:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 A53BF8638A for ; Sun, 2 Jul 2023 16:27:23 +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-xd2d.google.com with SMTP id ca18e2360f4ac-78372b896d0so144903339f.2 for ; Sun, 02 Jul 2023 07:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1688308042; x=1690900042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1vBrRKUrqOxwpD96aDNDljL9cI1E6ElDm9Lk+9P2kik=; b=hn09NLIbnLFBu/qY8e9fUuEptKmnPH6WUqb4Nwa6KhFFg3TS1oCOgwScrpSIpB1UV4 hQhGwrDa7jNNQMcSW02py/S6qmAFuEfagTD2xNxmL3vcTnrx7AY/WbUvdwMPzqJQirVw T/2NJ8v87TpSjIHKTPS1GsYPNoXqBh5ZHHLww= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688308042; x=1690900042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1vBrRKUrqOxwpD96aDNDljL9cI1E6ElDm9Lk+9P2kik=; b=ZWupM74wexWS8YLBIHvtB8pNppMFhBPvPhxIJBXZPZ99Iw5pCUUHL0AhSf+jBecmNh nUt/SpmSUt/KHjDT2rl9dBzVrr7PMZK5qrDO3q/7uMS5oktSPk2M7mlTNtc19cfv3Vkl 06uaRJtVatSzR6oLRrmEdSmBGw0WFxN5/O7kWeLPDAFJHvV07rj29u4m+Nh2q8jBOpb+ ETAkbrC6dAMOSBIJZ3NO7mchwcNMoYFUV6pphUv+cdhQ7UeFMFAPITQApBaas4uu/Jih o2cUp/Zr+dKCumYInvf2e8K4JZpgi+z8FaUwGTqzNTOUUbsnPdDOfenYFVstnqpB0qlW zBqw== X-Gm-Message-State: ABy/qLY2N8YZpvoT88h/FqNl+Ca4J+GrrzdUAa1EWa6WUkbYpPNDyqAF gqstNu2htO7xkUxIm3q82A6G2/UYoCD07y8fOnQ= X-Google-Smtp-Source: APBJJlH7jHIA+N6RmxzLQGuBPyvEln7HyDQaz6Bg6X1CECTvaBUoAvRFQvU0uqcBJlZTzgQjcvwsoA== X-Received: by 2002:a92:d349:0:b0:345:b53b:de98 with SMTP id a9-20020a92d349000000b00345b53bde98mr7713253ilh.26.1688308042212; Sun, 02 Jul 2023 07:27: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 c13-20020a02c9cd000000b0042af5268e4asm2934713jap.58.2023.07.02.07.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jul 2023 07:27:22 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass Subject: [PATCH 17/58] buildman: Pass option values to show_actions() Date: Sun, 2 Jul 2023 15:25:42 +0100 Message-ID: <20230702142639.1249681-18-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.255.g8b1d071c50-goog In-Reply-To: <20230702142639.1249681-1-sjg@chromium.org> References: <20230702142639.1249681-1-sjg@chromium.org> MIME-Version: 1.0 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 Pass in the individual values rather than the whole options object, so we can see what is needed. Signed-off-by: Simon Glass --- tools/buildman/control.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 07c9921b9e7f..b15ab8270e9d 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -56,8 +56,8 @@ def get_action_summary(is_summary, commits, selected, step, threads, jobs): return msg # pylint: disable=R0913 -def show_actions(series, why_selected, boards_selected, output_dir, options, - board_warnings): +def show_actions(series, why_selected, boards_selected, output_dir, + board_warnings, step, threads, jobs, verbose): """Display a list of actions that we would take, if not a dry run. Args: @@ -70,8 +70,11 @@ def show_actions(series, why_selected, boards_selected, output_dir, options, boards_selected: Dict of selected boards, key is target name, value is Board object output_dir (str): Output directory for builder - options: Command line options object board_warnings: List of warnings obtained from board selected + step (int): Step increment through commits + threads (int): Number of processor threads being used + jobs (int): Number of jobs to build at once + verbose (bool): True to indicate why each board was selected """ col = terminal.Color() print('Dry run, so not doing much. But I would do this:') @@ -80,11 +83,11 @@ def show_actions(series, why_selected, boards_selected, output_dir, options, commits = series.commits else: commits = None - print(get_action_summary(False, commits, boards_selected, - options.step, options.threads, options.jobs)) + print(get_action_summary(False, commits, boards_selected, step, threads, + jobs)) print(f'Build directory: {output_dir}') if commits: - for upto in range(0, len(series.commits), options.step): + for upto in range(0, len(series.commits), step): commit = series.commits[upto] print(' ', col.build(col.YELLOW, commit.hash[:8], bright=False), end=' ') print(commit.subject) @@ -92,7 +95,7 @@ def show_actions(series, why_selected, boards_selected, output_dir, options, for arg in why_selected: if arg != 'all': print(arg, f': {len(why_selected[arg])} boards') - if options.verbose: + if verbose: print(f" {' '.join(why_selected[arg])}") print('Total boards to build for each ' f"commit: {len(why_selected['all'])}\n") @@ -470,8 +473,9 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None, # For a dry run, just show our actions as a sanity check if options.dry_run: - show_actions(series, why_selected, selected, output_dir, options, - board_warnings) + show_actions(series, why_selected, selected, output_dir, board_warnings, + options.step, options.threads, options.jobs, + options.verbose) return 0 adjust_cfg = cfgutil.convert_list_to_dict(options.adjust_cfg)