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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 176CFC433F5 for ; Wed, 20 Oct 2021 03:43:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4766B60EE2 for ; Wed, 20 Oct 2021 03:43:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4766B60EE2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 574718311B; Wed, 20 Oct 2021 05:43:38 +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="YGBgxAE5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DAB7382DA1; Wed, 20 Oct 2021 05:43:35 +0200 (CEST) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 350BA82DF7 for ; Wed, 20 Oct 2021 05:43: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=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id x27-20020a9d459b000000b0055303520cc4so6633548ote.13 for ; Tue, 19 Oct 2021 20:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ds2kq5E6611c2Q9J++mpoNEuYiSA6BftS78FwTTKfuI=; b=YGBgxAE5aH2un/87qHNKu8N2Z+n+s1GFIqz3m4wu8QsW8u1VFQtehSyYAfeobLiQjx 85sVoL3WzxlpbnrncrGNbjUFOZYQSGgwg9Ra9GLQraOjj7j/0OvsOF14WaxZ3vVXmV+N FHoO+REOvmM8uVqwtnSND/+3jETQs4t50BIeg= 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:mime-version :content-transfer-encoding; bh=Ds2kq5E6611c2Q9J++mpoNEuYiSA6BftS78FwTTKfuI=; b=dlRRfNNwWPumspo0YgCWwdv68xCWE9fgoPrJpDxcuNF40ywh/ABHoAt0SbEuGdN0x6 iUzZQkBisXUMptCFsFRNG8Y6GD0jA7Cw/weG8UDmQtjht5IsVD+Z5M6iImTryELdTan9 HiwBX6j34yye5dm8KhODJdjhbB9hI+xdBBtQGRk+WdyXu2BbpiS+h/HFLlW0GTPz4P9m xE5h+HJngwBJtkxowelCi0cSpp+bKuIBxX8ukymdXJ7nYNH7Pc6UUXrqkCXDsmwc7UlG I75cOP69uCQwaPRWhmRYk/IfYr4Mf6MtL5W2N1gNSRoCU5fXOyutK/6keXu8/u6x0fOG lm7Q== X-Gm-Message-State: AOAM531Q4xCP9GwM0wHEJpygaa83gK+rwJ+VZ+GZVBnRHJI9unzTf8Or H8PNIsbbnuUVrG9rpADvJRWyzof5xr6HxQ== X-Google-Smtp-Source: ABdhPJyoMLejmU2HKFTE6ZNP7ZbWcKzvGSB2bXtML/pW9YZ5UidZIaGF9B0ZGYBRjpazWJVfd1iknQ== X-Received: by 2002:a05:6830:1ae2:: with SMTP id c2mr8932001otd.64.1634701410383; Tue, 19 Oct 2021 20:43:30 -0700 (PDT) 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 r184sm228280oia.38.2021.10.19.20.43.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 20:43:29 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Stefano Babic , Tom Rini , Simon Glass Subject: [PATCH 1/3] buildman: Write output even on fatal error Date: Tue, 19 Oct 2021 21:43:23 -0600 Message-Id: <20211020034325.1497038-1-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 buildman does not write any output (to the 'out' and 'err) files if the build terminates with a fatal error. This is to avoid adding lots of spam to the logs. However there are times when this is actually useful, such as when the build fails for an obscure reason such as a Kconfig loop. Update the logic to always write the output, so that the user gets a clue as to what is happening. Signed-off-by: Simon Glass --- tools/buildman/builderthread.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 48128cf6732..3e450e40670 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -300,16 +300,12 @@ class BuilderThread(threading.Thread): work_in_output: Use the output directory as the work directory and don't write to a separate output directory. """ - # Fatal error - if result.return_code < 0: - return - # If we think this might have been aborted with Ctrl-C, record the # failure but not that we are 'done' with this board. A retry may fix # it. - maybe_aborted = result.stderr and 'No child processes' in result.stderr + maybe_aborted = result.stderr and 'No child processes' in result.stderr - if result.already_done: + if result.return_code >= 0 and result.already_done: return # Write the output and stderr @@ -332,6 +328,10 @@ class BuilderThread(threading.Thread): elif os.path.exists(errfile): os.remove(errfile) + # Fatal error + if result.return_code < 0: + return + if result.toolchain: # Write the build result and toolchain information. done_file = self.builder.GetDoneFile(result.commit_upto, -- 2.33.0.1079.g6e70778dc9-goog