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 B9D4BC0015E for ; Wed, 19 Jul 2023 23:56:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBFD186858; Thu, 20 Jul 2023 01:51: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="Jok52tsS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 846FB867D4; Thu, 20 Jul 2023 01:50:33 +0200 (CEST) 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 AF075867CC for ; Thu, 20 Jul 2023 01:50: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-x12f.google.com with SMTP id e9e14a558f8ab-345e55a62d8so1544745ab.3 for ; Wed, 19 Jul 2023 16:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689810626; x=1690415426; 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=vSvQBBT6JfruRI1k2weaui8hfukhj9t0HAZEnqf2z9E=; b=Jok52tsSWBnyijbjfQxmdk3+5CkfUpyh1hpXAU9LTifNdJf4APJP2URON+2X4W4MZn Ntzi+sbZiNEDmOBDkYzroVm8OFGoIr7SoPVGNHPeHjUZwod5yiXEf7ImYf3520ovIGLF z5p+cBkaQmim5TIjAKdiVwrbdwzwST38ieCcE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689810626; x=1690415426; 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=vSvQBBT6JfruRI1k2weaui8hfukhj9t0HAZEnqf2z9E=; b=JfgppeUs+S3i9hGTBV/FcPNPmqKixcXYLxn4Qp2o2f6GtbgWq5YqHDv0zRkbpYUlea 5g/f/OaaWYoQ3PaqANHWBDHxpQhQ691lf0A4Ce3YU6j1ohZuLufoEhBNr9J7MUF+4/hA idck8DUXqL5TzSh3AFOoVcfHV+sH4alO01EbXMxu1RNMjWZQOGKFZYWY73i1YXj+Yko8 xUfx2VUWZy7LeI0u9fCxFQ4eX3gRCJMmGe1GCj2DHCJrCFGSCs63FZVDrMDtn/C1cx9s bdZmJFRLBwruuHNw5z2JFuy6jkCr+XNBYjnAwKwqRi+akiwNCFr55V7bQVmcC2MKpfiV J1bw== X-Gm-Message-State: ABy/qLZWeh18mv7zzmp0YydC4/dRpAGLcWRmzxKLKygzT/z5a2TocmG/ zUIIORbDDWHUO1P5EgwmL/OGX8LdRDI9wm+iAgk= X-Google-Smtp-Source: APBJJlGamLJfUWGVntzkxg9i153YDle5R8Uzfp/8+fPYqAj6eq8UZJPHW31lcIdBwIxQ/IJYh1hzNg== X-Received: by 2002:a05:6e02:1d09:b0:348:7ac8:ce6b with SMTP id i9-20020a056e021d0900b003487ac8ce6bmr598515ila.17.1689810626150; Wed, 19 Jul 2023 16:50:26 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id ed16-20020a056638291000b0042bb1779c18sm1551779jab.151.2023.07.19.16.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 16:50:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v4 36/83] buildman: Move output-file setup into one place Date: Wed, 19 Jul 2023 17:48:44 -0600 Message-ID: <20230719234953.796101-37-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230719234953.796101-1-sjg@chromium.org> References: <20230719234953.796101-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Collect the two parts of the output-file handling into single place. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/control.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/buildman/control.py b/tools/buildman/control.py index b6cd9787fbbd..a9e5b84c4b8e 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -415,6 +415,13 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None, if options.work_in_output: sys.exit(col.build(col.RED, '-w requires that you specify -o')) output_dir = '..' + if options.branch and not options.no_subdirs: + # As a special case allow the board directory to be placed in the + # output directory itself rather than any subdirectory. + dirname = options.branch.replace('/', '_') + output_dir = os.path.join(output_dir, dirname) + if clean_dir and os.path.exists(output_dir): + shutil.rmtree(output_dir) # Work out what subset of the boards we are building if not brds: @@ -461,14 +468,6 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None, options.branch) # Create a new builder with the selected options. - if options.branch: - dirname = options.branch.replace('/', '_') - # As a special case allow the board directory to be placed in the - # output directory itself rather than any subdirectory. - if not options.no_subdirs: - output_dir = os.path.join(output_dir, dirname) - if clean_dir and os.path.exists(output_dir): - shutil.rmtree(output_dir) # For a dry run, just show our actions as a sanity check if options.dry_run: -- 2.41.0.487.g6d72f3e995-goog