From patchwork Mon Nov 22 03:48:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1557866 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=IkP4Vrx1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyCxd3WKvz9t0G for ; Mon, 22 Nov 2021 14:51:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15FBC83633; Mon, 22 Nov 2021 04:51:25 +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="IkP4Vrx1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 052918360D; Mon, 22 Nov 2021 04:51:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) (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 B708082FBD for ; Mon, 22 Nov 2021 04:51:16 +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-io1-xd32.google.com with SMTP id z18so21503564iof.5 for ; Sun, 21 Nov 2021 19:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s6S6dkGCFaQXaQfPnzCXvkaPcXBqbM4LfHffptH6sw0=; b=IkP4Vrx1ZrApSgCbnx8h22La4fvMkXEmTndtvdS42/kqmicaJ4cJ74/5XVbcBBKVks mS+PG7JVyrrJI3NIOzquorEL3MLqGBWVeTND5l4FijG2uYtAets/tm/r22hjpdi24ocB ktykL4oo0ibBmHEuhI0o29Z4CuW4DTM+iEsQc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s6S6dkGCFaQXaQfPnzCXvkaPcXBqbM4LfHffptH6sw0=; b=zN9ggZgMDM+bDpr3A1Lu9kVEvK/Fq8QEn5quI+u57Ng+rCIkAI+YPJPZPBJnrCR+0b 4+2FaA/eReJF9u/XenZJoWmLePj0kzRl11lsahA++C0SXkp8TaKCH35uE1C2tblmuouT JyzOCxiGxhBftGWznSkOQ9BHnJQoFqZ0wO3diWbZ1qj8PmyWzu99r151hWyJaK3W1mBo vBI0dh8bK2S69m35cDROWoeRiYvxxhhRZgwKyICzAIKDSlsUYXw//pd0bw6GHI3sk61v bZRlZW+vqxe//aVvg8JT/w/h6zmdbPaE3Y47HURTrNCQRPF7qVLCEoTgtW42WyZF+w2n XetA== X-Gm-Message-State: AOAM533be5NrKyef3DgcR79zN4nj0Yrr+LU3FkDUgO7uW1Ns6kr0iTwM M2BhI2bKHUr/0VT1RYBjUNahtVMbYehwBQ== X-Google-Smtp-Source: ABdhPJysHclHoHkHdtPWRTHWaY/exrRk4hiedqFzx/q/xqYGPkV/4nWj0dLGVzufldcR+cU4xxtAMA== X-Received: by 2002:a05:6602:3ca:: with SMTP id g10mr19848616iov.194.1637553075187; Sun, 21 Nov 2021 19:51:15 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x18sm2007401iow.53.2021.11.21.19.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 19:51:14 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 1/6] .gitignore: Ignore any html coverage directory Date: Sun, 21 Nov 2021 20:48:36 -0700 Message-Id: <20211121204829.1.Ie59136f147c84291e3f27a6eb7779d3997ce3b07@changeid> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211122034841.304138-1-sjg@chromium.org> References: <20211122034841.304138-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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.2 at phobos.denx.de X-Virus-Status: Clean This is created when checking code coverage of Python tools. Ignore it. Signed-off-by: Simon Glass --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e66aa864da6..35034de6556 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,6 @@ GTAGS # Python cache __pycache__ + +# Python code coverage output (python3-coverage html) +/htmlcov/ From patchwork Mon Nov 22 03:48:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1557867 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Xxk/N57F; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyCxm3Zwfz9t0G for ; Mon, 22 Nov 2021 14:51:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A01E183458; Mon, 22 Nov 2021 04:51:28 +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="Xxk/N57F"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58E168361E; Mon, 22 Nov 2021 04:51:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 81D5A831FF for ; Mon, 22 Nov 2021 04:51:17 +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-x12d.google.com with SMTP id l8so16696243ilv.3 for ; Sun, 21 Nov 2021 19:51:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lcqp2HroTEBLMUwycyzmqQRk4DeLzt2UTp8toNk13qw=; b=Xxk/N57FKy3+5SB1FkZuMrijHL/m3vb9P32/rtpWrzFAUFH1WfqarhITWfYgXpJHEH by2BvWv6RjWGf5FluDjxpKYcC/K22PCg+kT6fK9mUybViBZ3yx9goRP8wR06Am3GjXBq eki1bjfeTfpw8aQmtBdcqMmDdcSxR0FdLSuPk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Lcqp2HroTEBLMUwycyzmqQRk4DeLzt2UTp8toNk13qw=; b=PRjzxMFrqwzp5WBAy+0KUOwphTb+Ra4p+uLNm2gL4g7sonfHqNlrTa/FkKoM2oq4u1 zuTTbAzMnKVnBND8OIbf0DbHUJA/qZ/KMMCc/JmUq5LxfDkvoj24ywKJC1a8NDrBCqwO I0p+alA1zYEg9zyAkwrl1/TFgTRZt+kB97YfjpKKofEhqjW1nJJJoZ60mIwxK1WhWTPk 5wpHRYnPjS7Zy0vljqMtT4VhcDWLmQASwiRbnlI37MxZ6GqcKw54JvhzsNKkSVyEwhNi 2I9CIA1ZlRTyU97itlk9Gr0lR9JKJUjIAQHUWvjJmWtlTg6Mzy52261m87jk2afeSPE/ AsmQ== X-Gm-Message-State: AOAM531ifUUXkTxjTLg3aM2ch1mREk2ysVDVHVv8342KURp+ryKCqhuq 61wguMHGDzr3Yn5KKBHWTvJWAsE3OJKT4Q== X-Google-Smtp-Source: ABdhPJyC7xpPKIhgMsohSY3ztFKEyXkphvQqb764H7M+jG3kLSOmyU2fkb9MFNyI5TOmk5IgAIivVA== X-Received: by 2002:a92:7607:: with SMTP id r7mr17335802ilc.317.1637553076015; Sun, 21 Nov 2021 19:51:16 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x18sm2007401iow.53.2021.11.21.19.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 19:51:15 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 2/6] dtoc: Fix up a code comment that confuses pylint Date: Sun, 21 Nov 2021 20:48:37 -0700 Message-Id: <20211121204829.2.Ic5db4c16206e5012958bab27782155417a92b2e1@changeid> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211122034841.304138-1-sjg@chromium.org> References: <20211122034841.304138-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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.2 at phobos.denx.de X-Virus-Status: Clean This produces a pylint error at present. Fix it. Signed-off-by: Simon Glass --- tools/dtoc/dtb_platdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py index 3bb5c680f2e..a69a7889ce1 100644 --- a/tools/dtoc/dtb_platdata.py +++ b/tools/dtoc/dtb_platdata.py @@ -72,7 +72,7 @@ class Ftype(IntEnum): # This holds information about each type of output file dtoc can create -# type: Type of file (Ftype) +# ftype: Type of file (Ftype) # fname: Filename excluding directory, e.g. 'dt-plat.c' # hdr_comment: Comment explaining the purpose of the file OutputFile = collections.namedtuple('OutputFile', From patchwork Mon Nov 22 03:48:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1557868 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=A4HgxUO/; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyCxw74Tgz9t0G for ; Mon, 22 Nov 2021 14:51:48 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4861C834CB; Mon, 22 Nov 2021 04:51:38 +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="A4HgxUO/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 445758326F; Mon, 22 Nov 2021 04:51:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 637A08352B for ; Mon, 22 Nov 2021 04:51:18 +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-x131.google.com with SMTP id i9so11170290ilu.1 for ; Sun, 21 Nov 2021 19:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JjLOCKqcoraTcNg+IwwLsZHRprs0ZvQ4EZVcZqy8TEo=; b=A4HgxUO/aKBUjwvfB+jntFt3YCMEMLvxcUEhrcxnKYqOhTdzPHs7GoYsZ9SMmNHG6g qUX0jGaEAr2kkwEau0z+mYkolbUh+3IJer5RdaucyBYCvyaP6E7JjD0oTW8lJSIDHZJZ p+sueKx+hLfl1Gi1bTAScPL0oqL8mJKLTX0J8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JjLOCKqcoraTcNg+IwwLsZHRprs0ZvQ4EZVcZqy8TEo=; b=izadx+/nNj9K2TPMmifKuaH2ZFc2WYOcybJWxKAojHE6PED5Y3P9EMcy/nvaf2zVdi hFy0V9FLQcMc8X+gyRomTrJtbn2NGQ8vurhv/mctdE1pfdVH60okiAbKMc9+9rsxuP/8 p/BhHiENZDGhkCwAYXk37UoRnAgFVIrP2Jv3GYn2gF7A0PO2naRaUU5LydOkR00Jcsgt rMXkZihJ2o72NMnJcgSFOZXPaH6K2cM545oKEeCSo2xdRGZeipk7oWgcVn0oCF8++ptX XQdJ6DmzRk7TLPx9oiyssc9cRSRkpIMf/frYnSedDMAFskN385mAWEaPBNkGrxDYBnz6 KMjw== X-Gm-Message-State: AOAM533c1ang6a8nxqf/bjKHcx6xEHY0sDjg7DjSkL02z4lXyxKUhqkQ BYFXRh0KnUv12qVYi/1NEVRp+g0qBznGgw== X-Google-Smtp-Source: ABdhPJyd1T5R+WeACLrPBqzslnQbh6fglMQuYWz8M6aKFUulNaxuA/t41ZHYLxeOcXD1ygsGdK/jzA== X-Received: by 2002:a92:c261:: with SMTP id h1mr15946752ild.291.1637553076753; Sun, 21 Nov 2021 19:51:16 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x18sm2007401iow.53.2021.11.21.19.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 19:51:16 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 3/6] patman: Update the list of modules Date: Sun, 21 Nov 2021 20:48:38 -0700 Message-Id: <20211121204829.3.Ia0f2d68c22ea327ffc2d48f119f9e307a791af99@changeid> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211122034841.304138-1-sjg@chromium.org> References: <20211122034841.304138-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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.2 at phobos.denx.de X-Virus-Status: Clean Update the __init__ file to include recently added files. Add a license header while we are here. Signed-off-by: Simon Glass --- tools/patman/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/patman/__init__.py b/tools/patman/__init__.py index 7cbe5fa4b0c..c9d3e350529 100644 --- a/tools/patman/__init__.py +++ b/tools/patman/__init__.py @@ -1,3 +1,6 @@ -__all__ = ['checkpatch', 'command', 'commit', 'cros_subprocess', - 'get_maintainer', 'gitutil', 'patchstream', 'project', - 'series', 'settings', 'terminal', 'test'] +# SPDX-License-Identifier: GPL-2.0+ + +__all__ = ['checkpatch', 'command', 'commit', 'control', 'cros_subprocess', + 'func_test', 'get_maintainer', 'gitutil', 'main', 'patchstream', + 'project', 'series', 'setup', 'settings', 'terminal', + 'test_checkpatch', 'test_util', 'tools', 'tout'] From patchwork Mon Nov 22 03:48:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1557870 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=VkaWOyA5; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyCyG6vtBz9t0G for ; Mon, 22 Nov 2021 14:52:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0E25E8364B; Mon, 22 Nov 2021 04:51:46 +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="VkaWOyA5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 575E2833E6; Mon, 22 Nov 2021 04:51:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) (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 12493835F9 for ; Mon, 22 Nov 2021 04:51:19 +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-io1-xd30.google.com with SMTP id w22so21563050ioa.1 for ; Sun, 21 Nov 2021 19:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vj4lUBfWMlpi0RadfEmQeGaVzTaB6be6BWLLlQXwt/c=; b=VkaWOyA5q0Gz3o1yPzQcfkoIrerPufAsLQNmxIuFv4YDIXZlUE7lD4WTSIt5d/mCJO DkeJUHho4+m5mrGW2O8gyUlzlqqV0SF6ia4iI+EYQ8quT7VfYjsyEyt81luP4hqugoNl bpBTICL9FwHZCbyxhCUBgzA1o0scyKdkEnoF8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vj4lUBfWMlpi0RadfEmQeGaVzTaB6be6BWLLlQXwt/c=; b=bkERfwVG0K584j4arPlDxJt80AJp/L0E69XcYqmM4xz06CingWNTmOSeSobbpUHILO hi+p0ljTWbzs0S1+kOnfk+NEWcV9abaJ674MDExAAM6Y9ZJTjQNhu1p0RU2A4v2FJYis n+7z28IbmLmOZSMORh28iKZIUD2hpmkBobW5OqtVQhJOOp7lzNpr6O1XEZh1lK/7JhNZ KRDocIS7GLNCQ5QTCwdDiGF9BDATrY0knCWyhcQSlpHaH45h5EUMzXDQ/LW/wOFZ2ki0 LJ5OJi00uzfKRWzpVKrLFDco2nKih8HzDAEqO51Sua1Bx2lNMclz7y/mP35de+L7yc3D Cgaw== X-Gm-Message-State: AOAM532LQwOqqOf9tQtxcWy/mhmb+FVA6oHLu1K3DtWikpzmS17tbr8C Q7rB9Avp3q3JJ0y9Ddb9hM2ADJNU3YgBkA== X-Google-Smtp-Source: ABdhPJx2Pr+9IoPweUW0HWRBjlXl1Z96WXvjuJu/yagqM3BCDrafqxyfR7e7L410hUO3HhShhrXBhQ== X-Received: by 2002:a6b:8bc2:: with SMTP id n185mr19875640iod.174.1637553077534; Sun, 21 Nov 2021 19:51:17 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x18sm2007401iow.53.2021.11.21.19.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 19:51:17 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 4/6] tools: Add init files for Python tools Date: Sun, 21 Nov 2021 20:48:39 -0700 Message-Id: <20211121204829.4.I0e1f08d94e317b8a2ae006d9d92e9c07b6a3eedf@changeid> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211122034841.304138-1-sjg@chromium.org> References: <20211122034841.304138-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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.2 at phobos.denx.de X-Virus-Status: Clean Add some empty __init__ files for binman, buildman and dtoc so that pylint is able to recognise these as Python modules and produce more useful pylint output. Signed-off-by: Simon Glass --- tools/binman/__init__.py | 0 tools/buildman/__init__.py | 0 tools/dtoc/__init__.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tools/binman/__init__.py create mode 100644 tools/buildman/__init__.py create mode 100644 tools/dtoc/__init__.py diff --git a/tools/binman/__init__.py b/tools/binman/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tools/buildman/__init__.py b/tools/buildman/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tools/dtoc/__init__.py b/tools/dtoc/__init__.py new file mode 100644 index 00000000000..e69de29bb2d From patchwork Mon Nov 22 03:48:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1557869 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=CMJAtqFp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyCy53kjqz9s0r for ; Mon, 22 Nov 2021 14:51:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B889283662; Mon, 22 Nov 2021 04:51:41 +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="CMJAtqFp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1CF6C8326F; Mon, 22 Nov 2021 04:51:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (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 ED28F83624 for ; Mon, 22 Nov 2021 04:51:19 +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-io1-xd36.google.com with SMTP id c3so21571615iob.6 for ; Sun, 21 Nov 2021 19:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HYK2REpcc5Ia296G7j+JnPqS1YYtn07P1amGhhdLhj4=; b=CMJAtqFpKsVUYsOKzMxw9kbGMdvX2MVlwQCiJuoeQTlzlMpZTsoKJdSeyPU8Jxcmeg irlajt7LvtzymvKzT0dMNvMPRt1mAfS34Ag1mZvCPFbDIh9pc+IBOo7juqyvE/28uzbs 99/QBtnibtDd8qHMRK2c8GGBDv4aOttbNQ6Vw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HYK2REpcc5Ia296G7j+JnPqS1YYtn07P1amGhhdLhj4=; b=Xj7sTO6FC8hBmnWVx7yXd4M+5PLQ07UiOl/mWPUXULvS+k6EF9bBLO6biDy9tcbOe+ /Vjc3pa/JGQ5HHJGpFZG4cFJ1Fh48qyfgrL2qFLQ+wiB9w9TInJbPPTnTQ0IlDVVjfRT +XCxEUdxm1RFdq9kdatC2uV4QL1hsn9Td/J6d40OpkxZ6UH2KE1u1BujoVHff5ow+B4y LeW/fLr05Lt52ffM3ZIJWGmxBkWCBpYuK6Q4ytiKZnGZMclb22zT6jNniGx0V7eup+JW KwYAOe2UeZUYoinFLh7hG8RHiuBKOfMdK+6IovW5jgWYn4qncVIyVZ3DHWysd9J4LhUQ ZO4A== X-Gm-Message-State: AOAM530RqdwZNRdmaB8QeUqZnYBsAfNgLqQ030v8v2ED7sh/JJFJI0Li BDTOo5C0D+yMMxTxO09q3SCa/+zgm14iPQ== X-Google-Smtp-Source: ABdhPJx9xZUWDpYSEheTtzVxMfkC1XCLQGmImSJ3tiY14Eyy+z04+6XJxjwQ0YKZxIQMfSaKZHrQiQ== X-Received: by 2002:a6b:5c02:: with SMTP id z2mr19430434ioh.138.1637553078322; Sun, 21 Nov 2021 19:51:18 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x18sm2007401iow.53.2021.11.21.19.51.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 19:51:17 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass , =?utf-8?q?Marek_Beh=C3=BAn?= , Masahiro Yamada , =?utf-8?q?Pali_Roh=C3=A1r?= Subject: [PATCH 5/6] Makefile: Add a pylint checker to the build Date: Sun, 21 Nov 2021 20:48:40 -0700 Message-Id: <20211122034841.304138-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211122034841.304138-1-sjg@chromium.org> References: <20211122034841.304138-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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.2 at phobos.denx.de X-Virus-Status: Clean At present the Python code in U-Boot is somewhat inconsistent, with some files passing pylint quite cleanly and others not. Add a way to track progress on this clean-up, by checking that no module has got any worse as a result of changes. This can be used with 'make pylint'. Signed-off-by: Simon Glass --- .gitignore | 4 + Makefile | 45 +++++++- doc/develop/index.rst | 8 ++ doc/develop/python_cq.rst | 80 +++++++++++++++ scripts/pylint.base | 211 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 doc/develop/python_cq.rst create mode 100644 scripts/pylint.base diff --git a/.gitignore b/.gitignore index 35034de6556..28c439f09fd 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,7 @@ __pycache__ # Python code coverage output (python3-coverage html) /htmlcov/ + +# pylint files +/pylint.cur +/pylint.out/ diff --git a/Makefile b/Makefile index 338ae3341e6..ef2b0a853ea 100644 --- a/Makefile +++ b/Makefile @@ -521,7 +521,7 @@ env_h := include/generated/environment.h no-dot-config-targets := clean clobber mrproper distclean \ help %docs check% coccicheck \ - ubootversion backup tests check qcheck tcheck + ubootversion backup tests check qcheck tcheck pylint config-targets := 0 mixed-targets := 0 @@ -2239,6 +2239,48 @@ distclean: mrproper -type f -print | xargs rm -f @rm -f boards.cfg CHANGELOG +# See doc/develop/python_cq.rst +PHONY += pylint +PYLINT_BASE := scripts/pylint.base +PYLINT_CUR := pylint.cur +PYLINT_DIFF := pylint.diff +pylint: + $(Q)echo "Running pylint on all files (summary in $(PYLINT_CUR); output in pylint.out/)" + $(Q)mkdir -p pylint.out + $(Q)rm -f pylint.out/out* + $(Q)find tools test -name "*.py" \ + | xargs -n1 -P$(shell nproc 2>/dev/null || echo 1) \ + sh -c 'pylint --reports=y --exit-zero -f parseable --ignore-imports=yes $$@ > pylint.out/$$(echo $$@ | tr / _ | sed s/.py//)' _ + $(Q)sed -n 's/Your code has been rated at \([-0-9.]*\).*/\1/p; s/\*\** Module \(.*\)/\1/p' pylint.out/* \ + |sed '$!N;s/\n/ /' \ + |sort > $(PYLINT_CUR) + $(Q)base=$$(mktemp) cur=$$(mktemp); cut -d' ' -f1 $(PYLINT_BASE) >$$base; \ + cut -d' ' -f1 $(PYLINT_CUR) >$$cur; \ + comm -3 $$base $$cur > $(PYLINT_DIFF); \ + if [ -s $(PYLINT_DIFF) ]; then \ + echo "Files have been added/removed. Try:\n\tcp $(PYLINT_CUR) $(PYLINT_BASE)"; \ + echo; \ + echo "Added files:"; \ + comm -13 $$base $$cur; \ + echo; \ + echo "Removed files:"; \ + comm -23 $$base $$cur; \ + false; \ + else \ + rm $$base $$cur $(PYLINT_DIFF); \ + fi + $(Q)bad=false; while read base_file base_val <&3 && read cur_file cur_val <&4; do \ + if awk "BEGIN {exit !($$cur_val < $$base_val)}"; then \ + echo "$$base_file: Score was $$base_val, now $$cur_val"; \ + bad=true; fi; \ + done 3<$(PYLINT_BASE) 4<$(PYLINT_CUR); \ + if $$bad; then \ + echo "Some files have regressed, please fix"; \ + false; \ + else \ + echo "No pylint regressions"; \ + fi + backup: F=`basename $(srctree)` ; cd .. ; \ gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F @@ -2257,6 +2299,7 @@ help: @echo ' check - Run all automated tests that use sandbox' @echo ' qcheck - Run quick automated tests that use sandbox' @echo ' tcheck - Run quick automated tests on tools' + @echo ' pylint - Run pylint on all Python files' @echo '' @echo 'Other generic targets:' @echo ' all - Build all necessary images depending on configuration' diff --git a/doc/develop/index.rst b/doc/develop/index.rst index 9592d193fca..97a7f4ce14a 100644 --- a/doc/develop/index.rst +++ b/doc/develop/index.rst @@ -61,3 +61,11 @@ Refactoring checkpatch coccinelle moveconfig + +Code quality +------------ + +.. toctree:: + :maxdepth: 1 + + python_cq diff --git a/doc/develop/python_cq.rst b/doc/develop/python_cq.rst new file mode 100644 index 00000000000..3f99f1d9c0b --- /dev/null +++ b/doc/develop/python_cq.rst @@ -0,0 +1,80 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Python code quality +=================== + +U-Boot has about 60k lines of Python code, mainly in the following areas: + +- tests +- pytest hooks +- patman patch submission tool +- buildman build / analysis tool +- dtoc devicetree-to-C tool +- binman firmware packaging tool + +`PEP 8`_ is used for the code style, with the single quote (') used by default for +strings and double quote for doc strings. All non-trivial functions should be +commented. + +Pylint is used to help check this code and keep a consistent code style. The +build system tracks the current 'score' of the source code and detects +regressions in any module. + +To run this locally you should use this version of pylint:: + + # pylint --version + pylint 2.11.1 + astroid 2.8.6 + Python 3.8.10 (default, Sep 28 2021, 16:10:42) + [GCC 9.3.0] + + +You should be able to select and this install other required tools with:: + + pip install pylint==2.11.1 + pip install -r test/py/requirements.txt + pip install asteval pyopenssl + +Note that if your distribution is a year or two old, you make need to use `pip3` +instead. + +To configure pylint, make sure it has docparams enabled, e.g. with:: + + echo "[MASTER]" >> .pylintrc + echo "load-plugins=pylint.extensions.docparams" >> .pylintrc + +Once everything is ready, use this to check the code:: + + make pylint + +This creates a directory called `pylint.out` which contains the pylint output +for each Python file in U-Boot. It also creates a summary file called +`pylint.cur` which shows the pylint score for each module:: + + _testing 0.83 + atf_bl31 -6.00 + atf_fip 0.49 + binman.cbfs_util 7.70 + binman.cbfs_util_test 9.19 + binman.cmdline 7.73 + binman.control 4.39 + binman.elf 6.42 + binman.elf_test 5.41 + ... + +This file is in alphabetical order. The build system compares the score of each +module to `scripts/pylint.base` (which must also be sorted and have exactly the +same modules in it) and reports any files where the score has dropped. Use +pylint to check what is wrong and fix up the code before you send out your +patches. + +New or removed files results in an error which can be resolved by updating the +`scripts/pylint.base` file to add/remove lines for those files, e.g.:: + + meld pylint.cur scripts/pylint.base + +If the pylint version is updated in CI, this may result in needing to regenerate +`scripts/pylint.base`. + + +.. _`PEP 8`: https://www.python.org/dev/peps/pep-0008/ diff --git a/scripts/pylint.base b/scripts/pylint.base new file mode 100644 index 00000000000..d848ebe9058 --- /dev/null +++ b/scripts/pylint.base @@ -0,0 +1,211 @@ +_testing 0.83 +atf_bl31 -6.00 +binman.cbfs_util 7.70 +binman.cbfs_util_test 9.19 +binman.cmdline 8.87 +binman.control 4.39 +binman.elf 6.42 +binman.elf_test 5.41 +binman.entry 2.39 +binman.entry_test 5.29 +binman.fdt_test 3.23 +binman.fmap_util 6.67 +binman.ftest 7.38 +binman.image 6.39 +binman.image_test 4.48 +binman.main 4.26 +binman.setup 5.00 +binman.state 3.30 +blob -1.94 +blob_dtb -10.00 +blob_ext -20.00 +blob_named_by_arg -7.78 +blob_phase -5.00 +buildman.board 7.11 +buildman.bsettings 0.98 +buildman.builder 6.55 +buildman.builderthread 7.35 +buildman.cmdline 8.85 +buildman.control 7.04 +buildman.func_test 6.38 +buildman.kconfiglib 7.48 +buildman.main 1.43 +buildman.test 6.10 +buildman.toolchain 5.81 +capsule_defs 5.00 +cbfs -1.52 +collection 2.33 +concurrencytest 6.77 +conftest -3.84 +conftest 1.25 +conftest 4.62 +conftest 6.43 +cros_ec_rw -6.00 +defs 6.67 +dtoc.dtb_platdata 7.82 +dtoc.fdt 3.47 +dtoc.fdt_util 4.53 +dtoc.main 7.33 +dtoc.setup 5.00 +dtoc.src_scan 8.75 +dtoc.test_dtoc 8.54 +dtoc.test_fdt 6.92 +dtoc.test_src_scan 9.43 +efivar 6.71 +endian-swap 8.93 +fdtmap -4.00 +files -7.43 +fill -6.43 +fit 5.32 +fmap -0.59 +fstest_defs 8.33 +fstest_helpers 4.29 +gbb -0.30 +genboardscfg 7.27 +image_header 5.58 +intel_cmc -12.50 +intel_descriptor 4.62 +intel_fit 0.00 +intel_fit_ptr 2.35 +intel_fsp -12.50 +intel_fsp_m -12.50 +intel_fsp_s -12.50 +intel_fsp_t -12.50 +intel_ifwi 2.71 +intel_me -12.50 +intel_mrc -10.00 +intel_refcode -10.00 +intel_vbt -12.50 +intel_vga -12.50 +microcode-tool 7.19 +mkimage 2.07 +moveconfig 7.31 +multiplexed_log 7.01 +opensbi -6.00 +patman 0.00 +patman.checkpatch 7.61 +patman.command 4.23 +patman.commit 2.75 +patman.control 8.14 +patman.cros_subprocess 7.41 +patman.func_test 7.87 +patman.get_maintainer 4.71 +patman.gitutil 4.55 +patman.main 8.23 +patman.patchstream 9.04 +patman.project 3.33 +patman.series 5.95 +patman.settings 5.63 +patman.setup 5.00 +patman.status 8.43 +patman.terminal 6.29 +patman.test_checkpatch 6.81 +patman.test_util 6.51 +patman.tools 3.47 +patman.tout 2.97 +powerpc_mpc85xx_bootpg_resetvec -10.00 +rkmux 6.76 +rmboard 7.76 +scp -6.00 +section 4.25 +sqfs_common 8.12 +test 8.18 +test_000_version 7.50 +test_ab 6.50 +test_abootimg 6.09 +test_authvar 8.93 +test_avb 5.52 +test_basic 0.40 +test_bind -2.99 +test_button 3.33 +test_capsule_firmware 3.89 +test_dfu 5.45 +test_dm 9.52 +test_efi_fit 7.59 +test_efi_loader 6.79 +test_efi_selftest 6.12 +test_env 6.68 +test_ext -0.25 +test_extension 2.14 +test_fit 6.20 +test_fit_ecdsa 7.50 +test_fit_hashes 7.70 +test_fpga 1.81 +test_fs_cmd 8.00 +test_gpio 6.09 +test_gpt 7.67 +test_handoff 5.00 +test_help 5.00 +test_hush_if_test 9.27 +test_log 8.64 +test_lsblk 8.00 +test_md 3.64 +test_mkdir 1.96 +test_mmc_rd 6.05 +test_mmc_wr 3.33 +test_net 6.84 +test_ofplatdata 5.71 +test_part 8.00 +test_pinmux 3.27 +test_pstore 2.31 +test_qfw 8.75 +test_sandbox_exit 6.50 +test_scp03 3.33 +test_sf 7.02 +test_shell_basics 9.58 +test_signed 8.38 +test_signed_intca 8.10 +test_sleep 7.78 +test_spl 2.22 +test_sqfs_load 7.12 +test_sqfs_ls 8.00 +test_stackprotector 5.71 +test_symlink 0.82 +test_tpm2 8.51 +test_ums 6.32 +test_unknown_cmd 5.00 +test_unlink 2.22 +test_unsigned 8.00 +test_ut 7.06 +test_vboot 6.00 +text -0.48 +u_boot -15.71 +u_boot_console_base 6.80 +u_boot_console_exec_attach 8.46 +u_boot_console_sandbox 6.94 +u_boot_dtb -12.22 +u_boot_dtb_with_ucode 0.39 +u_boot_elf -8.42 +u_boot_env 0.74 +u_boot_expanded -10.00 +u_boot_img -15.71 +u_boot_nodtb -15.71 +u_boot_spawn 6.67 +u_boot_spl -10.91 +u_boot_spl_bss_pad -9.29 +u_boot_spl_dtb -12.22 +u_boot_spl_elf -15.71 +u_boot_spl_expanded -9.09 +u_boot_spl_nodtb -10.91 +u_boot_spl_with_ucode_ptr -5.00 +u_boot_tpl -10.91 +u_boot_tpl_bss_pad -9.29 +u_boot_tpl_dtb -12.22 +u_boot_tpl_dtb_with_ucode -7.50 +u_boot_tpl_elf -15.71 +u_boot_tpl_expanded -9.09 +u_boot_tpl_nodtb -10.91 +u_boot_tpl_with_ucode_ptr -20.83 +u_boot_ucode 1.52 +u_boot_utils 4.69 +u_boot_with_ucode_ptr -0.71 +vblock -1.94 +vboot_evil 8.95 +vboot_forge 9.22 +x86_reset16 -15.71 +x86_reset16_spl -15.71 +x86_reset16_tpl -15.71 +x86_start16 -15.71 +x86_start16_spl -15.71 +x86_start16_tpl -15.71 +zynqmp_pm_cfg_obj_convert 6.67 From patchwork Mon Nov 22 03:48:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1557871 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=XxIDnncm; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyCyc1t9lz9t0G for ; Mon, 22 Nov 2021 14:52:24 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 829FE836B7; Mon, 22 Nov 2021 04:51:54 +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="XxIDnncm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D8256833E6; Mon, 22 Nov 2021 04:51:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 C2B03831FD for ; Mon, 22 Nov 2021 04:51:20 +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-x131.google.com with SMTP id x9so16647067ilu.6 for ; Sun, 21 Nov 2021 19:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=98Rnfx9yGLsECiH3zgEmfLAFGuUNEMreltE8HESI0gU=; b=XxIDnncmOSA9fCIvOp+QLTKHAibuzGwDvhYhxYJyI922+ynKeuMyxQfzLzYTyXTKGH OF6Rzl2lm6Yfva45ndxyYYJPKJSFEGQ5rZWyPMC+Vi1yUnMGmN93s1VzfsXbTRqOBRzz 8qQmQOCDTa0EWhByJrlED3W6UzATUrz6LjHrU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=98Rnfx9yGLsECiH3zgEmfLAFGuUNEMreltE8HESI0gU=; b=kKlo0ZhsxezgR7ZoDd+Tj+U66TBmq2efSUuON1Wy4Md8kGUpyrzeCiIxXfLZbG23MQ mbE8wbGc85sqZFtW5qHmeV7vqgy6IDBhHNE4f7NNbyDM2gpvNQa09fD4l654ZwhhI2ZN SbrCZ/w3z+yPzh4sP8SYiAVFEal+btQGIJyehdl2d+WSm+eue8HXkxSbX7nXWsrLJ1EU X+unLsAi74VZ42+RND1OJwhEn/IksOj7uYkypgXZuZDEGyC48nsJbdXRH+qUCAskHy7L VRGN40v+OvvedNRdJhS19tkOyZ5FxOw+TiNLlCfaMXwTrloW5Act4MkPudQJOJx0fPWq S/+A== X-Gm-Message-State: AOAM530h8bdzxDcT1QzOOOw7vuVt1K/W9xKaQGxK8tY6rDjKld//YoK2 9AwdY6POESZYP+qolMmZEl0xXCUa6cDfwQ== X-Google-Smtp-Source: ABdhPJxMscWFg5TD+7hgIM/4hw0lk9wYsvS0kF+SwXTa5RYHAuzgq17Iila6CC95ruyTotxrC4u4og== X-Received: by 2002:a05:6e02:19c7:: with SMTP id r7mr15279919ill.87.1637553079233; Sun, 21 Nov 2021 19:51:19 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x18sm2007401iow.53.2021.11.21.19.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 19:51:18 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass , Alper Nebi Yasak , Bin Meng , Daniel Schwierzeck , Kristian Amlie Subject: [PATCH 6/6] Azure/GitLab CI: Add the pylint checker Date: Sun, 21 Nov 2021 20:48:41 -0700 Message-Id: <20211122034841.304138-3-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211122034841.304138-1-sjg@chromium.org> References: <20211122034841.304138-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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.2 at phobos.denx.de X-Virus-Status: Clean Add a check that new Python code does not regress the pylint score for any module. Signed-off-by: Simon Glass --- .azure-pipelines.yml | 17 +++++++++++++++++ .gitlab-ci.yml | 12 ++++++++++++ 2 files changed, 29 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 8801ff7d81b..6002477c905 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -172,6 +172,23 @@ jobs: export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH test/nokia_rx51_test.sh + - job: pylint + displayName: Check for any pylint regressions + pool: + vmImage: $(ubuntu_vm) + container: + image: $(ci_runner_image) + options: $(container_option) + steps: + - script: | + pip install -r test/py/requirements.txt + pip install asteval pylint pyopenssl + export PATH=${PATH}:~/.local/bin + echo "[MASTER]" >> .pylintrc + echo "load-plugins=pylint.extensions.docparams" >> .pylintrc + pylint --version + make pylint + - job: test_py displayName: 'test.py' pool: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c89daeadcf..226595e04e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -180,6 +180,18 @@ Run tests for Nokia RX-51 (aka N900): - export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH; test/nokia_rx51_test.sh +# Check for any pylint regressions +Run pylint: + stage: testsuites + script: + - pip install -r test/py/requirements.txt + - pip install asteval pylint pyopenssl + - export PATH=${PATH}:~/.local/bin + - echo "[MASTER]" >> .pylintrc + - echo "load-plugins=pylint.extensions.docparams" >> .pylintrc + - pylint --version + - make pylint + # Test sandbox with test.py sandbox test.py: variables: