Skip to content

Commit

Permalink
MdeModulePkg: VariableRuntimeDxe: Convert SCT tests to host-based tests
Browse files Browse the repository at this point in the history
This requires a number of changes to the SCT test cases
as well as some additional scaffolding to adapt the test
cases to the host-based framework.
  • Loading branch information
Bret Barkelew authored and Javagedes committed Jul 5, 2024
1 parent 63d2bae commit 70d3fc6
Show file tree
Hide file tree
Showing 9 changed files with 2,164 additions and 1,599 deletions.
29 changes: 2 additions & 27 deletions MdeModulePkg/Test/MdeModulePkgHostTest.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -66,33 +66,8 @@
<PcdsFixedAtBuild>
gEfiMdeModulePkgTokenSpaceGuid.PcdAllowVariablePolicyEnforcementDisable|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
}
# MU_CHANGE [END] - Add a host-based unit test for common variable services code.

# MU_CHANGE [BEGIN] - Add a host-based unit test for common variable services code.
MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableRuntimeDxeUnitTest.inf {
<LibraryClasses>
UefiLib|MdePkg/Test/Library/StubUefiLib/StubUefiLib.inf
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
UefiRuntimeServicesTableLib|MdePkg/Test/Library/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.inf
UefiBootServicesTableLib|MdePkg/Test/Library/MockUefiBootServicesTableLib/MockUefiBootServicesTableLib.inf
SynchronizationLib|MdePkg/Test/Library/SynchronizationLibHostUnitTest/SynchronizationLibHostUnitTest.inf
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
HobLib|MdePkg/Test/Library/StubHobLib/StubHobLib.inf

VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibVariableDxe.inf

<PcdsFixedAtBuild>
gEfiMdeModulePkgTokenSpaceGuid.PcdAllowVariablePolicyEnforcementDisable|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
# SCT tests are noisy, so disable VERBOSE.
gUnitTestFrameworkPkgTokenSpaceGuid.PcdUnitTestLogLevel|0x00000007
}
# MU_CHANGE [END] - Add a host-based unit test for common variable services code.

Expand Down
Loading

0 comments on commit 70d3fc6

Please sign in to comment.