]>
git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Scripts/Ds5/build_report.py
2 # Copyright (c) 2011-2012, ARM Limited. All rights reserved.
4 # SPDX-License-Identifier: BSD-2-Clause-Patent
12 def parse_platform_summary(self
, file):
15 def parse_pcd_report(self
, report_file
):
16 pcd_reg
= re
.compile(" (\*P|\*F|\*M| ) (\w+)(\ +)\: (.*) \((\w+)\) = (.*)\n")
18 for line
in report_file
.xreadlines():
19 stripped_line
= line
.strip()
20 if re
.match("\<=+\>", stripped_line
):
22 elif re
.match("g.*Guid", stripped_line
):
26 m
= pcd_reg
.match(line
)
28 self
.PCDs
[guid
][m
.group(2)] = (m
.group(6).strip(),m
.group(5))
30 def parse_firmware_device(self
, file):
33 def parse_module_summary(self
, file):
34 #print "Module Summary"
37 CONST_SECTION_HEADERS
= [('Platform Summary', parse_platform_summary
),
38 ('Platform Configuration Database Report',parse_pcd_report
),
39 ('Firmware Device (FD)',parse_firmware_device
),
40 ('Module Summary',parse_module_summary
)]
42 def __init__(self
, filename
= 'report.log'):
43 report_file
= open(filename
, 'r')
44 for line
in report_file
.xreadlines():
45 for section_header
in BuildReport
.CONST_SECTION_HEADERS
:
46 if line
.strip() == section_header
[0]:
47 section_header
[1](self
, report_file
)