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 0DDD1C0015E for ; Sun, 16 Jul 2023 00:47:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A329D866E1; Sun, 16 Jul 2023 02:40:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="U1HYayuc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F7038664D; Sun, 16 Jul 2023 02:38:27 +0200 (CEST) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 D79FC863E8 for ; Sun, 16 Jul 2023 02:38:06 +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-xd2f.google.com with SMTP id ca18e2360f4ac-7835e2286c4so153605839f.1 for ; Sat, 15 Jul 2023 17:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467885; x=1692059885; 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=MtHkbn/hfjHqBw241+J9Mfb+GLpTfU3cNIu0ZzLIEjs=; b=U1HYayucUYm3Y9Quubyk/vw2jqIhFyq59M/eE1HHSh7Cag+YkGm+ynDTH/CsUjdi6t vZmo2lD8UJstZTpJWETwvh4x2EkBg8ThSBkvEWSvz9+sbVuwlF3l3kaamXQzPCF+hBRj OsoMYsILtM+myagWsmnPdzU1mCpE4u5RJgDkY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467885; x=1692059885; 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=MtHkbn/hfjHqBw241+J9Mfb+GLpTfU3cNIu0ZzLIEjs=; b=Lyc9PP90LZkzXXCZwV/UZmws59BeiSlxQJuk/eppOIilliAZkvrBAuVZfGlTccUII9 0Mqy/WQTAc9rhkasOJRlr2yEm5w6FPEJSlhjHCX1qJTP4ydgxP0MnMqj2CKAFXUqkDcZ wpfdae9OsWK7sU3odYbON1Ho6LESCNWrv/z84+gQKN+Bxn4G9Iy91urxg0AyJfFfZIiJ VITITCe4/2VMUBk1GDEITqWjaGBnooyRxqBDyDo5Y49eoVA3Gl/PDDrSt5x8yxIkfY9D cR54+XHMdKiHUo8vSPho5QFMaykzCyUEHbm3ir3QCh9AVgpSDa9Ec0IGKKymnISfdCqi fG4A== X-Gm-Message-State: ABy/qLaEakeTl9PVcS4rMZDexnNQ2hKCiPvi65aPBM3iIj+VpUA+Wr9V X6b9Vaer4J1x27/VdkepS3AAUZjm5BupIaxWGj4= X-Google-Smtp-Source: APBJJlHLJdqCMSdcHQwPZ5EsJX3q0pERI3jqigbr2hX2y8ePKpgvzEQZUWVFwQBY6zzOukVdbPDq2g== X-Received: by 2002:a92:d6ca:0:b0:345:cdbe:833c with SMTP id z10-20020a92d6ca000000b00345cdbe833cmr7634544ilp.28.1689467885509; Sat, 15 Jul 2023 17:38:05 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id t3-20020a05663801e300b0042b52dc77e3sm3510512jaq.158.2023.07.15.17.38.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:38:05 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 60/81] buildman: Export _get_output_dir() to avoid warnings Date: Sat, 15 Jul 2023 18:36:28 -0600 Message-ID: <20230716003718.231903-61-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.455.g037347b96a-goog In-Reply-To: <20230716003718.231903-1-sjg@chromium.org> References: <20230716003718.231903-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Make this a public memory since it is used outside the class. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/builder.py | 8 ++++---- tools/buildman/builderthread.py | 2 +- tools/buildman/test.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 4cc266ff3049..ecbd368c47a5 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -565,7 +565,7 @@ class Builder: terminal.print_clear() tprint(line, newline=False, limit_to_line=True) - def _get_output_dir(self, commit_upto): + def get_output_dir(self, commit_upto): """Get the name of the output directory for a commit number The output directory is typically ...//. @@ -598,7 +598,7 @@ class Builder: commit_upto: Commit number to use (0..self.count-1) target: Target name """ - output_dir = self._get_output_dir(commit_upto) + output_dir = self.get_output_dir(commit_upto) if self.work_in_output: return output_dir return os.path.join(output_dir, target) @@ -1717,7 +1717,7 @@ class Builder: Figure out what needs to be deleted in the output directory before it can be used. We only delete old buildman directories which have the - expected name pattern. See _get_output_dir(). + expected name pattern. See get_output_dir(). Returns: List of full paths of directories to remove @@ -1726,7 +1726,7 @@ class Builder: return dir_list = [] for commit_upto in range(self.commit_count): - dir_list.append(self._get_output_dir(commit_upto)) + dir_list.append(self.get_output_dir(commit_upto)) to_remove = [] for dirname in glob.glob(os.path.join(self.base_dir, '*')): diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 179fc477c008..45ae6edf9f48 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -351,7 +351,7 @@ class BuilderThread(threading.Thread): return # Write the output and stderr - output_dir = self.builder._get_output_dir(result.commit_upto) + output_dir = self.builder.get_output_dir(result.commit_upto) mkdir(output_dir) build_dir = self.builder.get_build_dir(result.commit_upto, result.brd.target) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 7ac67260c337..bdd3d84158a6 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -528,7 +528,7 @@ class TestBuild(unittest.TestCase): 'sandbox']), ({'all': ['board4'], 'sandbox': ['board4']}, [])) def CheckDirs(self, build, dirname): - self.assertEqual('base%s' % dirname, build._get_output_dir(1)) + self.assertEqual('base%s' % dirname, build.get_output_dir(1)) self.assertEqual('base%s/fred' % dirname, build.get_build_dir(1, 'fred')) self.assertEqual('base%s/fred/done' % dirname, -- 2.41.0.455.g037347b96a-goog