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 87239C001DC for ; Wed, 19 Jul 2023 23:58:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4C6158688D; Thu, 20 Jul 2023 01:52:25 +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="YIHqtK4h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9908F867A4; Thu, 20 Jul 2023 01:50:49 +0200 (CEST) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (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 846E086772 for ; Thu, 20 Jul 2023 01:50:41 +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-xd33.google.com with SMTP id ca18e2360f4ac-78372625badso8535439f.3 for ; Wed, 19 Jul 2023 16:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689810640; x=1690415440; 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=ipT5u/FaDlY2vCktoQu3rgZtYl90WbLixJQkBag3tWo=; b=YIHqtK4hyKOE6lVkYOVZTkKpsDV1VFcnE6Txt12xdC9i3/+fFbw2fQHJ24hNVmn1nB gWq2y32eyxbT3KJEhZt1VHmO67MdzxGt+qFt8KQNMn/2wEj7RI1plPOOmVqk/6G94+cb T2NDjmTVbAiGCsFtzjSOOnB1PmUdYLxv5K46g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689810640; x=1690415440; 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=ipT5u/FaDlY2vCktoQu3rgZtYl90WbLixJQkBag3tWo=; b=f6rtTmNWOucbskXwTDUv/JM98IRt0V8LMCQvdEDvJfbg2Hay0vcQgkrDPvWT80EOjQ 8ENVNeVtIZGY27/zCLsMlYglKZxg3rnvI4p4OLiO/gHv3bgH15gPh39HTZ96zzkEO0Yh T0yEDQlmh0vgyfoW1NAEdM1C40p/SXgcPHX3XmJAJrfS7IwDGvxO/jTR9sQ1HDirwAht IVt3N4a6HzL/tye+ElS0Cr3BFA1n4NWffAakB23kq0EuMlwRrVs4sOdtrCyiCHIajol6 81/DvOB6IbDHy/OOFlHgYUzg4FBTWoUQwM0BR7aoQQrFkJwlt8u20/g1OwRZzsJvMZ8V cStQ== X-Gm-Message-State: ABy/qLagikjFHOd3E8+cakd7cQHLCnyMFKfWDyfBECS1yg1ZuG3c7mRf oZilt/bhzEVjbdEy3/PurdIOOuflbAZgkNJQebo= X-Google-Smtp-Source: APBJJlEnSfwABQyrWzcvqOMyhOvokOoYd4biAcUSi5HHVGDA+rz1Mm41kkREhjCZldivfcZKMnzKTA== X-Received: by 2002:a05:6602:42cd:b0:786:2878:9593 with SMTP id ce13-20020a05660242cd00b0078628789593mr3875644iob.0.1689810640144; Wed, 19 Jul 2023 16:50:40 -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 ed16-20020a056638291000b0042bb1779c18sm1551779jab.151.2023.07.19.16.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 16:50:39 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v4 55/83] buildman: Add a test for --boards Date: Wed, 19 Jul 2023 17:49:03 -0600 Message-ID: <20230719234953.796101-56-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230719234953.796101-1-sjg@chromium.org> References: <20230719234953.796101-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 6b6afe7d1c0b..aaf4cde91eec 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -1047,3 +1047,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.487.g6d72f3e995-goog