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 C31D3C001DC for ; Thu, 20 Jul 2023 00:03:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4B0C58690A; Thu, 20 Jul 2023 01:53:04 +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="DD2wEq8v"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A4CC7867FB; Thu, 20 Jul 2023 01:51:05 +0200 (CEST) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (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 13A68867FA for ; Thu, 20 Jul 2023 01:50:58 +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-xd2b.google.com with SMTP id ca18e2360f4ac-785cbc5bfd2so8777639f.2 for ; Wed, 19 Jul 2023 16:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689810656; x=1690415456; 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=zpDwewVCHKZf0CoflvYEOpSQJCHZfBy2sl1WASllwNQ=; b=DD2wEq8vAXiPPuCmVD1DeqkRjaIVKVEYgbnLUSBhqrEQc+gix09lHKG3/V8pybGZrK 9ZSqq/MNI3rtC++/XccyKnx0gYdQzHdejIaLaK5imnCPz5jq3vrYQwFAosWhUw/LN/0M IRoRsSOgMObMcEAsQAtJmq6n3oz4WYZfgXgHA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689810656; x=1690415456; 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=zpDwewVCHKZf0CoflvYEOpSQJCHZfBy2sl1WASllwNQ=; b=iOT0HUYZIY+TIlL0/gEnUgG7Z/OtQnQWLYB4NkkDNMrf29hXNy70/xfonjyGNM+4+y GywXCBywJtKh6qys8Nunen1mikc7YXO3SiTPDkGaXEQvTSLkD//MAZr17mAurv9OsxLi DBsCBL6w97s0H2+UEhh4grKaBgs5bvXAxrsptZOfGBppAfcElyQKA9lGpkooZtwUctjq tX2rDzT54BgL3jqtQ32k9hwtfenGRXS1Gh7TCz1eQjC3aTb1bNkISP5Iw/a03YB5Pb4B hOydMp8rEJWEEokEcPqZR+pDzX1kejmZ1zvdJdh4AeGwWac3J3emRZvRcQ0XX3jSEXoC KV3g== X-Gm-Message-State: ABy/qLbANNcdD/kNwQS+NefC7iMbNttLrnN8tyZBpGKfGT07lVHNGzwu QKU9yIR037Ggr5X0QkrHTj3hpU9QC6srsJAje8w= X-Google-Smtp-Source: APBJJlG19log8aHN9j064Zxj86yCwKTgFrQaSBBRBUCk26/MvHmIiBTQB+aJmmOBQa04yAaHWP1rIw== X-Received: by 2002:a6b:d809:0:b0:787:8fc:2fa0 with SMTP id y9-20020a6bd809000000b0078708fc2fa0mr6577358iob.0.1689810656676; Wed, 19 Jul 2023 16:50:56 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 16:50:56 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v4 77/83] buildman: Tidy up reporting of a toolchain error Date: Wed, 19 Jul 2023 17:49:25 -0600 Message-ID: <20230719234953.796101-78-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 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 07b4ac0174b5..126ea9e11f00 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.487.g6d72f3e995-goog