UefiCpuPkg/Test: Move EfiMpServiceProtocol UT in a separate function

Move the implementation of EfiMpServiceProtocol unit tests in a separate
function in preparation for developing the UEFI application and dynamic
command for the same unit tests.

Signed-off-by: Jason Lou <yun.lou@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Dun Tan <dun.tan@intel.com>
This commit is contained in:
Jason Lou 2022-11-24 20:11:57 +08:00 committed by mergify[bot]
parent d9e7f6fe49
commit cf3d4508b2
2 changed files with 24 additions and 8 deletions

View File

@ -187,18 +187,16 @@ MpServicesUnitTestWhoAmI (
} }
/** /**
Standard DXE driver or UEFI application entry point for unit test execution from DXE or UEFI Shell. Initialize the unit test framework, suite and unit tests for the EfiMpServiceProtocol and run the unit tests.
Initialize the unit test framework, suite, and unit tests for the EfiMpServiceProtocol and run the unit test.
@param[in] ImageHandle The firmware allocated handle for the EFI image. @retval EFI_SUCCESS Initialize the unit test framework, suite, unit tests and run the unit tests successfully.
@param[in] SystemTable A pointer to the EFI System Table. @retval Others Initialize the unit test framework, suite, unit tests or run the unit tests unsuccessfully.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
DxeEntryPoint ( EfiMpServiceProtocolUnitTest (
IN EFI_HANDLE ImageHandle, VOID
IN EFI_SYSTEM_TABLE *SystemTable
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
@ -242,3 +240,21 @@ EXIT:
return Status; return Status;
} }
/**
Standard DXE driver or UEFI application entry point for unit test execution from DXE or UEFI Shell.
Initialize the unit test framework, suite, and unit tests for the EfiMpServiceProtocol and run the unit test.
@param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
**/
EFI_STATUS
EFIAPI
DxeEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
return EfiMpServiceProtocolUnitTest ();
}

View File

@ -1,5 +1,5 @@
/** @file /** @file
Common header file for EfiMpServiceProtocolUnitTest DXE driver. Common header file for EdkiiPeiMpServices2Ppi and EfiMpServiceProtocol unit test.
Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>