BaseTools: Enhance FV info report file path to support 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 <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2018-02-28 11:09:39 +08:00
parent 90f7f19ae7
commit 2157bc9c8b
1 changed files with 7 additions and 1 deletions

View File

@ -1726,7 +1726,13 @@ class FdRegionReport(object):
FvTotalSize = 0
FvTakenSize = 0
FvFreeSize = 0
FvReportFileName = os.path.join(self._FvDir, FvName + ".Fv.txt")
if not os.path.isfile(FvName):
FvReportFileName = os.path.join(self._FvDir, FvName + ".Fv.txt")
else:
if FvName.upper().endswith('.FV'):
FvReportFileName = FvName + ".txt"
else:
FvReportFileName = FvName + ".Fv.txt"
try:
#
# Collect size info in the firmware volume.