From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 7AC5920954CB5 for ; Tue, 27 Feb 2018 21:21:02 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 21:27:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,404,1515484800"; d="scan'208";a="207630999" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 27 Feb 2018 21:27:08 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 21:27:08 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 21:27:08 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.253]) with mapi id 14.03.0319.002; Wed, 28 Feb 2018 13:27:06 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Enhance FV info report file path to support absolute path Thread-Index: AQHTsEHFQ7flQJABHEG0Z/uUTG2LBKO5SP7w Date: Wed, 28 Feb 2018 05:27:06 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1D4A10@SHSMSX104.ccr.corp.intel.com> References: <1519787434-10352-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1519787434-10352-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Enhance FV info report file path to support absolute path X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 05:21:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >Yonghong Zhu >Sent: Wednesday, February 28, 2018 11:11 AM >To: edk2-devel@lists.01.org >Subject: [edk2] [Patch] BaseTools: Enhance FV info report file path to sup= port >absolute path > >When generate build report, Tool will get the info like size, Fv Name, >etc from the xx.Fv.txt file and add these info into the build report. >This patch support the xx.Fv.txt to use absolute file path format since >user may provide specified FV path. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/build/BuildReport.py | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/build/BuildReport.py >b/BaseTools/Source/Python/build/BuildReport.py >index 58595d6..b2cc6ee 100644 >--- a/BaseTools/Source/Python/build/BuildReport.py >+++ b/BaseTools/Source/Python/build/BuildReport.py >@@ -1724,11 +1724,17 @@ class FdRegionReport(object): > > if self.Type =3D=3D "FV": > FvTotalSize =3D 0 > FvTakenSize =3D 0 > FvFreeSize =3D 0 >- FvReportFileName =3D os.path.join(self._FvDir, FvName + ".Fv.= txt") >+ if not os.path.isfile(FvName): >+ FvReportFileName =3D os.path.join(self._FvDir, FvName + "= .Fv.txt") >+ else: >+ if FvName.upper().endswith('.FV'): >+ FvReportFileName =3D FvName + ".txt" >+ else: >+ FvReportFileName =3D FvName + ".Fv.txt" > try: > # > # Collect size info in the firmware volume. > # > FvReport =3D open(FvReportFileName).read() >-- >2.6.1.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel