Skip to content

Commit

Permalink
buildreport_parser: Support component INF absolute paths (#520)
Browse files Browse the repository at this point in the history
A path from an ext dep used for an INF will be absolute. This causes
the build report parser to fail to match that path to a component
since the check is performed against a relative path.

This change checks if a path is absolute before the comparison. If
so, the path is converted to a package path adjusted path for the
comparison.

Signed-off-by: Michael Kubacki <[email protected]>
  • Loading branch information
makubacki authored Mar 2, 2024
1 parent 919bd2d commit b162b5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions edk2toollib/uefi/edk2/parsers/buildreport_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ def FindComponentByInfPath(self, InfPath: str) -> Optional['ModuleSummary']:
(None): If not found
"""
for (k, v) in self.Modules.items():
if os.path.isabs(v.InfPath):
v.InfPath = self.PathConverter.GetEdk2RelativePathFromAbsolutePath(v.InfPath)
if (v.InfPath.lower() == InfPath.lower()):
logging.debug("Found Module by InfPath: %s" % InfPath)
return v
Expand Down

0 comments on commit b162b5e

Please sign in to comment.