[ROSTESTS]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 4 Jul 2012 17:04:44 +0000 (17:04 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 4 Jul 2012 17:04:44 +0000 (17:04 +0000)
- Add CRT tests to build
See issue #7155 for more details.

svn path=/trunk/; revision=56822

rostests/apitests/CMakeLists.txt
rostests/apitests/crt/CMakeLists.txt
rostests/apitests/crt/crtdll_crt_apitest.cmake
rostests/apitests/crt/msvcrt_crt_apitest.cmake
rostests/apitests/crt/msvcrt_mini.spec [deleted file]
rostests/apitests/crt/ntdll_crt_apitest.cmake
rostests/apitests/crt/testlist.c

index 3a2b6d6..d89a3e2 100644 (file)
@@ -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)
index 73529a6..1f8f826 100644 (file)
@@ -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)
index 8a7396b..669f6d5 100644 (file)
@@ -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)
index e7da904..7e2f9aa 100644 (file)
@@ -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 (file)
index 24483d2..0000000
+++ /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
index bcb674f..c6fae82 100644 (file)
@@ -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)
 
index 71b948a..c3e317a 100644 (file)
@@ -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)