Skip to content

Commit

Permalink
buildreport_parser: Add Depex section parsing (#460)
Browse files Browse the repository at this point in the history
Updates the buildreport parser to also parse the depex section instead of skipping it.
  • Loading branch information
Javagedes authored Dec 4, 2023
1 parent edd06b3 commit cadd3f2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions edk2toollib/uefi/edk2/parsers/buildreport_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def Parse(self):
inPcdSection = False
inLibSection = False
inDepSection = False
inOverallDepex = False
nextLineSection = False
tokenspace = ""

Expand Down Expand Up @@ -81,6 +82,11 @@ def Parse(self):
elif (line == "Final Dependency Expression (DEPEX) Instructions"):
inDepSection = True
i += 1 # add additional line to skip the dashed line
elif (line == "Dependency Expression (DEPEX) from INF"):
# For some reason, "Final Dependency Expression (DEPEX) Instructions" does not exist
# For all modules, so we need to check for this as well.
inDepSection = True
inOverallDepex = True
else:
logging.debug("Unsupported Section: " + line)
inPcdSection = False
Expand Down Expand Up @@ -141,8 +147,13 @@ def Parse(self):
line += self._RawContent[i].rstrip()

elif (inDepSection):
pass
# not implemented right now
if line == "Dependency Expression (DEPEX) from INF":
inOverallDepex = True
elif line.startswith("-----"):
inOverallDepex = False

elif inOverallDepex:
self.Depex += " " + line

else:
# not in section...Must be header section
Expand Down

0 comments on commit cadd3f2

Please sign in to comment.