From nobody Sun May 5 19:01:28 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+60546+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+60546+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=nvidia.com ARC-Seal: i=1; a=rsa-sha256; t=1591043313; cv=none; d=zohomail.com; s=zohoarc; b=G9kjBssgEGBcvtdpJTovdV3jGcl5fDRqMbhSOL6yow/7BfJtK4ghq0Rv3mI+T/zfQFQXdUzOW2ahjo2fxF2mI/p6CNTWDx2Eh0c0GClqo1gYhJOrcrNb3iOWezjDdsLNFCji3Ee0Xtr2y8d5Nq2gYvbYv4lKfjR3EuXAn2WTbPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591043313; h=Content-Type:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=zB4C912QYx5+XqBMQ0EVsh5fA9xT8arFgYmQ277wRfA=; b=hTGakP2W5/LfD9YLOKJ6OGb+d4xSHHF50wGEqSDqtFLqKRT9DsLQn724jPB700n0WvTH8kHkOiPSXjN2MX3dzHPHlfgaEtWXnAyQKwhLXpC/DszcW+3d0QlELIsbPjPD22//eQxjYWJVEIAyPGGAi5d9mzzbPG1ynwjcJtQTCu8= 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+60546+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 1591043313500481.46368820824046; Mon, 1 Jun 2020 13:28:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VtnvYY1788612xo1pnidSI1r; Mon, 01 Jun 2020 13:28:33 -0700 X-Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mx.groups.io with SMTP id smtpd.web12.46953.1591043311471194623 for ; Mon, 01 Jun 2020 13:28:31 -0700 X-Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 01 Jun 2020 13:27:04 -0700 X-Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 01 Jun 2020 13:28:31 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 01 Jun 2020 13:28:31 -0700 X-Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 1 Jun 2020 20:28:30 +0000 X-Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 1 Jun 2020 20:28:30 +0000 X-Received: from ipark-ubuntu.nvidia.com (Not Verified[10.28.100.106]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Mon, 01 Jun 2020 13:28:30 -0700 From: "Irene Park" To: CC: Irene Park Subject: [edk2-devel] [PATCH v2] BaseTools/Python: sys.exit(1) when error occurred Date: Mon, 1 Jun 2020 16:28:25 -0400 Message-ID: <461959c91617bf66a6a3e23c03dc80e62202302d.1591043186.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: qp68Xjjlico9t7RkMbPNpvLyx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1591043313; bh=l2dhJ4R5CHKcaJKSoiYQsyGBz/n+CG0BM9zy2zFtb0A=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=YMmZ0sOllnw4mR07VO02QmC3S/Cg20f9JEguaKtqN8Y2C6f7tiYMMR0VJUudbkccWtR 9xJPOazIr0BRWM4WYsZR0NuczYAJz7GI4T0yGkYoKpYcKlVHgsLbkna1KXOXHa3GmdN2S Ltw2XC4JZSpR7shkL3GboYL4KpmhpP1mVKU= 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 makes main sys.exit(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 sys.exit(1). Signed-off-by: Irene Park --- 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 (#60546): https://edk2.groups.io/g/devel/message/60546 Mute This Topic: https://groups.io/mt/74614093/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-