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

[Rebase & FF] 202405: Add mocks and stubs using the old framework #900

Merged

Conversation

VivianNK
Copy link
Contributor

@VivianNK VivianNK commented Jun 11, 2024

Description

Add mocks and stubs using Cmocka. Move existing MockUefiRuntimeServicesTableLib to proper home.
Includes MU_CHANGE changes to take to edk2


Cherry picked and squashed the following commits:

d41aacf
6636c59
c3254d1
891ce90


  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Changes from release/202311

Integration Instructions

Upgrading from 202311 to 202405 -> No change for platform

Upgrading from edk2 -> 202405, change the path as follows:
Unit Test Cmocka mock moved - Any unit test using the mock MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf
needs to update its path to MdePkg/Test/Mock/Library/Cmocka/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.inf

@VivianNK VivianNK changed the title Add mocks and stubs using the old framework [Rebase & FF] 202405: Add mocks and stubs using the old framework Jun 11, 2024
@VivianNK VivianNK requested a review from os-d June 27, 2024 22:34
MdePkg/Test/MdePkgHostTest.dsc Show resolved Hide resolved
MdeModulePkg/Test/MdeModulePkgHostTest.dsc Outdated Show resolved Hide resolved
@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Jul 10, 2024
@VivianNK VivianNK force-pushed the personal/vnowkakeane/mocks branch 3 times, most recently from 7911fc6 to b62cf27 Compare July 10, 2024 17:50
@VivianNK VivianNK marked this pull request as ready for review July 10, 2024 17:52
@VivianNK VivianNK requested a review from apop5 July 10, 2024 17:53
@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release/202405@6bdbfc3). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                @@
##             release/202405     #900   +/-   ##
=================================================
  Coverage                  ?    0.97%           
=================================================
  Files                     ?     1126           
  Lines                     ?   260648           
  Branches                  ?        0           
=================================================
  Hits                      ?     2551           
  Misses                    ?   258097           
  Partials                  ?        0           
Flag Coverage Δ
MdeModulePkg 0.22% <ø> (?)
MdePkg 4.91% <ø> (?)

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

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

@VivianNK VivianNK force-pushed the personal/vnowkakeane/mocks branch 3 times, most recently from 6c51eaa to 9dae06b Compare July 15, 2024 16:57
@VivianNK VivianNK requested a review from makubacki July 15, 2024 21:59
@makubacki
Copy link
Member

Nit: You only need to add a co-author for the person that is not the author.

@github-actions github-actions bot added the impact:breaking-change Requires integration attention label Jul 16, 2024
@VivianNK VivianNK force-pushed the personal/vnowkakeane/mocks branch 3 times, most recently from 081adab to 6ff4a0c Compare July 16, 2024 21:26
@VivianNK VivianNK enabled auto-merge (rebase) July 16, 2024 21:28
Bret Barkelew and others added 2 commits July 16, 2024 15:07
Create stubs for HobLib and UefiLib. Create mocks for UefiBootServicesTableLib and UefiRuntimeServicesTableLib

Co-authored-by: Vivian Nowka-Keane <[email protected]>
For DxeResetSystemLibUnitTestHost, use mock from MdePkg.

Co-authored-by: Vivian Nowka-Keane <[email protected]>
@VivianNK VivianNK merged commit b71a1df into microsoft:release/202405 Jul 16, 2024
30 checks passed
@VivianNK VivianNK deleted the personal/vnowkakeane/mocks branch July 16, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:breaking-change Requires integration attention impact:non-functional Does not have a functional impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants