mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 01:42:30 +00:00
2004-11-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
* config (SEH): Remove. * regtests/shared/regtests.c (_alloca): Remove; Use from malloca.h instead. (PerformTest): Use PSEH to catch exceptions while running tests. * tools/config.mk (CONFIG): Don't add SEH. * tools/helper.mk: Link tests with pseh.a. svn path=/trunk/; revision=11714
This commit is contained in:
parent
e2632afc71
commit
68e9370d78
|
@ -47,11 +47,6 @@ ACPI := 0
|
||||||
#
|
#
|
||||||
3GB := 1
|
3GB := 1
|
||||||
|
|
||||||
#
|
|
||||||
# Whether to use Structured Exception Handling
|
|
||||||
#
|
|
||||||
SEH := 0
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Which version of NDIS do we support up to?
|
# Which version of NDIS do we support up to?
|
||||||
#
|
#
|
||||||
|
|
|
@ -6,13 +6,14 @@
|
||||||
* UPDATE HISTORY:
|
* UPDATE HISTORY:
|
||||||
* 06-07-2003 CSH Created
|
* 06-07-2003 CSH Created
|
||||||
*/
|
*/
|
||||||
#include <roscfg.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <malloc.h>
|
||||||
#define NTOS_MODE_USER
|
#define NTOS_MODE_USER
|
||||||
#include <ntos.h>
|
#include <ntos.h>
|
||||||
|
#include <pseh.h>
|
||||||
#include "regtests.h"
|
#include "regtests.h"
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
@ -23,20 +24,6 @@ char *_Buffer;
|
||||||
|
|
||||||
static LIST_ENTRY AllTests;
|
static LIST_ENTRY AllTests;
|
||||||
|
|
||||||
void *_alloca(size_t size)
|
|
||||||
{
|
|
||||||
void *ret;
|
|
||||||
|
|
||||||
asm ("movl %1, %%eax\n"
|
|
||||||
"addl $3, %%eax\n"
|
|
||||||
"andl $-4, %%eax\n"
|
|
||||||
"subl %%eax, %%esp\n"
|
|
||||||
"movl %%esp, %0\n"
|
|
||||||
: "=m" (ret) : "m" (size) : "eax");
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
InitializeTests()
|
InitializeTests()
|
||||||
{
|
{
|
||||||
|
@ -73,18 +60,14 @@ PerformTest(TestOutputRoutine OutputRoutine, PROS_TEST Test, LPSTR TestName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SEH
|
_SEH_TRY {
|
||||||
__try {
|
|
||||||
#endif
|
|
||||||
_Result = TS_OK;
|
_Result = TS_OK;
|
||||||
_Buffer = Buffer;
|
_Buffer = Buffer;
|
||||||
(Test->Routine)(TESTCMD_RUN);
|
(Test->Routine)(TESTCMD_RUN);
|
||||||
#ifdef SEH
|
} _SEH_HANDLE {
|
||||||
} __except(EXCEPTION_EXECUTE_HANDLER) {
|
|
||||||
_Result = TS_FAILED;
|
_Result = TS_FAILED;
|
||||||
strcpy(Buffer, "Failed due to exception");
|
sprintf(Buffer, "due to exception 0x%lx", _SEH_GetExceptionCode());
|
||||||
}
|
} _SEH_END;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (_Result != TS_OK)
|
if (_Result != TS_OK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,10 +25,6 @@ ifeq ($(ACPI), 1)
|
||||||
CONFIG += ACPI
|
CONFIG += ACPI
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(SEH), 1)
|
|
||||||
CONFIG += SEH
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(PATH_TO_TOP)/tools/mkconfig$(EXE_POSTFIX): $(PATH_TO_TOP)/tools/mkconfig.c
|
$(PATH_TO_TOP)/tools/mkconfig$(EXE_POSTFIX): $(PATH_TO_TOP)/tools/mkconfig.c
|
||||||
@$(HOST_CC) -g -o $(PATH_TO_TOP)/tools/mkconfig$(EXE_POSTFIX) $(PATH_TO_TOP)/tools/mkconfig.c
|
@$(HOST_CC) -g -o $(PATH_TO_TOP)/tools/mkconfig$(EXE_POSTFIX) $(PATH_TO_TOP)/tools/mkconfig.c
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: helper.mk,v 1.94 2004/11/02 19:47:18 gvg Exp $
|
# $Id: helper.mk,v 1.95 2004/11/20 17:48:38 chorns Exp $
|
||||||
#
|
#
|
||||||
# Helper makefile for ReactOS modules
|
# Helper makefile for ReactOS modules
|
||||||
# Variables this makefile accepts:
|
# Variables this makefile accepts:
|
||||||
|
@ -1076,7 +1076,8 @@ endif
|
||||||
ifeq ($(TARGET_TYPE),test)
|
ifeq ($(TARGET_TYPE),test)
|
||||||
run: all
|
run: all
|
||||||
@$(CC) -nostdlib -o _runtest.exe regtests.a $(TARGET_LIBS) _stubs.o \
|
@$(CC) -nostdlib -o _runtest.exe regtests.a $(TARGET_LIBS) _stubs.o \
|
||||||
$(SDK_PATH_LIB)/rtshared.a $(SDK_PATH_LIB)/regtests.a _hooks.o -lgcc -lmsvcrt -lntdll
|
$(SDK_PATH_LIB)/rtshared.a $(SDK_PATH_LIB)/regtests.a $(SDK_PATH_LIB)/pseh.a \
|
||||||
|
_hooks.o -lgcc -lmsvcrt -lntdll
|
||||||
@$(CP) $(REGTESTS_PATH)/regtests/regtests.dll regtests.dll
|
@$(CP) $(REGTESTS_PATH)/regtests/regtests.dll regtests.dll
|
||||||
@_runtest.exe
|
@_runtest.exe
|
||||||
@$(RM) regtests.dll
|
@$(RM) regtests.dll
|
||||||
|
|
Loading…
Reference in a new issue