summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Test
diff options
context:
space:
mode:
authorJason Lou <yun.lou@intel.com>2022-11-24 20:11:57 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-12-08 10:04:24 +0000
commitcf3d4508b2f90b448eb21a971b31ceeb0545e767 (patch)
tree7433abe4ff0027dd2962b9e5f173b48e087ff6b1 /UefiCpuPkg/Test
parentd9e7f6fe49738421c02381425d289767d7055ef1 (diff)
downloadedk2-cf3d4508b2f90b448eb21a971b31ceeb0545e767.tar.gz
edk2-cf3d4508b2f90b448eb21a971b31ceeb0545e767.tar.bz2
edk2-cf3d4508b2f90b448eb21a971b31ceeb0545e767.zip
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>
Diffstat (limited to 'UefiCpuPkg/Test')
-rw-r--r--UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c30
-rw-r--r--UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h2
2 files changed, 24 insertions, 8 deletions
diff --git a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c
index 57f8ba3c06..5fe6369960 100644
--- a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c
+++ b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c
@@ -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 test.
+ Initialize the unit test framework, suite and unit tests for the EfiMpServiceProtocol and run the unit tests.
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
- @param[in] SystemTable A pointer to the EFI System Table.
+ @retval EFI_SUCCESS Initialize the unit test framework, suite, unit tests and run the unit tests successfully.
+ @retval Others Initialize the unit test framework, suite, unit tests or run the unit tests unsuccessfully.
**/
EFI_STATUS
EFIAPI
-DxeEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+EfiMpServiceProtocolUnitTest (
+ VOID
)
{
EFI_STATUS Status;
@@ -242,3 +240,21 @@ EXIT:
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 ();
+}
diff --git a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h
index abbbd2faba..d2b1633b4d 100644
--- a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h
+++ b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h
@@ -1,5 +1,5 @@
/** @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>