2 * PROJECT: ReactOS kernel
3 * FILE: regtests/win32base/driver.c
4 * PURPOSE: Win32 base services regression testing driver
5 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * 06-07-2003 CSH Created
14 AllocateMemory(ULONG Size
)
16 return (PVOID
) RtlAllocateHeap(RtlGetProcessHeap(), 0, Size
);
21 FreeMemory(PVOID Base
)
23 RtlFreeHeap(RtlGetProcessHeap(), 0, Base
);
28 DummyThreadMain(LPVOID lpParameter
)
35 RunPrivateTests(LPTSTR FileName
)
40 hEvent
= CreateEventA(
50 hModule
= GetModuleHandle(FileName
);
56 * The module is a core OS component that is already
57 * mapped into the current process.
58 * NOTE: This will cause all core OS components that are already mapped
59 * into the process to run their regression tests.
61 hThread
= CreateThread(NULL
, 0, DummyThreadMain
, NULL
, 0, NULL
);
65 ErrorCode
= WaitForSingleObject(hEvent
, 5000); /* Wait up to 5 seconds */
71 hModule
= LoadLibrary(FileName
);
84 RegTestMain(TestOutputRoutine OutputRoutine
, LPSTR TestName
)
87 * Private module regression tests in components already mapped
88 * (ntdll.dll, kernel32.dll, msvcrt.dll)
90 /* FIXME: Need to pass TestName to the driver */
91 RunPrivateTests(_T("ntdll.dll"));
93 /* Other private module regression tests */
95 /* Cross-module regression tests */
98 PerformTests(OutputRoutine
, TestName
);