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

AdvLoggerPkg: Generated Mock Libraries using external tool #461

Closed

Conversation

apop5
Copy link
Contributor

@apop5 apop5 commented Apr 11, 2024

Description

Add generated mock libraries for library classes contained in AdvLoggerPkg.

For each item, place an "x" in between [ and ] if true. Example: [x].
(you can also check items in the GitHub UI)

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

N/A

Integration Instructions

N/A

@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Apr 11, 2024
Copy link
Member

Choose a reason for hiding this comment

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

Given the mocks can largely be auto generated by a tool now (I presume, haven't tried it yet), do you think there's much value to checking in the files until there's accompanying tests?

Main concern being that doing this at scale might invite dead code into the codebase which comes with those cons - bloat, prone to go stale, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the advanced logger case, waiting is fine because the package isn't really consumed by other packages.

In the case of packages that are externally consumed, it would be useful to get the mocked libraries/protocols created even before there are unit tests that consume them.

I will mark this as draft until some unit tests are created.

@apop5 apop5 marked this pull request as draft April 12, 2024 02:33
@apop5 apop5 closed this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants