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 7AF79C001B0 for ; Wed, 19 Jul 2023 23:55:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D3EEA86829; Thu, 20 Jul 2023 01:51:19 +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="C2eQqB4i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35F0E867D9; Thu, 20 Jul 2023 01:50:29 +0200 (CEST) Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (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 4D4798679F for ; Thu, 20 Jul 2023 01:50: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-xd35.google.com with SMTP id ca18e2360f4ac-7836164a08aso8430439f.1 for ; Wed, 19 Jul 2023 16:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689810622; x=1690415422; 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=t4Tx8G/7N+ToJHHJwgkZM8NIDyNvVSdfSuS8QOqWsuA=; b=C2eQqB4ihVzvDUoyDEcp26eXGVcOs3p0T5BSDQatdCsR5NK+b/ZzHL4i7Pq2REP+Z+ WrTL9pG5JTEV/01hnG3nMAhLqHWYGqz/tbwO9Rts4s7IlNcCCerVXwNJKZEMUimgq0Q7 hqBJljoWms9NO/IbJr5KRnrYB3PUIVq1EFgHA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689810622; x=1690415422; 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=t4Tx8G/7N+ToJHHJwgkZM8NIDyNvVSdfSuS8QOqWsuA=; b=mEdGtKY0jHFhXI1Cuywg5Sm8hMec/yXaL6XYxK1VyaYgrN/3wi4egt0xleyUKr2Vts RpMnOfeWYwjvovAGXXVdFe+b4Ug4XdeEPA/3NJgGIrCQ7AXKtFV52ePx902j6bggALOm 1YLu4Afh1AQLdBdnxjfCEVnMNJC95B6bgz+C0AJPYhE7vdnDu1wBbmYZNVJqCvkc/CcW 5rS5ec+6M1TYGu7ClaHjCpZnQ3SS/wlZ2i3gq0mIwxH4vm+tN0RxNY0ax0re87pAyBsJ zH/dlhbgoxHNG8Gm4s9PI9EydGkBIaRlym8SfwCzG6ujqIrgiQLK6f6k4YeFl2YhNC6Y cBbA== X-Gm-Message-State: ABy/qLZQrBRNnsxsBkJ69cxFrFUK3RL97Nkkc5Y9EL3nsuni1OyBGfz7 +kDaPdF5axMX1ofoyHCVAO525nlL+iptiPgH/M0= X-Google-Smtp-Source: APBJJlFg3nNnMg0vKtkl+NROm3+p0W/JWCj8poa2a9vPTn9dvEsJqL96Ca54d56u6ef2XCVoDM5qig== X-Received: by 2002:a05:6602:2291:b0:786:25cf:421f with SMTP id d17-20020a056602229100b0078625cf421fmr917267iod.19.1689810621894; Wed, 19 Jul 2023 16:50:21 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 16:50:21 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v4 30/83] buildman: Add tests for excluding things Date: Wed, 19 Jul 2023 17:48:38 -0600 Message-ID: <20230719234953.796101-31-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 some tests for the -x flag. Signed-off-by: Simon Glass --- (no changes since v3) Changes in v3: - Add new patch to test for excluding things tools/buildman/func_test.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index ca579a27c61f..bd7db1e9c1fb 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -1023,3 +1023,27 @@ endif result = self._RunControl('-A', 'board0') self.assertEqual('arm-\n', stdout.getvalue()) self.assertEqual('', stderr.getvalue()) + + def test_exclude_one(self): + """Test excluding a single board from an arch""" + self._RunControl('arm', '-x', 'board1') + self.assertEqual(['board0'], + [b.target for b in self._boards.get_selected()]) + + def test_exclude_arch(self): + """Test excluding an arch""" + self._RunControl('-x', 'arm') + self.assertEqual(['board2', 'board4'], + [b.target for b in self._boards.get_selected()]) + + def test_exclude_comma(self): + """Test excluding a comma-separated list of things""" + self._RunControl('-x', 'arm,powerpc') + self.assertEqual(['board4'], + [b.target for b in self._boards.get_selected()]) + + def test_exclude_list(self): + """Test excluding a list of things""" + self._RunControl('-x', 'board2', '-x' 'board4') + self.assertEqual(['board0', 'board1'], + [b.target for b in self._boards.get_selected()]) -- 2.41.0.487.g6d72f3e995-goog