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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MdeModulePkg/Test/MdeModulePkgHostTest.dsc
VivianNK marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf

[Components]
MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf
# MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf # MU_CHANGE - Move lib to correct home

#
# Build MdeModulePkg HOST_APPLICATION Tests
#
MdeModulePkg/Library/DxeResetSystemLib/UnitTest/DxeResetSystemLibUnitTestHost.inf {
<LibraryClasses>
ResetSystemLib|MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.inf
UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf
UefiRuntimeServicesTableLib|MdePkg/Test/Mock/Library/Cmocka/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.inf # MU_CHANGE - Move lib to correct home
}

MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.inf {
Expand Down
6 changes: 6 additions & 0 deletions MdePkg/Test/MdePkgHostTest.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@
MdePkg/Test/Mock/Library/GoogleTest/MockMmServicesTableLib/MockMmServicesTableLib.inf
MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeLib/MockUefiRuntimeLib.inf
MdePkg/Test/Mock/Library/GoogleTest/MockMemoryAllocationLib/MockMemoryAllocationLib.inf
# MU_CHANGE [BEGIN]
VivianNK marked this conversation as resolved.
Show resolved Hide resolved
MdePkg/Test/Mock/Library/Cmocka/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.inf
MdePkg/Test/Mock/Library/Cmocka/MockUefiBootServicesTableLib/MockUefiBootServicesTableLib.inf
MdePkg/Test/Mock/Library/Stub/StubHobLib/StubHobLib.inf
MdePkg/Test/Mock/Library/Stub/StubUefiLib/StubUefiLib.inf
# MU_CHANGE [END]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @file
Mock implementation of the UEFI Boot Services Table Library.

Copyright (C) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent

**/

#include <Uefi.h>

extern EFI_BOOT_SERVICES MockBoot;

EFI_BOOT_SERVICES *gBS = &MockBoot;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## @file
# Mock implementation of the UEFI Boot Services Table Library.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##

[Defines]
INF_VERSION = 0x00010005
BASE_NAME = MockUefiBootServicesTableLib
FILE_GUID = B37CB006-AC52-4BAD-A341-ABD36E68D5F7
MODULE_TYPE = HOST_APPLICATION
VERSION_STRING = 1.0
LIBRARY_CLASS = UefiBootServicesTableLib|HOST_APPLICATION

#
# VALID_ARCHITECTURES = IA32 X64 EBC
#

[Sources]
MockUefiBootServicesTableLib.c

[Packages]
MdePkg/MdePkg.dec
Loading
Loading