From patchwork Sun Jun 23 17:56:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951296 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=DY3KpVPE; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W6f4113L8z20WR for ; Mon, 24 Jun 2024 03:59:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A7D9888609; Sun, 23 Jun 2024 19:56:31 +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="DY3KpVPE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 56B4088609; Sun, 23 Jun 2024 19:56:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 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-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (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 4B97688271 for ; Sun, 23 Jun 2024 19:56:27 +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-x134.google.com with SMTP id e9e14a558f8ab-375daa47685so16185865ab.0 for ; Sun, 23 Jun 2024 10:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165386; x=1719770186; darn=lists.denx.de; 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=U5OHXOcQfkRf+5uJltTrJiDlKttdfw2vieWhkYRN+W8=; b=DY3KpVPEGi0QTmIYNW6eM9NkQYVVfpxsP7kUcZLgG00moufI3tHzO9FH6diXWpEwwK C8nYCRW/uAED+mrtF2RLNDSTiqF8svyS0ITBh+6oWBb118Jt4CcTGc111oC1Oyr9RUnA X8MuVqlR1wu4dh5MJaQSMS2rPbzLwTjAc+t2o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165386; x=1719770186; 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=U5OHXOcQfkRf+5uJltTrJiDlKttdfw2vieWhkYRN+W8=; b=DfwoA1INZpDOjjUkguyiSAKXHY+DMx0Uqx0dHirtWrIOe8oproMXlnFbIb73wmHKkT f0WHz507wZnLLy7qOi/6t6sPFn6piueysk+pGU0ZXwXg90D9l6oQEoGJRHSWwVZDkOWp OJRXEs0LQTLmFW2/FT86DKYWnRvMmuQ6V1TnrhEwK3pe9dYMXcVAl5yo6WNC9FLeNUaS jXbEMrKJA29+XvcK5wezjr74SRGL2slM4Y0y82jtQeUGu7OGPVbSqXYB9G4nLBhIZw/q icjTiOCnzbogB8nIQxYYD4i4KRbZLzIHp2hFJQFACvNH9KcSVRTHk+VMl59q00qcdVls rFaA== X-Gm-Message-State: AOJu0Yy0rbTuug2ug9pYw9Wd74/Vs+lU4wofPBn5xF9J8FE8XszDz9N8 Xg80jsOYv5CMsFt6miV0YqJj4ntiZMCBI+irlGNQ+o4N6c5xEQYC+VGvYSAoGt9ncHUlSXQkqCZ eCQ== X-Google-Smtp-Source: AGHT+IFjWgqp7g/VMse2LGJotvwLcrLCHt6ioBFpPFZbbQE0eo4napAhNmxxnlQ/N5+yU1xqQskhXg== X-Received: by 2002:a05:6e02:1a28:b0:375:a50d:7f45 with SMTP id e9e14a558f8ab-3763f5ae01fmr32006345ab.1.1719165385913; Sun, 23 Jun 2024 10:56:25 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3762f2fb1bbsm13551465ab.12.2024.06.23.10.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:56:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Neha Malcom Francis Subject: [PATCH v3 1/6] buildman: Add python3-coverage Date: Sun, 23 Jun 2024 11:56:17 -0600 Message-Id: <20240623175622.1468600-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175622.1468600-1-sjg@chromium.org> References: <20240623175622.1468600-1-sjg@chromium.org> MIME-Version: 1.0 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 this package so we can run code-coverage tests for Binman. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Add to buildman requirements instead tools/buildman/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/buildman/requirements.txt b/tools/buildman/requirements.txt index 4a31e69e4cb..564e54898a4 100644 --- a/tools/buildman/requirements.txt +++ b/tools/buildman/requirements.txt @@ -1,3 +1,4 @@ +coverage==6.2 jsonschema==4.17.3 pyyaml==6.0 yamllint==1.26.3 From patchwork Sun Jun 23 17:56:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951297 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=UdnCQqH+; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W6f4B5XNWz20WR for ; Mon, 24 Jun 2024 03:59:22 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2810188614; Sun, 23 Jun 2024 19:56:32 +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="UdnCQqH+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 645CD88271; Sun, 23 Jun 2024 19:56:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 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-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (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 EF3D4885DF for ; Sun, 23 Jun 2024 19:56:27 +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-x12a.google.com with SMTP id e9e14a558f8ab-3762eadd807so10244645ab.1 for ; Sun, 23 Jun 2024 10:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165386; x=1719770186; darn=lists.denx.de; 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=fCwlFGKg08f8qABk7PqsT5dI1TREUOUAElNW2boYH/k=; b=UdnCQqH+nDmfMNIzkxH+dfL7Qtd/igW+cDtqY43rGnT4h7Vyq4zTTOdyPHSA6OY2mB Y9hRX7Jz5dI1q6HmVAz9Z+Ne74Rdz8qF3LAoxsTW682EWdJAE+R19V1ZOO0ksMQWsZQo QvfUov3OSTJRyy4ngOOkkKyMQWwDD8fjWnnAw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165386; x=1719770186; 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=fCwlFGKg08f8qABk7PqsT5dI1TREUOUAElNW2boYH/k=; b=PkekZ69z93ViMk4NdaQAmGRoW1kuDossNYugGAobfB1/7FnONt5864QdWTOPshgkqQ sBHfhMuaF0YV+Qq4HDZ0GuSTzoaSLXe16bl6aGpxIeSE4peXyldNxj1qh1Eu/VbIsPPY A69vrJCulPPN8M+vgFj/dtye3AunEQIdV5I3pVNrDZYMGHBI6AF4/B9dqZZPGtrmq4G5 TNDvt1hFGOqRI+tPWS/6VNIzKZg1ffwP59d/4uROA0cCeZScCIry97YLC1YV43CduMmv Oj+mRC6aTp2JK7ECI5XFKmQGcqOlkeTPGnWYqox2+SHFRtgftL5z4YPITErTFXzElD2R 7ZqQ== X-Gm-Message-State: AOJu0YwFlrZXaUSmsBJfKljKN30tMWBGvRY1GicNYzb5SQc/a1ctSkCv AR6wRKhA3AaSljhNSZw0lb5O1Ahx5Ui5gREhFQvya4jqc9rMlEBtFWr4pgn7ywYL/3v0jUg5Avx qhw== X-Google-Smtp-Source: AGHT+IGdeBRMOLJAdu/YU4UdnbDOk0g2eMwkWa/cgCAPs3YQK2E/YKqWdbh4KJ5edUvpUCFq5JKwBg== X-Received: by 2002:a05:6e02:168a:b0:376:1c71:1e1d with SMTP id e9e14a558f8ab-3763f5b823cmr45949725ab.12.1719165386595; Sun, 23 Jun 2024 10:56:26 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3762f2fb1bbsm13551465ab.12.2024.06.23.10.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:56:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Neha Malcom Francis Subject: [PATCH v3 2/6] buildman: Add python3-pycryptodome Date: Sun, 23 Jun 2024 11:56:18 -0600 Message-Id: <20240623175622.1468600-3-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175622.1468600-1-sjg@chromium.org> References: <20240623175622.1468600-1-sjg@chromium.org> MIME-Version: 1.0 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 This is used by some Binman entry types, so add it to allow more tests to pass. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Add to buildman requirements instead tools/buildman/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/buildman/requirements.txt b/tools/buildman/requirements.txt index 564e54898a4..052d0ed5c6f 100644 --- a/tools/buildman/requirements.txt +++ b/tools/buildman/requirements.txt @@ -1,4 +1,5 @@ coverage==6.2 jsonschema==4.17.3 +pycryptodome==3.20 pyyaml==6.0 yamllint==1.26.3 From patchwork Sun Jun 23 17:56:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951298 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=nshkImtt; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W6f4N2Thcz20WR for ; Mon, 24 Jun 2024 03:59:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8B8C188619; Sun, 23 Jun 2024 19:56:32 +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="nshkImtt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B5538885F1; Sun, 23 Jun 2024 19:56:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 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-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 90B9B87DC7 for ; Sun, 23 Jun 2024 19:56:28 +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-375daa47685so16185935ab.0 for ; Sun, 23 Jun 2024 10:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165387; x=1719770187; darn=lists.denx.de; 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=78n6NaostwtHDALqaZ8jnFOmgsLmPHglijamkfXUTWE=; b=nshkImttbMeQIkY9yXJraKVrYI19LEAnuoTGTLqoVimK38kIU3lwuGkr91tSQji3tZ YByHJNJ04xLH2DkbzbhhV1QBiUOCGgWCDuP3I1QNmYjh1p9oRaNAEy0oMBfspLTVgQMQ f3gLttmnHFhyf0hEicSwvmdRkbTal2hPFCttI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165387; x=1719770187; 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=78n6NaostwtHDALqaZ8jnFOmgsLmPHglijamkfXUTWE=; b=qzRF6p7oZ56jCSefCEvi5EIcgA9YmCzP8Lo65HW8305XAtrfZFE/2MTsyOV+MZ99Vs rBe+qT2dKccJ0h5c9bbWugXffnj0bReuXPEcPHSB14ij5B8g/U1G3XPnjcz87uJopdUo 9kem5tgkj9H7+YzRn7gBzaaLKcyNkzojBImvUZZE3kijmdaSyFO5+aRd0h7saRKb4N0o 5gZc46QPTILJlh+Q2OdSzMx6IsX9cgf/i8hqS5KcpxWjBm0R9bCNlm0Y8s8b0Pruccck IffX4smsLrXgV4xOP7XppRWto7kvMvBtmkzWv+lSZHwt9JV13AkZxUD1WDDgI0Q0A2Wj XV1Q== X-Gm-Message-State: AOJu0YzDt/OjIiY8dl5ck+6eGItYkfVySoIIr5AesIUNnelBGkhiL1yl TiVDoQ1+ueD2T9Mnge719U2S+dS7D5puU/1GcWVGFvDR9Gm28AJtHG7at4FpbhupmXpcJjbfL+7 hbg== X-Google-Smtp-Source: AGHT+IFbRbqaBrY7d4/KtZu0P0lzYHLGSRadSQz6yWVCTaGeoEW5JB7BZVzyBe4cW4XcHY+22agvdg== X-Received: by 2002:a05:6e02:156a:b0:375:a6a4:5dde with SMTP id e9e14a558f8ab-3763f6c7560mr27235525ab.30.1719165387225; Sun, 23 Jun 2024 10:56:27 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3762f2fb1bbsm13551465ab.12.2024.06.23.10.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:56:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Heinrich Schuchardt , Alexey Brodkin Subject: [PATCH v3 3/6] buildman: Fix a few typos in toolchain code Date: Sun, 23 Jun 2024 11:56:19 -0600 Message-Id: <20240623175622.1468600-4-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175622.1468600-1-sjg@chromium.org> References: <20240623175622.1468600-1-sjg@chromium.org> MIME-Version: 1.0 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 Fix 'Thie' and capitalise 'unicode'. Signed-off-by: Simon Glass Suggested-by: Heinrich Schuchardt Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add new patch to fix a few typos in toolchain code tools/buildman/toolchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 79c7c11a110..324ad0e0821 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -175,9 +175,9 @@ class Toolchain: def MakeEnvironment(self, full_path): """Returns an environment for using the toolchain. - Thie takes the current environment and adds CROSS_COMPILE so that + This takes the current environment and adds CROSS_COMPILE so that the tool chain will operate correctly. This also disables localized - output and possibly unicode encoded output of all build tools by + output and possibly Unicode encoded output of all build tools by adding LC_ALL=C. Note that os.environb is used to obtain the environment, since in some From patchwork Sun Jun 23 17:56:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951299 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=Dr6hADCo; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W6f4Z2qJXz20WR for ; Mon, 24 Jun 2024 03:59:42 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EE2DB88551; Sun, 23 Jun 2024 19:56:34 +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="Dr6hADCo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0822F88610; Sun, 23 Jun 2024 19:56:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 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-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (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 5BF93881BA for ; Sun, 23 Jun 2024 19:56:29 +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-xd41.google.com with SMTP id ca18e2360f4ac-7ea0b5e0977so150011139f.2 for ; Sun, 23 Jun 2024 10:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165388; x=1719770188; darn=lists.denx.de; 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=1ZuVtE/Ly1/A7/OuJHCiz8niV93yG/N2oSyd6PxIWPA=; b=Dr6hADCo/oPnuGbXpgVGz6zeONuZ5Txf20NFgIEElTciZ6JnvhT6jK1gFBchUPGJhL GD26aSHx1WwA5bgdxodBOwkdNPi0dS5Wl4egeU2qU5OaR2Q8pQDDJxr/eZjCcjphvErz 4Q8WT9ZoPsG/JRPytm90iJSLRshn6/ztxm70s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165388; x=1719770188; 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=1ZuVtE/Ly1/A7/OuJHCiz8niV93yG/N2oSyd6PxIWPA=; b=SFtwzokvkGlYsFzQ5aNQ6xL4TY1LdtD13ajyriVELf1me/40fMIrm1EovNarzN2mT3 pROqxMhOm7ilnWyB4ilzEGVgfrS6wCKbtVv8aKvbvPs+hgj8w0tpdCCcOcXS8fO8sx2Q g91Zk4xcdZFJbcF8Bas7cYNJhufeHpAl+/DrPpdFPtwXwxZk5TCWwCvzL46UcQT4uyOa LsmJi9OeLXr2rKfCLxBKilYWlGX88zTuukWcBuVB5KbxbbcUGJUVbffFpjLXmLY0T2/c +bzotgrsvqB1+VVUMflcA/oYQV9KxDbX9unWRpe31dYmm0STWsRWlanijegv9rnfnmw+ jUCw== X-Gm-Message-State: AOJu0YwNi4gYM98NoxRKSP3El0GfavNvlFL/hYYWsLXvltoOyRsJuZwA oM6IHZs27agbMxLPFltcz2xNM8EFjTySCePeW4a/VlJG2PlxAYOQ3qr14DuzvLXci0HmhDmo6yB JCOpb X-Google-Smtp-Source: AGHT+IHHorwBEuTWiqE5AqskQa1C7wa1Qtsy37r0QpICB5gkQCw/d+Z4CdLJMG/X4Cj0hxCMBI7hSQ== X-Received: by 2002:a92:ca4d:0:b0:376:490c:482d with SMTP id e9e14a558f8ab-376490c4943mr8785975ab.9.1719165387921; Sun, 23 Jun 2024 10:56:27 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3762f2fb1bbsm13551465ab.12.2024.06.23.10.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:56:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Alexey Brodkin , Heinrich Schuchardt , Quentin Schulz Subject: [PATCH v3 4/6] buildman: Always use the full path in CROSS_COMPILE Date: Sun, 23 Jun 2024 11:56:20 -0600 Message-Id: <20240623175622.1468600-5-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175622.1468600-1-sjg@chromium.org> References: <20240623175622.1468600-1-sjg@chromium.org> MIME-Version: 1.0 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 The feature to set the toolchain path does not seem to be needed. It causes problems with venv (see [1]). Let's remove it. Add some tests while we are here. It does not look like any docs changes are needed for this. [1] https://patchwork.ozlabs.org/project/uboot/patch/20240621131423.2363294-6-sjg@chromium.org/ Signed-off-by: Simon Glass Suggested-by: Tom Rini Reviewed-by: Tom Rini Reviewed-by: Andrejs Cainikovs --- Changes in v3: - Drop the PATH modification altogether tools/buildman/bsettings.py | 3 ++ tools/buildman/builder.py | 5 +-- tools/buildman/builderthread.py | 4 +- tools/buildman/cmdline.py | 2 - tools/buildman/control.py | 6 +-- tools/buildman/test.py | 75 +++++++++++++++++++++++++++++++++ tools/buildman/toolchain.py | 20 ++++----- 7 files changed, 92 insertions(+), 23 deletions(-) diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py index e225ac2ca0f..1be1d45e0fa 100644 --- a/tools/buildman/bsettings.py +++ b/tools/buildman/bsettings.py @@ -31,6 +31,9 @@ def setup(fname=''): def add_file(data): settings.readfp(io.StringIO(data)) +def add_section(name): + settings.add_section(name) + def get_items(section): """Get the items from a section of the config. diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index f35175b4598..7c563cddada 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -255,7 +255,7 @@ class Builder: def __init__(self, toolchains, base_dir, git_dir, num_threads, num_jobs, gnu_make='make', checkout=True, show_unknown=True, step=1, - no_subdirs=False, full_path=False, verbose_build=False, + no_subdirs=False, verbose_build=False, mrproper=False, per_board_out_dir=False, config_only=False, squash_config_y=False, warnings_as_errors=False, work_in_output=False, @@ -279,8 +279,6 @@ class Builder: step: 1 to process every commit, n to process every nth commit no_subdirs: Don't create subdirectories when building current source for a single board - full_path: Return the full path in CROSS_COMPILE and don't set - PATH verbose_build: Run build with V=1 and don't use 'make -s' mrproper: Always run 'make mrproper' when configuring per_board_out_dir: Build in a separate persistent directory per @@ -336,7 +334,6 @@ class Builder: self._step = step self._error_lines = 0 self.no_subdirs = no_subdirs - self.full_path = full_path self.verbose_build = verbose_build self.config_only = config_only self.squash_config_y = squash_config_y diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index a8599c0bb2a..c23c3254d2d 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -404,7 +404,7 @@ class BuilderThread(threading.Thread): the next incremental build """ # Set up the environment and command line - env = self.toolchain.MakeEnvironment(self.builder.full_path) + env = self.toolchain.MakeEnvironment() mkdir(out_dir) args, cwd, src_dir = self._build_args(brd, out_dir, out_rel_dir, @@ -569,7 +569,7 @@ class BuilderThread(threading.Thread): outf.write(f'{result.return_code}') # Write out the image and function size information and an objdump - env = result.toolchain.MakeEnvironment(self.builder.full_path) + env = result.toolchain.MakeEnvironment() with open(os.path.join(build_dir, 'out-env'), 'wb') as outf: for var in sorted(env.keys()): outf.write(b'%s="%s"' % (var, env[var])) diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py index 03211bd5aa5..5fda90508f2 100644 --- a/tools/buildman/cmdline.py +++ b/tools/buildman/cmdline.py @@ -121,8 +121,6 @@ def add_after_m(parser): help="Override host toochain to use for sandbox (e.g. 'clang-7')") parser.add_argument('-Q', '--quick', action='store_true', default=False, help='Do a rough build, with limited warning resolution') - parser.add_argument('-p', '--full-path', action='store_true', - default=False, help="Use full toolchain path in CROSS_COMPILE") parser.add_argument('-P', '--per-board-out-dir', action='store_true', default=False, help="Use an O= (output) directory per board rather than per thread") parser.add_argument('--print-arch', action='store_true', diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 8f6850c5211..3ca9e2e8761 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -653,10 +653,8 @@ def do_buildman(args, toolchains=None, make_func=None, brds=None, builder = Builder(toolchains, output_dir, git_dir, args.threads, args.jobs, checkout=True, show_unknown=args.show_unknown, step=args.step, - no_subdirs=args.no_subdirs, full_path=args.full_path, - verbose_build=args.verbose_build, - mrproper=args.mrproper, - per_board_out_dir=args.per_board_out_dir, + no_subdirs=args.no_subdirs, verbose_build=args.verbose_build, + mrproper=args.mrproper, per_board_out_dir=args.per_board_out_dir, config_only=args.config_only, squash_config_y=not args.preserve_config_y, warnings_as_errors=args.warnings_as_errors, diff --git a/tools/buildman/test.py b/tools/buildman/test.py index f92add7a7c5..ae9963eed4f 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -146,6 +146,7 @@ class TestBuild(unittest.TestCase): self.toolchains.Add('arm-linux-gcc', test=False) self.toolchains.Add('sparc-linux-gcc', test=False) self.toolchains.Add('powerpc-linux-gcc', test=False) + self.toolchains.Add('/path/to/aarch64-linux-gcc', test=False) self.toolchains.Add('gcc', test=False) # Avoid sending any output @@ -747,6 +748,80 @@ class TestBuild(unittest.TestCase): self.assertEqual([ ['MARY="mary"', 'Missing expected line: CONFIG_MARY="mary"']], result) + def call_make_environment(self, tchn, in_env=None): + """Call Toolchain.MakeEnvironment() and process the result + + Args: + tchn (Toolchain): Toolchain to use + in_env (dict): Input environment to use, None to use current env + + Returns: + tuple: + dict: Changes that MakeEnvironment has made to the environment + key: Environment variable that was changed + value: New value (for PATH this only includes components + which were added) + str: Full value of the new PATH variable + """ + env = tchn.MakeEnvironment(env=in_env) + + # Get the original environment + orig_env = dict(os.environb if in_env is None else in_env) + orig_path = orig_env[b'PATH'].split(b':') + + # Find new variables + diff = dict((k, env[k]) for k in env if orig_env.get(k) != env[k]) + + # Find new / different path components + diff_path = None + new_path = None + if b'PATH' in diff: + new_path = diff[b'PATH'].split(b':') + diff_paths = [p for p in new_path if p not in orig_path] + diff_path = b':'.join(p for p in new_path if p not in orig_path) + if diff_path: + diff[b'PATH'] = diff_path + else: + del diff[b'PATH'] + return diff, new_path + + def test_toolchain_env(self): + """Test PATH and other environment settings for toolchains""" + # Use a toolchain which has a path + tchn = self.toolchains.Select('aarch64') + + # Normal case + diff = self.call_make_environment(tchn)[0] + self.assertEqual( + {b'CROSS_COMPILE': b'/path/to/aarch64-linux-', b'LC_ALL': b'C'}, + diff) + + # When overriding the toolchain, only LC_ALL should be set + tchn.override_toolchain = True + diff = self.call_make_environment(tchn)[0] + self.assertEqual({b'LC_ALL': b'C'}, diff) + + # Test that virtualenv is handled correctly + tchn.override_toolchain = False + sys.prefix = '/some/venv' + env = dict(os.environb) + env[b'PATH'] = b'/some/venv/bin:other/things' + tchn.path = '/my/path' + diff, diff_path = self.call_make_environment(tchn, env) + + self.assertNotIn(b'PATH', diff) + self.assertEqual(None, diff_path) + self.assertEqual( + {b'CROSS_COMPILE': b'/my/path/aarch64-linux-', b'LC_ALL': b'C'}, + diff) + + # Handle a toolchain wrapper + tchn.path = '' + bsettings.add_section('toolchain-wrapper') + bsettings.set_item('toolchain-wrapper', 'my-wrapper', 'fred') + diff = self.call_make_environment(tchn)[0] + self.assertEqual( + {b'CROSS_COMPILE': b'fred aarch64-linux-', b'LC_ALL': b'C'}, diff) if __name__ == "__main__": unittest.main() diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 324ad0e0821..739acf3ec53 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -90,7 +90,7 @@ class Toolchain: if self.arch == 'sandbox' and override_toolchain: self.gcc = override_toolchain - env = self.MakeEnvironment(False) + env = self.MakeEnvironment() # As a basic sanity check, run the C compiler with --version cmd = [fname, '--version'] @@ -172,7 +172,7 @@ class Toolchain: else: raise ValueError('Unknown arg to GetEnvArgs (%d)' % which) - def MakeEnvironment(self, full_path): + def MakeEnvironment(self, env=None): """Returns an environment for using the toolchain. This takes the current environment and adds CROSS_COMPILE so that @@ -188,25 +188,23 @@ class Toolchain: 569-570: surrogates not allowed Args: - full_path: Return the full path in CROSS_COMPILE and don't set - PATH + env (dict of bytes): Original environment, used for testing + Returns: Dict containing the (bytes) environment to use. This is based on the - current environment, with changes as needed to CROSS_COMPILE, PATH - and LC_ALL. + current environment, with changes as needed to CROSS_COMPILE and + LC_ALL. """ - env = dict(os.environb) + env = dict(env or os.environb) + wrapper = self.GetWrapper() if self.override_toolchain: # We'll use MakeArgs() to provide this pass - elif full_path: + else: env[b'CROSS_COMPILE'] = tools.to_bytes( wrapper + os.path.join(self.path, self.cross)) - else: - env[b'CROSS_COMPILE'] = tools.to_bytes(wrapper + self.cross) - env[b'PATH'] = tools.to_bytes(self.path) + b':' + env[b'PATH'] env[b'LC_ALL'] = b'C' From patchwork Sun Jun 23 17:56:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951301 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=C6X1ufNe; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W6f4z6C5Fz20WR for ; Mon, 24 Jun 2024 04:00:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F018388630; Sun, 23 Jun 2024 19:56:37 +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="C6X1ufNe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D158587D10; Sun, 23 Jun 2024 19:56:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 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-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 E034F88578 for ; Sun, 23 Jun 2024 19:56:29 +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-x12f.google.com with SMTP id e9e14a558f8ab-375af3538f2so15412935ab.3 for ; Sun, 23 Jun 2024 10:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165388; x=1719770188; darn=lists.denx.de; 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=eIaUHtmxOCoDPB8Dr2EtcMBBfsP4hsti4aYZcgI3OQk=; b=C6X1ufNe64VenVJs9zwAM3qUMahVzigpAGtPEb25ylCn/T5o6aYo4S1J+eGAzsAuEm SmtW0NLVBFwaQ3KN5b4/TghbsJvsd4VFXj2FbLY1JlUCYG6aoKSVeXpMo52nrLTWSAa9 5l6BPs56Imt3aqTVDfKEj0Dfw8O1Dv9X6wP3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165388; x=1719770188; 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=eIaUHtmxOCoDPB8Dr2EtcMBBfsP4hsti4aYZcgI3OQk=; b=pOtqhKyWgjKWvzaufHtgGekKIYLoZQ0okyIpg7EgEhE6j9hnQ/ojj5jI9e+THJkLMf ncEHQmIZSOURO+4t5WbEqj02jMy6fEacqjSObpdVsUQfqAWmqshTNtuo9G0Rm/ByRWot ImwAkXkFtIU57xdqn6NTSxONN6fdrb40vKXA418aN1Rda3TBpiq+UJCzT4g8sDwtlwHP GypBLFNcMPdSxpkjarGUyBIsK5V8V1fBK1zxT0zYmF298IqNCYSkGysxpsVMJCVtCur+ bhiacP12BZeG9zjEKemEE9EVgxIOVuXug7Ag/NogKhba9BbClKLCSoRDHDRuTm4olw3V YC6w== X-Gm-Message-State: AOJu0YxrhlLxrXUlhNGpbWcKENOgWDdyg7Q6QGgZZH3+ayW4ZEeUPtFm 9e5CUMjE6jSYZtPtXK8A259Z+JaRp9dwPf/hhXojNZ639yZSRKVfEU9WyeC18h3xgnEf7cjOwIi orw== X-Google-Smtp-Source: AGHT+IGe3H6LRMdJ65/o9U+tc6l3ZQDlMQytjXMf/bynrR1biga45AN5HUafJ9lEI6betldPVWq0BA== X-Received: by 2002:a05:6e02:180b:b0:374:9a34:9ee with SMTP id e9e14a558f8ab-3763f709301mr29017455ab.31.1719165388593; Sun, 23 Jun 2024 10:56:28 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3762f2fb1bbsm13551465ab.12.2024.06.23.10.56.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:56:28 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v3 5/6] u_boot_pylib: Use correct coverage tool within venv Date: Sun, 23 Jun 2024 11:56:21 -0600 Message-Id: <20240623175622.1468600-6-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175622.1468600-1-sjg@chromium.org> References: <20240623175622.1468600-1-sjg@chromium.org> MIME-Version: 1.0 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 When running within a Python venv we must use the 'coverage' tool (which is within the venv) so that the venv packages are used in preference to system packages. Otherwise the coverage tests run in a different environment from the normal tests and may fail due to missing packages. Handle this by detecting the venv and changing the tool name. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- (no changes since v1) tools/u_boot_pylib/test_util.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/u_boot_pylib/test_util.py b/tools/u_boot_pylib/test_util.py index f18d385d995..857ce58c98c 100644 --- a/tools/u_boot_pylib/test_util.py +++ b/tools/u_boot_pylib/test_util.py @@ -60,12 +60,17 @@ def run_test_coverage(prog, filter_fname, exclude_list, build_dir, required=None prefix = '' if build_dir: prefix = 'PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools ' % build_dir - cmd = ('%spython3-coverage run ' - '--omit "%s" %s %s %s %s' % (prefix, ','.join(glob_list), + + # Detect a Python virtualenv and use 'coverage' instead + covtool = ('python3-coverage' if sys.prefix == sys.base_prefix else + 'coverage') + + cmd = ('%s%s run ' + '--omit "%s" %s %s %s %s' % (prefix, covtool, ','.join(glob_list), prog, extra_args or '', test_cmd, single_thread or '-P1')) os.system(cmd) - stdout = command.output('python3-coverage', 'report') + stdout = command.output(covtool, 'report') lines = stdout.splitlines() if required: # Convert '/path/to/name.py' just the module name 'name' From patchwork Sun Jun 23 17:56:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951300 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=jHejtTHz; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W6f4n4tstz20WR for ; Mon, 24 Jun 2024 03:59:53 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7325688629; Sun, 23 Jun 2024 19:56:37 +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="jHejtTHz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB6F18861D; Sun, 23 Jun 2024 19:56:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 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-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (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 9E1FC885DF for ; Sun, 23 Jun 2024 19:56:30 +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-x133.google.com with SMTP id e9e14a558f8ab-376243a112cso13472735ab.3 for ; Sun, 23 Jun 2024 10:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165389; x=1719770189; darn=lists.denx.de; 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=NePPf6Rqm1FkuXQRIwrNi0KwP1+VrAe1HF5+P7iE5Nk=; b=jHejtTHzz20xJuu6p6t34lPt3lvXnZaFZKQaYFQ1DIj9Nf13UO5p2qsJP+1njdpM9I MDA13/Cq3rPV8+p8k8POL+TTsy6KXpM/Sl7TtNN6hIwM2Wqz43qWTk0kDUdf9PNeorEC Zb1unIWZYz9u2pGxEscVXfzvJdaMF20KCZxMo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165389; x=1719770189; 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=NePPf6Rqm1FkuXQRIwrNi0KwP1+VrAe1HF5+P7iE5Nk=; b=OvBUkIifYZzGcEBNTjQPlLGZXU6wGuRD5tMCheU5ni+sKQFn242F+antTEea8E72lj slYVxwFUOJ9Sgt+5O1b0N19AwR+Fo9W1mJGT6bd7P14QT6MGQ70rEa0/EIzUeR0ZuNXQ ScuTflNS9DiZgRANYsvhQ4XQDN8xfD3MTxfV2BSNsTsTSDnfzndnt3bBUFT8iyurO3Eo CIOHtEzLkdghh8RU4ONhSMHUflkW0hNn+c9Gr08w/2MaSeGY/1Oe7htTKx9wIrNu3+Oo jJg9l353EuJ7wsaRF6igzOKjAcRT3xKqQhkMNzCMBrGWeZFDZWzmW4VLtZ9wsNMMiaV4 5gMw== X-Gm-Message-State: AOJu0YzaaOJIPdeFv0SGd6c8dM6yx+JCBBiftmJXSL09YmrO3eoOtICv 9tf8+5DkkIuhs2T6L3NvVCFSL12m/+w2KAmFwFCuGTyr2svA4sF8APe/Upw/ozrnpDCU+rkdfqQ RLQ== X-Google-Smtp-Source: AGHT+IEyXQ9Z+z61Os1YGQCijtHznj01LjYYDhWMq9xUOc8fBKBhXpQuKiIHsBqd1Wp6LSj0HvEjpA== X-Received: by 2002:a05:6e02:1d92:b0:375:b567:a6af with SMTP id e9e14a558f8ab-3763df8e3e2mr39079195ab.12.1719165389249; Sun, 23 Jun 2024 10:56:29 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3762f2fb1bbsm13551465ab.12.2024.06.23.10.56.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:56:29 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Andrejs Cainikovs , Leo Yu-Chi Liang , Marek Vasut , Sean Anderson Subject: [PATCH v3 6/6] CI: Run code-coverage test for Binman Date: Sun, 23 Jun 2024 11:56:22 -0600 Message-Id: <20240623175622.1468600-7-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175622.1468600-1-sjg@chromium.org> References: <20240623175622.1468600-1-sjg@chromium.org> MIME-Version: 1.0 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 Binman includes a good set of tests covering all of its functionality. This includes a code-coverage test. However to date the code-coverage test has not been checked automatically by CI, relying on people to run 'binman test -T' themselves. Plug the gap to avoid bugs creeping in future. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Add to azure also (oops) .azure-pipelines.yml | 5 ++++- .gitlab-ci.yml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 27f69583c65..65d1d639e49 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -128,7 +128,10 @@ stages: export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH} ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board tools-only set -ex - ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test + export TOOLPATH="--toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools --toolpath /opt/coreboot" + ./tools/binman/binman ${TOOLPATH} test + # Avoid "Permission denied: 'cov'" error by using a temporary file + COVERAGE_FILE=/tmp/.coverage ./tools/binman/binman ${TOOLPATH} test -T ./tools/buildman/buildman -t ./tools/dtoc/dtoc -t ./tools/patman/patman test diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 165f765a833..eb01fa4868d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -201,7 +201,9 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board tools-only; set -e; - ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test; + export TOOLPATH="--toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools --toolpath /opt/coreboot"; + ./tools/binman/binman ${TOOLPATH} test; + ./tools/binman/binman ${TOOLPATH} test -T; ./tools/buildman/buildman -t; ./tools/dtoc/dtoc -t; ./tools/patman/patman test;