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

GoogleTest - ConfigKnobShimLib using basecore PPI mock #200

Closed
wants to merge 21 commits into from

Conversation

VivianNK
Copy link
Contributor

@VivianNK VivianNK commented Jun 12, 2023

Preface

Please ensure you have read the contribution docs prior
to submitting the pull request. In particular,
pull request guidelines.

Description

Implementing GoogleTest for ConfigKnobShimLib, consuming the PPI mock from mu_basecore (microsoft/mu_basecore#579).

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

<Please describe the test(s) that were run to verify the changes.>

Integration Instructions

<Describe how these changes should be integrated. Use N/A if nothing is required.>

Add just the tests included in the demo

@github-actions github-actions bot added impact:non-functional Does not have a functional impact impact:testing Affects testing labels Jun 12, 2023
@VivianNK VivianNK requested a review from os-d June 12, 2023 20:56
using namespace testing;

///////////////////////////////////////////////////////////////////////////////
class GetConfigKnobOverrideFromVariableStorageTest : public Test {
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming this works, I would remove the cmocka unit tests in this same PR, no need to keep both.

@VivianNK VivianNK changed the title Vnowkakeane/gtest demo cherry GoogleTest demo code Jun 15, 2023
@VivianNK VivianNK changed the title GoogleTest demo code GoogleTest demo - ConfigKnobShimLib Jun 15, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2023

Codecov Report

Merging #200 (19451af) into main (da9bc93) will not change coverage.
The diff coverage is n/a.

❗ Current head 19451af differs from pull request most recent head 71d1ca0. Consider uploading reports for the commit 71d1ca0 to get more accurate results

@@           Coverage Diff           @@
##             main     #200   +/-   ##
=======================================
  Coverage   27.58%   27.58%           
=======================================
  Files          16       16           
  Lines        4520     4520           
=======================================
  Hits         1247     1247           
  Misses       3273     3273           
Flag Coverage Δ
Linux 27.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@VivianNK VivianNK force-pushed the vnowkakeane/gtest_demo_cherry branch from 9efa0ff to 5d16181 Compare August 17, 2023 20:18
@github-actions github-actions bot added the language:python Pull requests that update Python code label Sep 27, 2023
@VivianNK VivianNK changed the title GoogleTest demo - ConfigKnobShimLib GoogleTest - ConfigKnobShimLib using basecore PPI mock Sep 27, 2023
@github-actions github-actions bot removed the language:python Pull requests that update Python code label Sep 28, 2023
@VivianNK VivianNK closed this Sep 28, 2023
@VivianNK VivianNK deleted the vnowkakeane/gtest_demo_cherry branch September 28, 2023 18:26
@VivianNK VivianNK mentioned this pull request Sep 28, 2023
4 tasks
VivianNK added a commit to VivianNK/mu_feature_config that referenced this pull request Dec 19, 2023
## Description

Original PR: microsoft#200

Google Tests for ConfigKnobShimDxeLib and ConfigKnobShimPeiLib
ConfigKnobShimPeiLib is consuming the PPI mock from mu_basecore
(microsoft/mu_basecore#579), so merging this is
pending the mu_basecore PR being merged. Pipelines will fail in the
meantime.

- [ ] 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, ...
- [x ] 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

Ran the tests using stuart_ci_build.

## Integration Instructions

N/A
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 impact:testing Affects testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants