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 04F3DC001DF for ; Sun, 16 Jul 2023 00:46:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BF168866C8; Sun, 16 Jul 2023 02:40:12 +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="N7JaRzpf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E8CFA86609; Sun, 16 Jul 2023 02:38:20 +0200 (CEST) Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (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 C6680863EC for ; Sun, 16 Jul 2023 02:38:01 +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-il1-x129.google.com with SMTP id e9e14a558f8ab-345ff33d286so16159025ab.3 for ; Sat, 15 Jul 2023 17:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467880; x=1692059880; 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=4VtPw1KxUXo17ltduCDVkD35QQ8KFl5M7e1owxpYdiI=; b=N7JaRzpf/QEAOxeME9lyWs51QzJzo4OPAwrxdSWZceu/hGg1JM9Czo9vLSpBpxiRNI 0zKkxWoUg4eawlC7iSgsciNwr8Y0oX1We9s5opwiYL3WVkRx3Y5kkX7yF8YAOH04tCPL aFPq316/emdU3jscJixdI3KonvhKEdi7ayvrY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467880; x=1692059880; 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=4VtPw1KxUXo17ltduCDVkD35QQ8KFl5M7e1owxpYdiI=; b=UsT07HoBO8sccn78mhSvKYX6t3QSNb+PH9z2lCsYGI0JxHTHupEJZEHjsDZGGsV3Bz antZX5SVdBUFWTmHtR9vR268aVThO0x3PtJs8gpP2WBEo8QX6f3bLumLMbCc8iLz+EVs 8kH3+lDOw1kIKTS2dgcbuB8IQLl4+jUur2YOxdU+A/rXqxQV9sq/pTYJOArEq6uFMhUL IzT4UnaCsn8sUYL6Xsz7l+XPiGpF3tQMYR7s3wkBGFGMxb9oNUUt3HtjKCj2sfiQn+sX Uq+ckFSKp+eMSKLkx5Kp9GlR8pdOhjGLKxh/dECeFxkyTxYK2FykGrtp/2fSeq5OV79l SNdQ== X-Gm-Message-State: ABy/qLYml1mBcia2e8L39mc4mfa5wxBlAlflela5DeFriSI99nh5vjDH m6hgEcJ+JQlE+eP6AJorJme/pnVmh30p5kPcXic= X-Google-Smtp-Source: APBJJlH8i7izT1RWdqvdYPVuRoMQuL2YHCqLlt2Y1jbU9zuWpyLjhctZ5dlm90vlUfxhP2TS3fvbaA== X-Received: by 2002:a05:6e02:1648:b0:348:7d72:f474 with SMTP id v8-20020a056e02164800b003487d72f474mr1951578ilu.13.1689467880339; Sat, 15 Jul 2023 17:38:00 -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.38.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:38:00 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 53/81] buildman: Add a test for --boards Date: Sat, 15 Jul 2023 18:36:21 -0600 Message-ID: <20230716003718.231903-54-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.455.g037347b96a-goog In-Reply-To: <20230716003718.231903-1-sjg@chromium.org> References: <20230716003718.231903-1-sjg@chromium.org> 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 Add a simple functional test for the --boards option. Fix the example in the docs while we are here. Also improve the docs for Builder.count so it is clearer what it contains. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Use snake case for tests tools/buildman/builder.py | 3 ++- tools/buildman/buildman.rst | 2 +- tools/buildman/func_test.py | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index cb3628a8a085..620b7b8c31a8 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -163,7 +163,8 @@ class Builder: checkout: True to check out source, False to skip that step. This is used for testing. col: terminal.Color() object - count: Number of commits to build + count: Total number of commits to build, which is the number of commits + multiplied by the number of boards do_make: Method to call to invoke Make fail: Number of builds that failed due to error force_build: Force building even if a build already exists diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index 709519e9ecdc..8295487dd423 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -159,7 +159,7 @@ on the command line: .. code-block:: bash - buildman --boards sandbox,snow --boards + buildman --boards sandbox,snow --boards firefly-rk3399 It is convenient to use the -n option to see what will be built based on the subset given. Use -v as well to get an actual list of boards. diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 5d4956c6a10c..afcbcaa54a18 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -1030,3 +1030,14 @@ endif self._RunControl('-x', 'board2', '-x' 'board4') self.assertEqual(['board0', 'board1'], [b.target for b in self._boards.get_selected()]) + + def test_single_boards(self): + """Test building single boards""" + self._RunControl('--boards', 'board1') + self.assertEqual(1, self._builder.count) + + self._RunControl('--boards', 'board1', '--boards', 'board2') + self.assertEqual(2, self._builder.count) + + self._RunControl('--boards', 'board1,board2', '--boards', 'board4') + self.assertEqual(3, self._builder.count) -- 2.41.0.455.g037347b96a-goog