2 This is a sample to demostrate the usage of the Unit Test Library that
3 supports the PEI, DXE, SMM, UEFI SHell, and host execution environments.
5 Copyright (c) Microsoft Corporation.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include "TestBaseCryptLib.h"
12 Initialize the unit test framework, suite, and unit tests for the
13 sample unit tests and run the unit tests.
15 @retval EFI_SUCCESS All test cases were dispatched.
16 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to
17 initialize the unit tests.
26 UNIT_TEST_FRAMEWORK_HANDLE Framework
;
28 DEBUG ((DEBUG_INFO
, "%a v%a\n", UNIT_TEST_NAME
, UNIT_TEST_VERSION
));
29 CreateUnitTest (UNIT_TEST_NAME
, UNIT_TEST_VERSION
, &Framework
);
34 Status
= RunAllTestSuites (Framework
);
37 FreeUnitTestFramework (Framework
);
44 Standard PEIM entry point for target based unit test execution from PEI.
49 IN EFI_PEI_FILE_HANDLE FileHandle
,
50 IN CONST EFI_PEI_SERVICES
**PeiServices
53 return UefiTestMain ();
57 Standard UEFI entry point for target based unit test execution from DXE, SMM,
63 IN EFI_HANDLE ImageHandle
,
64 IN EFI_SYSTEM_TABLE
*SystemTable
67 return UefiTestMain ();
71 Standard POSIX C entry point for host based unit test execution.
79 return UefiTestMain ();