Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fdf_parser.py: support SECTION COMPRESS sections #654

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

apop5
Copy link
Contributor

@apop5 apop5 commented Oct 17, 2024

Previously, the FDF parser would fail to parse an FDF file with statements containing a SECTION COMPRESS with additional with nested sub sections.

Below is an example of a statement the parser failed to parser:

FILE RAW = <guid> {
    SECTION COMPRESS {
      SECTION RAW = $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/8C3D856A-9BE6-468E-850A-24F7A8D38E08.bin
    }
}

This PR updates the parser to be able to get past the parsing of the this, by checking there is an equal in the statement line, and pass it.

@apop5 apop5 requested a review from Javagedes October 17, 2024 17:53
@apop5 apop5 force-pushed the personal/apop5/updatefdfparser branch from b8031e5 to 3881275 Compare October 17, 2024 18:01
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.39%. Comparing base (ce85203) to head (8ca0480).
Report is 120 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #654      +/-   ##
==========================================
- Coverage   81.43%   81.39%   -0.05%     
==========================================
  Files          56       45      -11     
  Lines        7514     7491      -23     
==========================================
- Hits         6119     6097      -22     
+ Misses       1395     1394       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Javagedes Javagedes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. We need a test though :)

@apop5 apop5 force-pushed the personal/apop5/updatefdfparser branch from a70e070 to 8ca0480 Compare October 17, 2024 22:19
@Javagedes Javagedes added the enhancement New feature or request label Oct 18, 2024
@Javagedes Javagedes added this to the v0.22.1 milestone Oct 18, 2024
@Javagedes Javagedes changed the title enable fdf parser to deal with FILE RAW = <guid> { SECTION COMPRESS {… enable fdf parser to support nested SECTIONs Oct 18, 2024
@Javagedes Javagedes changed the title enable fdf parser to support nested SECTIONs fdf_parser.py: support nested SECTION sections Oct 18, 2024
@Javagedes Javagedes changed the title fdf_parser.py: support nested SECTION sections fdf_parser.py: support SECTION COMPRESS sections Oct 18, 2024
@Javagedes Javagedes merged commit 7531944 into tianocore:master Oct 18, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants