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 B61F8C0015E for ; Sun, 16 Jul 2023 00:50:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D5CCF8676E; Sun, 16 Jul 2023 02:40:49 +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="ltnU3mjv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D0C988630D; Sun, 16 Jul 2023 02:38:43 +0200 (CEST) Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 C40C78662B for ; Sun, 16 Jul 2023 02:38:17 +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-xd2d.google.com with SMTP id ca18e2360f4ac-77acb04309dso173083839f.2 for ; Sat, 15 Jul 2023 17:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467896; x=1692059896; 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=BOk24La7kOjVW1yyuZ9NDYFgErzdP6FmCIpLJgtZ7yU=; b=ltnU3mjvN/lDmEpnK7WW0Yo1C9v4QtbuTudKb4Dhc5Yu+8lwhNeXnlS6oZX8kr1Bll 5mHHxLyG/nq7ndi3OuTV/ZP8KOSCfq1pXaWNcKYD0mCLglR8Fdn6k1tGlx49mONzfA+y j9jx/qGMI3eUpHBSx1AUlj3TzvkE0oYNHJUds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467896; x=1692059896; 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=BOk24La7kOjVW1yyuZ9NDYFgErzdP6FmCIpLJgtZ7yU=; b=KNNPTstCLUAMZbW88En3eUySLvc6XN3KvZaiq2vpwArEYJ0AM9OYH/ZWvz97iAIr5n JVNo0rVl+Zlsanw4cm/e+StH2tPXI7/bQag2IcsAS5FMVPFuh7Vxi/VrQO5EPHsNB6yj jBFe/IZ0tP9m/6WiaQ6cvNH72ZwsCfO5iqP+k1GriD+nqwOUq6RHYz6YtnUz/C1XcjQq jFmQU+BPbHQqr8MO8SgJLkyeUv7oP4tawvzG1u0zpDa6jSHzQF05wTWtDCmfTmL4XCV0 AU9H8NgSp5eNMWDuAXXfhzMvKvfyoQSorWVA4TVoTNUZL1ktJjIjRkOvO2gBIGwcWs5e +MZg== X-Gm-Message-State: ABy/qLa4jD49iKEYiG1DzFgdt0cWWka0BBEnsyRTdAubvrEJzDVPqL3V Y0K37hTw478TH47d9p9a6xFtwMzBPYbIpQOnGqc= X-Google-Smtp-Source: APBJJlHy10UDiTs0XvP74PkOgYW9X7z+427GKYv9AVZ56ZxzB/etZCfONoICaOxtcZIasNXZzx0Fdg== X-Received: by 2002:a92:d948:0:b0:346:7322:5497 with SMTP id l8-20020a92d948000000b0034673225497mr8963708ilq.5.1689467896406; Sat, 15 Jul 2023 17:38:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:38:16 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 75/81] buildman: Tidy up reporting of a toolchain error Date: Sat, 15 Jul 2023 18:36:43 -0600 Message-ID: <20230716003718.231903-76-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 Provide the text of the exception when something goes wrong. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/builderthread.py | 7 +------ tools/buildman/func_test.py | 6 ++++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index d3912390bc4f..043e92b6d92d 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -457,18 +457,13 @@ class BuilderThread(threading.Thread): except ValueError as err: result.return_code = 10 result.stdout = '' - result.stderr = str(err) - # TODO(sjg@chromium.org): This gets swallowed, but needs - # to be reported. + result.stderr = f'Tool chain error for {brd.arch}: {str(err)}' if self.toolchain: commit = self._checkout(commit_upto, work_dir) result, do_config = self._config_and_build( commit_upto, brd, work_dir, do_config, config_only, adjust_cfg, commit, out_dir, out_rel_dir, result) - else: - result.return_code = 1 - result.stderr = f'No tool chain for {brd.arch}\n' result.already_done = False result.toolchain = self.toolchain diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index a94c31e85d23..75fabab5e205 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -511,8 +511,10 @@ Some images are invalid''' if brd.arch != 'sandbox': errfile = self._builder.get_err_file(commit, brd.target) fd = open(errfile) - self.assertEqual(fd.readlines(), - ['No tool chain for %s\n' % brd.arch]) + self.assertEqual( + fd.readlines(), + [f'Tool chain error for {brd.arch}: ' + f"No tool chain found for arch '{brd.arch}'"]) fd.close() def testBranch(self): -- 2.41.0.455.g037347b96a-goog