Zhiguang Liu 530f5b0912 UnitTestFrameworkPkg: Add UnitTestPeiServicesTablePointerLib
This library supports a PeiServicesTablePointerLib implementation
that allows code dependent upon PeiServicesTable to operate in an
isolated execution environment such as within the context of a
host-based unit test framework.

The unit test should initialize the PeiServicesTable database with
any required elements (e.g. PPIs, Hob etc.) prior to the services
being invoked by code under test.

It is strongly recommended to clean any global databases by using
EFI_PEI_SERVICES.ResetSystem2 after every unit test so the tests
execute in a predictable manner from a clean state.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2023-06-13 02:53:40 +00:00

38 lines
1.1 KiB
INI

## @file
# Pei Services Table Pointer Lib for unit tests implementation.
#
# Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = UnitTestPeiServicesTablePointerLib
MODULE_UNI_FILE = UnitTestPeiServicesTablePointerLib.uni
FILE_GUID = 55F23CD2-9BB1-41EE-AB10-550B638210E1
MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = PeiServicesTablePointerLib
CONSTRUCTOR = UnitTestPeiServicesTablePointerLibConstructor
#
# VALID_ARCHITECTURES = IA32 X64 EBC
#
[Sources]
UnitTestPeiServicesTablePointerLib.h
UnitTestPeiServicesTablePointerLib.c
UnitTestPeiServicesTablePointerLibMisc.c
UnitTestPeiServicesTablePointerLibPpi.c
UnitTestPeiServicesTablePointerLibHob.c
[Packages]
MdePkg/MdePkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
UnitTestLib