mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +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
4 changed files with 9 additions and 34 deletions
|
@ -47,11 +47,6 @@ ACPI := 0
|
|||
#
|
||||
3GB := 1
|
||||
|
||||
#
|
||||
# Whether to use Structured Exception Handling
|
||||
#
|
||||
SEH := 0
|
||||
|
||||
#
|
||||
# Which version of NDIS do we support up to?
|
||||
#
|
||||
|
|
|
@ -6,13 +6,14 @@
|
|||
* UPDATE HISTORY:
|
||||
* 06-07-2003 CSH Created
|
||||
*/
|
||||
#include <roscfg.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ntos.h>
|
||||
#include <pseh.h>
|
||||
#include "regtests.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
@ -23,20 +24,6 @@ char *_Buffer;
|
|||
|
||||
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
|
||||
InitializeTests()
|
||||
{
|
||||
|
@ -73,18 +60,14 @@ PerformTest(TestOutputRoutine OutputRoutine, PROS_TEST Test, LPSTR TestName)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef SEH
|
||||
__try {
|
||||
#endif
|
||||
_SEH_TRY {
|
||||
_Result = TS_OK;
|
||||
_Buffer = Buffer;
|
||||
(Test->Routine)(TESTCMD_RUN);
|
||||
#ifdef SEH
|
||||
} __except(EXCEPTION_EXECUTE_HANDLER) {
|
||||
} _SEH_HANDLE {
|
||||
_Result = TS_FAILED;
|
||||
strcpy(Buffer, "Failed due to exception");
|
||||
}
|
||||
#endif
|
||||
sprintf(Buffer, "due to exception 0x%lx", _SEH_GetExceptionCode());
|
||||
} _SEH_END;
|
||||
|
||||
if (_Result != TS_OK)
|
||||
{
|
||||
|
|
|
@ -25,10 +25,6 @@ ifeq ($(ACPI), 1)
|
|||
CONFIG += ACPI
|
||||
endif
|
||||
|
||||
ifeq ($(SEH), 1)
|
||||
CONFIG += SEH
|
||||
endif
|
||||
|
||||
$(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
|
||||
# Variables this makefile accepts:
|
||||
|
@ -1076,7 +1076,8 @@ endif
|
|||
ifeq ($(TARGET_TYPE),test)
|
||||
run: all
|
||||
@$(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
|
||||
@_runtest.exe
|
||||
@$(RM) regtests.dll
|
||||
|
|
Loading…
Reference in a new issue