From patchwork Mon Jan 23 12:38:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 718540 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3v6W8d036Kz9s3v for ; Mon, 23 Jan 2017 23:39:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="lvgXeBoC"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7AB144A9D6; Mon, 23 Jan 2017 13:39:11 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n10S3mmfiams; Mon, 23 Jan 2017 13:39:11 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E1CDE4A078; Mon, 23 Jan 2017 13:39:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 831764A078 for ; Mon, 23 Jan 2017 13:39:05 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cs7GjfZF97D0 for ; Mon, 23 Jan 2017 13:39:05 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ot0-f176.google.com (mail-ot0-f176.google.com [74.125.82.176]) by theia.denx.de (Postfix) with ESMTPS id 1D9FB4A05E for ; Mon, 23 Jan 2017 13:39:01 +0100 (CET) Received: by mail-ot0-f176.google.com with SMTP id 73so101304349otj.0 for ; Mon, 23 Jan 2017 04:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=nsmp3ic/AyrbTyhIdrFXQ5A2xKFXyE9KXxfn5MoNx0g=; b=lvgXeBoC0dKyF7N/LUp1Bpn+f9OEoOa07+JYy4cwo/9TT2gSK1Xz6Rovdc4rcscgic KNIB0ON3ReEJYNbL07Vk9gMibjErHmClgxc14FGF47s2XYtIlxPCFt+jBYWzLO2S2FsN ImgLQaAQAvMG0VPt0utzf8ONKrbeThgO6unFcNslv+2IELy2UNVLjTc7E7ugt3KAHFX9 RJY1pqHvZDlQQVB70RwZLkxxALcFbnaiEIzZusNfXOO5gv7zTkVWL3tAaxH4T1aT/WkY z9k4OPO3utx2K515mOdn/veHg/tUJMMhhMgVj2QtzaDnknvHFmPoKKiPGQWoGSfec8jr 4ryg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=nsmp3ic/AyrbTyhIdrFXQ5A2xKFXyE9KXxfn5MoNx0g=; b=aQ2PhPQ9Xlv38d+CgEpcxbw3SP/DU7Yti9W9wRIv5i0+wqC4tId/jK9hNwYLJ/OKch rmMbMi5hKxZp2o8+aod/Su/Ko9KeUcpOCZwccWBuMb8C90VuXHk+nLvz7BU8pIL73aaQ beNDB6Y8hFbouDVqUuGLWPU6AXVzaweV2nP1CvNzj8AvcmGw/GJcC3SIBoXJ3V7+kAQG pwb/4VDTQTV6ceifN0+LqE9dA/D5N0SdIxjAi9usV3MfnQXVDCgAdoOPF0ZSskzddsWi lfdlgfNiDDDTgVLbNne0kMtfisgLjCixyEliwfv+e66rKHrQQvgadfpNzDBSQIWBmNwu BJjQ== X-Gm-Message-State: AIkVDXJSC5Zn9LiXtk/quWz1TdIirwQ0C+AbBIzePMu/vawdAO9dJREu/QFxgwprOp8DvS4M X-Received: by 10.157.15.144 with SMTP id d16mr12431668otd.169.1485175139960; Mon, 23 Jan 2017 04:38:59 -0800 (PST) Received: from kaki.bld.corp.google.com ([100.100.197.46]) by smtp.gmail.com with ESMTPSA id r94sm8433477ota.33.2017.01.23.04.38.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jan 2017 04:38:59 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id D7C3D40486; Mon, 23 Jan 2017 05:38:58 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Mon, 23 Jan 2017 05:38:56 -0700 Message-Id: <20170123123857.1421-1-sjg@chromium.org> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog Subject: [U-Boot] [PATCH] buildman: Allow showing the list of boards with -n X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" As well as showing the number of boards, allow showing the actual list of boards that would be built, if -v is provided. Signed-off-by: Simon Glass --- tools/buildman/README | 2 +- tools/buildman/board.py | 10 +++++----- tools/buildman/control.py | 19 +++++++++++-------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/tools/buildman/README b/tools/buildman/README index 62ab7b7441c..f58957e1d5f 100644 --- a/tools/buildman/README +++ b/tools/buildman/README @@ -141,7 +141,7 @@ means to build all arm boards except nvidia, freescale and anything ending with 'ball'. It is convenient to use the -n option to see what will be built based on -the subset given. +the subset given. Use -v as well to get an actual list of boards. Buildman does not store intermediate object files. It optionally copies the binary output into a directory when a build is successful. Size diff --git a/tools/buildman/board.py b/tools/buildman/board.py index ae0e0b8e171..f842d3a1fa1 100644 --- a/tools/buildman/board.py +++ b/tools/buildman/board.py @@ -249,15 +249,15 @@ class Boards: exclude: List of boards to exclude, regardless of 'args' Returns: - Dictionary which holds the number of boards which were selected + Dictionary which holds the list of boards which were selected due to each argument, arranged by argument. """ result = {} terms = self._BuildTerms(args) - result['all'] = 0 + result['all'] = [] for term in terms: - result[str(term)] = 0 + result[str(term)] = [] exclude_list = [] for expr in exclude: @@ -285,7 +285,7 @@ class Boards: if build_it: board.build_it = True if matching_term: - result[matching_term] += 1 - result['all'] += 1 + result[matching_term].append(board.target) + result['all'].append(board.target) return result diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 545c2cb44a1..73b1a14fb6b 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -48,9 +48,9 @@ def ShowActions(series, why_selected, boards_selected, builder, options): Args: series: Series object why_selected: Dictionary where each key is a buildman argument - provided by the user, and the value is the boards brought - in by that argument. For example, 'arm' might bring in - 400 boards, so in this case the key would be 'arm' and + provided by the user, and the value is the list of boards + brought in by that argument. For example, 'arm' might bring + in 400 boards, so in this case the key would be 'arm' and the value would be a list of board names. boards_selected: Dict of selected boards, key is target name, value is Board object @@ -75,9 +75,11 @@ def ShowActions(series, why_selected, boards_selected, builder, options): print for arg in why_selected: if arg != 'all': - print arg, ': %d boards' % why_selected[arg] + print arg, ': %d boards' % len(why_selected[arg]) + if options.verbose: + print ' %s' % ' '.join(why_selected[arg]) print ('Total boards to build for each commit: %d\n' % - why_selected['all']) + len(why_selected['all'])) def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, clean_dir=False): @@ -221,9 +223,10 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, options.git_dir, count, series=None, allow_overwrite=True) else: series = None - options.verbose = True - if not options.summary: - options.show_errors = True + if not options.dry_run: + options.verbose = True + if not options.summary: + options.show_errors = True # By default we have one thread per CPU. But if there are not enough jobs # we can have fewer threads and use a high '-j' value for make.