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 50DE8C6379F for ; Fri, 24 Feb 2023 01:20:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C520385B26; Fri, 24 Feb 2023 02:19:31 +0100 (CET) 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="PTumrztv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CAD8C85A23; Fri, 24 Feb 2023 02:19:08 +0100 (CET) Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 1601885B18 for ; Fri, 24 Feb 2023 02:18:52 +0100 (CET) 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-x12f.google.com with SMTP id s8so6395512ilv.10 for ; Thu, 23 Feb 2023 17:18:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=VL807T8WNmfDS87zp6ZD4Rk+wYQIAhjNH6z2SDUUiOE=; b=PTumrztvEMA4CO+b5DCA8dsXGe3gbTfh4lXbRCj2AfDQBrNH0UM205hG3QPJ+GrQX1 kcNS3tAf8CmksYDqHnXIGqQ6hPuDgAwwTSMsblfrbQX07ktACXXle+StwpKp8n0ZMoum V9Mzly2X2+hEqWqZaG1G7/+UfdzW7ay/VwPCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=VL807T8WNmfDS87zp6ZD4Rk+wYQIAhjNH6z2SDUUiOE=; b=hau1jsie8Pta2JQkNAXGFXvvek9KbwTX1dPQZLdiHL8c0wCawhL7KY3PkReL5jaZLC TDemSmtVUxkt4eHrUoaNBgxF3rf1PSNWWIOuQjx1z1G4cG6Z/pPLFj9FWcPIDXZJsboC +NsoBK5A4Q4Epcx7jTm5g/jGuBlRVUqWeENt3x1J6emqSleR4zyfHwhbtSN/jyPXs+iB ip6++gIqxsJ3jAGYMs0XMx1K/FjSFCKj6+IGFDPjMaEjHQIljzm9XkaKuh2nw/rbbqJx dlW0RGqv9nvz6hTEBcZiWQ8Mx4khgj45Xku5xnmmkjd2PnPWrPYGFrgIUFHYpiD/9RFM 0B+g== X-Gm-Message-State: AO0yUKWDoWNc7Pzj6NweN+ecleSBhxUikpgb81WD99MUAbAfXLhlIt/v OC8fsov+JySjaHAxsEq1E3so2PyU7IqqmkT7 X-Google-Smtp-Source: AK7set+so5oDRTx+aGJykNgDM1gxwYhCztVRGalUp8tGXtQNg57hPRHrf3b4M7nNAHlmE7sLpALGqg== X-Received: by 2002:a05:6e02:20c8:b0:313:f9df:2f4d with SMTP id 8-20020a056e0220c800b00313f9df2f4dmr14372613ilq.29.1677201530696; Thu, 23 Feb 2023 17:18:50 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id q3-20020a92d403000000b003127b668eafsm2677214ilm.19.2023.02.23.17.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 17:18:50 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Alper Nebi Yasak , Neha Malcom Francis , Stefan Herbrechtsmeier , Philippe Reynes , Peng Fan , Heinrich Schuchardt , Simon Glass Subject: [PATCH v2 07/24] patman: Avoid importing test_checkpatch before it is needed Date: Thu, 23 Feb 2023 18:18:07 -0700 Message-Id: <20230224011824.2111976-8-sjg@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230224011824.2111976-1-sjg@chromium.org> References: <20230224011824.2111976-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.6 at phobos.denx.de X-Virus-Status: Clean Tests are not packaged with patman so this file will not be accessible when installing with pip. Move the import later in the file, when we know the file is present. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to avoid importing test_checkpatch before it is needed tools/patman/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/patman/__main__.py b/tools/patman/__main__.py index 30632559bb6..48ffbc8eadf 100755 --- a/tools/patman/__main__.py +++ b/tools/patman/__main__.py @@ -24,7 +24,6 @@ from patman import func_test from patman import gitutil from patman import project from patman import settings -from patman import test_checkpatch from u_boot_pylib import terminal from u_boot_pylib import test_util from u_boot_pylib import tools @@ -146,6 +145,7 @@ if not args.debug: # Run our meagre tests if args.cmd == 'test': from patman import func_test + from patman import test_checkpatch result = test_util.run_test_suites( 'patman', False, False, False, None, None, None, -- 2.39.2.637.g21b0678d19-goog