]> git.proxmox.com Git - mirror_edk2.git/commit
UnitTestFrameworkPkg: Add UnitTestUefiBootServicesTableLib
authorMichael Kubacki <michael.kubacki@microsoft.com>
Fri, 4 Nov 2022 00:07:49 +0000 (20:07 -0400)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 7 Nov 2022 16:07:33 +0000 (16:07 +0000)
commit6e8b0b6913580dc3c2f6f859cb444d0fc84576e0
tree210edaa1cf0ce51f3b8cd7f52025a4505b224400
parent82e70d9ac0aabf48a0cbda3c373e94ef22413e49
UnitTestFrameworkPkg: Add UnitTestUefiBootServicesTableLib

This library supports a Boot Services table library implementation
that allows code dependent upon UefiBootServicesTableLib 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 Boot Services database with any
required elements (e.g. protocols, events, handles, etc.) prior to
the services being invoked by code under test.

It is strongly recommended to clean any global databases (e.g.
protocol, event, handles, etc.) after every unit test so the tests
execute in a predictable manner from a clean state.

This library is being moved here from PrmPkg so it can be made more
generally available to other packages and improved upon for others
use.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
13 files changed:
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.c [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.h [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.inf [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.uni [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibEventTimer.c [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibImage.c [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibMemory.c [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibMisc.c [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibProtocol.c [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibProtocol.h [new file with mode: 0644]
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibTpl.c [new file with mode: 0644]
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc