From nobody Mon Apr 29 17:28:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60609+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60609+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=nvidia.com ARC-Seal: i=1; a=rsa-sha256; t=1591135148; cv=none; d=zohomail.com; s=zohoarc; b=H/6SfjjjVWOPCX0bx1camqC7aX3ASiIsuXXDP8vbVhy3T9OJYaE8hNS4k6cWO6zjDr47au/+i2j5pg0kOIvG0AEeCaTvDfyfI05qgjdn04yf5JGTJOX+WSh9OQFoO8Ta9d8RWdX11Mgk3v+Fvn82GdPFmygXrdIWZ+gWiheYRZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591135147; h=Content-Type:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=A0kVoKCBW6ApNypsLEbguaQK/AhgDzjJY6uoHgIIt8c=; b=fU1pWqub/+xzGa9XFSk09dX1FQZTceav7cFcrFGS4QC1Ff7OvmdDOd+lYlDjpN5+VrWH8F+cQaYgvi4Ff849OA/BAVupFx0564uhOZkQemBfXefMTOghkrya+NW5BVdaWuXUcPJ1vyHYXwPBXBTO+FcbJyeNnFalH5CDeLDPAmA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60609+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1591135147986653.6919338332102; Tue, 2 Jun 2020 14:59:07 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 5OKZYY1788612xeMh4jW0nAs; Tue, 02 Jun 2020 14:59:07 -0700 X-Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mx.groups.io with SMTP id smtpd.web10.758.1591135147206799552 for ; Tue, 02 Jun 2020 14:59:07 -0700 X-Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 02 Jun 2020 14:57:39 -0700 X-Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 02 Jun 2020 14:59:06 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 02 Jun 2020 14:59:06 -0700 X-Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Jun 2020 21:59:06 +0000 X-Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 2 Jun 2020 21:59:06 +0000 X-Received: from ipark-ubuntu.nvidia.com (Not Verified[10.28.100.106]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Tue, 02 Jun 2020 14:59:06 -0700 From: "Irene Park" To: CC: Irene Park Subject: [edk2-devel] [PATCH] BaseTools/build.py: Exit with 1 when AutoGen error occurred Date: Tue, 2 Jun 2020 17:58:50 -0400 Message-ID: <09637bf9f163742b1ebdd3700441c4b808e55b50.1591135082.git.ipark@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ipark@nvidia.com X-Gm-Message-State: UUp9m8YicEKewG8l2tm8k0bWx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1591135147; bh=ie5How3kH+g98bteVumzPbhH4n5pfmE95CB08iYD81c=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=GoYDhuTjwhFbBP6jFJpBaZbi8hcD60zXd/3WA18qj350rYNm4QJhrDZQqvYQT/Tn1eE 3FxWTdnBAHKhbGVSBZ4l1VRDL8/sPbDyPbDo0IKXyCCstRdNyl2bRWBI6AMldCvnNCKgO rdz1AigGFbyo4xjaE0GlPNpzufsQrxWkxjY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Irene Park AutoGen manager/workers halt the progress when an error occurs but doesn't propagate the error code to main and allows main exit with 0 and gets the build system unable to catch the occurrence of an error. This change informs main with an error when a progress is halted and helps main exit with 1. Signed-off-by: Irene Park Reviewed-by: Bob Feng --- BaseTools/Source/Python/build/build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index ed3a3b9..1ab1e60 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -880,7 +880,10 @@ class Build(): =20 self.AutoGenMgr.join() rt =3D self.AutoGenMgr.Status - return rt, 0 + err =3D 0 + if not rt: + err =3D UNKNOWN_ERROR + return rt, err except FatalError as e: return False, e.args[0] except: @@ -2724,4 +2727,3 @@ if __name__ =3D=3D '__main__': ## 0-127 is a safe return range, and 1 is a standard default error if r < 0 or r > 127: r =3D 1 sys.exit(r) - --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60609): https://edk2.groups.io/g/devel/message/60609 Mute This Topic: https://groups.io/mt/74638295/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-