From f2f11355052db075e16867d6fb493f6efbf3d9c9 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Wed, 4 Jul 2012 17:04:44 +0000 Subject: [PATCH] [ROSTESTS] - Add CRT tests to build See issue #7155 for more details. svn path=/trunk/; revision=56822 --- rostests/apitests/CMakeLists.txt | 2 +- rostests/apitests/crt/CMakeLists.txt | 2 -- .../apitests/crt/crtdll_crt_apitest.cmake | 4 +-- .../apitests/crt/msvcrt_crt_apitest.cmake | 10 ++++--- rostests/apitests/crt/msvcrt_mini.spec | 30 ------------------- rostests/apitests/crt/ntdll_crt_apitest.cmake | 4 +-- rostests/apitests/crt/testlist.c | 7 ++++- 7 files changed, 17 insertions(+), 42 deletions(-) delete mode 100644 rostests/apitests/crt/msvcrt_mini.spec diff --git a/rostests/apitests/CMakeLists.txt b/rostests/apitests/CMakeLists.txt index 3a2b6d634c6..d89a3e29c93 100644 --- a/rostests/apitests/CMakeLists.txt +++ b/rostests/apitests/CMakeLists.txt @@ -2,7 +2,7 @@ add_library(apitest apitest.c) add_subdirectory(advapi32) -#add_subdirectory(crt) +add_subdirectory(crt) add_subdirectory(dciman32) add_subdirectory(gdi32) add_subdirectory(kernel32) diff --git a/rostests/apitests/crt/CMakeLists.txt b/rostests/apitests/crt/CMakeLists.txt index 73529a654e8..1f8f82662ad 100644 --- a/rostests/apitests/crt/CMakeLists.txt +++ b/rostests/apitests/crt/CMakeLists.txt @@ -1,6 +1,4 @@ -spec2def(msvcrt_mini.dll msvcrt_mini.spec ADD_IMPORTLIB) -remove_definitions(-D_DLL -D__USE_CRTIMP) include(ntdll_crt_apitest.cmake) include(crtdll_crt_apitest.cmake) include(msvcrt_crt_apitest.cmake) diff --git a/rostests/apitests/crt/crtdll_crt_apitest.cmake b/rostests/apitests/crt/crtdll_crt_apitest.cmake index 8a7396b74f5..669f6d580d2 100644 --- a/rostests/apitests/crt/crtdll_crt_apitest.cmake +++ b/rostests/apitests/crt/crtdll_crt_apitest.cmake @@ -554,8 +554,8 @@ endif() add_executable(crtdll_crt_apitest testlist.c ${SOURCE_CRTDLL}) -add_target_compile_definitions(crtdll_crt_apitest _DLL __USE_CRTIMP) +add_target_compile_definitions(crtdll_crt_apitest TEST_CRTDLL) target_link_libraries(crtdll_crt_apitest wine ${PSEH_LIB}) set_module_type(crtdll_crt_apitest win32cui) -add_importlibs(crtdll_crt_apitest crtdll msvcrt_mini kernel32) +add_importlibs(crtdll_crt_apitest crtdll msvcrt kernel32 ntdll) add_cd_file(TARGET crtdll_crt_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/crt/msvcrt_crt_apitest.cmake b/rostests/apitests/crt/msvcrt_crt_apitest.cmake index e7da904fe25..7e2f9aaeace 100644 --- a/rostests/apitests/crt/msvcrt_crt_apitest.cmake +++ b/rostests/apitests/crt/msvcrt_crt_apitest.cmake @@ -1370,15 +1370,17 @@ elseif (ARCH MATCHES amd64) ) endif() +# Startup code doesn't go together well with the static CRT... too much __imp_ #add_executable(static_crt_apitest testlist.c ${SOURCE_MSVCRT}) -#target_link_libraries(static_crt_apitest wine ${PSEH_LIB} crt msvcrtex wine) +#add_target_compile_definitions(static_crt_apitest TEST_STATIC_CRT) +#target_link_libraries(static_crt_apitest ${PSEH_LIB} crt wine) #set_module_type(static_crt_apitest win32cui) -#add_importlibs(static_crt_apitest kernel32) +#add_importlibs(static_crt_apitest kernel32 ntdll) #add_cd_file(TARGET static_crt_apitest DESTINATION reactos/bin FOR all) add_executable(msvcrt_crt_apitest testlist.c ${SOURCE_MSVCRT}) -add_target_compile_definitions(msvcrt_crt_apitest _DLL __USE_CRTIMP) +add_target_compile_definitions(msvcrt_crt_apitest TEST_MSVCRT) target_link_libraries(msvcrt_crt_apitest wine ${PSEH_LIB}) set_module_type(msvcrt_crt_apitest win32cui) -add_importlibs(msvcrt_crt_apitest msvcrt kernel32) +add_importlibs(msvcrt_crt_apitest msvcrt kernel32 ntdll) add_cd_file(TARGET msvcrt_crt_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/crt/msvcrt_mini.spec b/rostests/apitests/crt/msvcrt_mini.spec deleted file mode 100644 index 24483d29e4e..00000000000 --- a/rostests/apitests/crt/msvcrt_mini.spec +++ /dev/null @@ -1,30 +0,0 @@ - -@ cdecl fputs(str ptr) MSVCRT.fputs -@ extern _iob MSVCRT._iob -@ varargs fprintf(ptr str) MSVCRT.fprintf -@ cdecl vfprintf(ptr str ptr) MSVCRT.vfprintf -@ cdecl fflush(ptr) MSVCRT.fflush -@ cdecl setvbuf(ptr str long long) MSVCRT.setvbuf -@ cdecl _strdup(str) MSVCRT._strdup -@ cdecl __getmainargs(ptr ptr ptr long ptr) MSVCRT.__getmainargs -@ cdecl __setusermatherr(ptr) MSVCRT.__setusermatherr -@ cdecl _amsg_exit(long) MSVCRT._amsg_exit -@ cdecl __set_app_type(long) MSVCRT.__set_app_type -@ extern _fmode MSVCRT._fmode -@ cdecl _initterm(ptr ptr) MSVCRT._initterm -@ extern _acmdln MSVCRT._acmdln -@ cdecl signal(long long) MSVCRT.signal -@ cdecl _fpreset() MSVCRT._fpreset -@ cdecl _onexit(ptr) MSVCRT._onexit -@ cdecl __dllonexit(ptr ptr ptr) MSVCRT.__dllonexit -@ cdecl _unlock(long) MSVCRT._unlock -@ cdecl abort() MSVCRT.abort -@ cdecl calloc(long long) MSVCRT.calloc -@ cdecl malloc(long) MSVCRT.malloc -@ extern __initenv MSVCRT.__initenv -@ cdecl _cexit() MSVCRT._cexit -@ extern _winmajor MSVCRT._winmajor -@ cdecl __lconv_init() MSVCRT.__lconv_init -@ cdecl _lock(long) MSVCRT._lock -@ cdecl free(ptr) MSVCRT.free -@ cdecl exit(long) MSVCRT.exit diff --git a/rostests/apitests/crt/ntdll_crt_apitest.cmake b/rostests/apitests/crt/ntdll_crt_apitest.cmake index bcb674f67ea..c6fae82feb4 100644 --- a/rostests/apitests/crt/ntdll_crt_apitest.cmake +++ b/rostests/apitests/crt/ntdll_crt_apitest.cmake @@ -153,9 +153,9 @@ endif() add_executable(ntdll_crt_apitest testlist.c ${SOURCE_NTDLL}) -add_target_compile_definitions(ntdll_crt_apitest _DLL __USE_CRTIMP) +add_target_compile_definitions(ntdll_crt_apitest TEST_NTDLL) target_link_libraries(ntdll_crt_apitest wine ${PSEH_LIB}) set_module_type(ntdll_crt_apitest win32cui) -add_importlibs(ntdll_crt_apitest ntdll msvcrt_mini kernel32) +add_importlibs(ntdll_crt_apitest ntdll msvcrt kernel32) add_cd_file(TARGET ntdll_crt_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/crt/testlist.c b/rostests/apitests/crt/testlist.c index 71b948a4f65..c3e317af66b 100644 --- a/rostests/apitests/crt/testlist.c +++ b/rostests/apitests/crt/testlist.c @@ -10,8 +10,13 @@ extern void func_strcpy(void); const struct test winetest_testlist[] = { { "strcpy", func_strcpy }, -#if defined(TEST_CRTDLL) || defined(TEST_MSVCRT) +#if defined(TEST_CRTDLL) || defined(TEST_MSVCRT) || defined(TEST_STATIC_CRT) // ... +#endif +#if defined(TEST_STATIC_CRT) || defined(TEST_MSVCRT) + // ... +#endif +#if defined(TEST_STATIC_CRT) #elif defined(TEST_MSVCRT) #elif defined(TEST_NTDLL) #elif defined(TEST_CRTDLL) -- 2.17.1