From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=yunhuax.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3C2FE21BADAB9 for ; Mon, 6 Aug 2018 23:23:44 -0700 (PDT) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2018 23:23:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,454,1526367600"; d="dat'59?scan'59,208,59";a="61202132" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 06 Aug 2018 23:23:35 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 6 Aug 2018 23:23:35 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 6 Aug 2018 23:23:34 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.226]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Tue, 7 Aug 2018 14:23:32 +0800 From: "Feng, YunhuaX" To: "edk2-devel@lists.01.org" CC: "Zhu, Yonghong" , "Gao, Liming" Thread-Topic: [PATCH] BaseTools: Fix report flexible value issue Thread-Index: AdQuFymwAs4OqywTQFuaAZtBFIydKA== Date: Tue, 7 Aug 2018 06:23:32 +0000 Message-ID: <47C64442C08CCD4089DC43B6B5E46BC48B574C@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <47C64442C08CCD4089DC43B6B5E46BC48B574C@shsmsx102.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.27 Subject: [PATCH] BaseTools: Fix report flexible value issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2018 06:23:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Report flexible value in INF file encounter error Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/build/BuildReport.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/Python/build/BuildReport.py index 50717b7c86..deb88a7817 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -983,10 +983,15 @@ class PcdReport(object): if ModulePcdSet is not None: if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type) not= in ModulePcdSet: continue InfDefaultValue, PcdValue =3D ModulePcdSet[Pcd.TokenCN= ame, Pcd.TokenSpaceGuidCName, Type] Pcd.DefaultValue =3D PcdValue + if InfDefaultValue: + try: + InfDefaultValue =3D ValueExpressionEx(InfDefau= ltValue, Pcd.DatumType, self._GuidDict)(True) + except BadExpression as InfDefaultValue: + EdkLogger.error('BuildReport', FORMAT_INVALID,= "PCD Value: %s, Type: %s" % (InfDefaultValue, Pcd.DatumType)) if InfDefaultValue =3D=3D "": InfDefaultValue =3D None =20 BuildOptionMatch =3D False if GlobalData.BuildOptionPcd: --=20 2.12.2.windows.2