TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestMain.c
Go to the documentation of this file.
1
9#include "TestBaseCryptLib.h"
10
11VOID
12EFIAPI
13ProcessLibraryConstructorList (
14 VOID
15 );
16
26EFIAPI
28 VOID
29 )
30{
31 EFI_STATUS Status;
32 UNIT_TEST_FRAMEWORK_HANDLE Framework;
33
34 DEBUG ((DEBUG_INFO, "%a v%a\n", UNIT_TEST_NAME, UNIT_TEST_VERSION));
35 CreateUnitTest (UNIT_TEST_NAME, UNIT_TEST_VERSION, &Framework);
36
37 //
38 // Execute the tests.
39 //
40 Status = RunAllTestSuites (Framework);
41
42 if (Framework) {
43 FreeUnitTestFramework (Framework);
44 }
45
46 return Status;
47}
48
53EFIAPI
55 IN EFI_PEI_FILE_HANDLE FileHandle,
56 IN CONST EFI_PEI_SERVICES **PeiServices
57 )
58{
59 return UefiTestMain ();
60}
61
67EFIAPI
69 IN EFI_HANDLE ImageHandle,
70 IN EFI_SYSTEM_TABLE *SystemTable
71 )
72{
73 return UefiTestMain ();
74}
75
79int
81 int argc,
82 char *argv[]
83 )
84{
85 ProcessLibraryConstructorList ();
86 return UefiTestMain ();
87}
EFI_STATUS EFIAPI CreateUnitTest(IN CHAR8 *UnitTestName, IN CHAR8 *UnitTestVersion, IN OUT UNIT_TEST_FRAMEWORK_HANDLE *Framework)
int main()
=== TEST ENGINE ================================================================================
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define DEBUG(Expression)
Definition: DebugLib.h:434
VOID * EFI_PEI_FILE_HANDLE
Definition: PiPeiCis.h:26
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_STATUS EFIAPI RunAllTestSuites(IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle)
Definition: RunTests.c:145
EFI_STATUS EFIAPI FreeUnitTestFramework(IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle)
Definition: UnitTestLib.c:150
EFI_STATUS EFIAPI UefiTestMain(VOID)
Definition: UnitTestMain.c:27
EFI_STATUS EFIAPI DxeEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: UnitTestMain.c:68
EFI_STATUS EFIAPI PeiEntryPoint(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
Definition: UnitTestMain.c:54