CMake: Remove WinDriver usage in tests

Add WinCEDriver to packages supporting it
This commit is contained in:
Pascal Bach 2014-12-11 13:24:56 +01:00 committed by Pascal Bach
parent b36b47d1fa
commit 10ef2b2335
17 changed files with 45 additions and 97 deletions

View File

@ -8,14 +8,10 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoCppParser PocoFoundation CppUnit )
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -20,7 +20,3 @@ target_include_directories( "${LIBNAME}"
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
if(WIN32)
add_subdirectory(WinTestRunner)
endif(WIN32)

View File

@ -8,7 +8,7 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
@ -19,11 +19,6 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoCrypto PocoNetSSL PocoXML PocoUtil PocoFoundation CppUnit )
if( WIN32)
#TODO: Is this flag always required?
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
else()
if(UNIX)
target_link_libraries( ${TESTUNIT} pthread)
endif(WIN32)
endif(UNIX)

View File

@ -8,11 +8,10 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoDataMySQL PocoData PocoFoundation CppUnit )

View File

@ -8,15 +8,10 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoDataODBC PocoData PocoFoundation CppUnit )
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -8,16 +8,14 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoDataSQLite PocoData PocoFoundation CppUnit )
if( WIN32)
#TODO: Is this flag always required?
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -8,10 +8,14 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
src/WinCEDriver.cpp
)
#TODO: Why is this file there? It doesn't compile if it is include in the sources
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/StatementImpl.cpp
@ -20,8 +24,3 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoData PocoUtil PocoXML PocoFoundation CppUnit)
if( WIN32)
#TODO: Is this flag always required?
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -15,7 +15,8 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
# WinDriver depends on WinTestRunner which depends on MFC, and we don't want that
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
@ -26,14 +27,11 @@ POCO_SOURCES_PLAT( TEST_SRCS FoundationTest WINCE
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND ${TESTUNIT} -all)
set_tests_properties(${LIBNAME} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=.") # The SharedLibaryTest has to look for shared libraries in the working directory
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
target_link_libraries( ${TESTUNIT} PocoFoundation CppUnit )
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
else()
if(UNIX)
target_link_libraries( ${TESTUNIT} pthread)
endif(WIN32)
endif(UNIX)
# The test is run in the runtime directory. So the test data is copied there too
add_custom_command(TARGET ${TESTUNIT} POST_BUILD

View File

@ -8,19 +8,18 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoJSON PocoFoundation CppUnit )
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)
# The test is run in the build directory. So the test data is copied there too
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data )

View File

@ -8,17 +8,16 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
src/WinCEDriver.cpp
)
set(TESTUNIT "${LIBNAME}-testrunner")
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoMongoDB PocoFoundation CppUnit )
if( WIN32)
#TODO: Is this flag always required?
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -8,14 +8,14 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -8,7 +8,7 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
@ -19,10 +19,6 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoNetSSL PocoCrypto PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)
# The test is run in the build directory. So the test data is copied there too
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
@ -30,4 +26,3 @@ add_custom_command(TARGET ${TESTUNIT} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTUNIT}.xml
)

View File

@ -8,7 +8,7 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
@ -19,10 +19,6 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoNetSSL PocoCrypto PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)
# The test is run in the build directory. So the test data is copied there too
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
@ -30,4 +26,3 @@ add_custom_command(TARGET ${TESTUNIT} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTUNIT}.xml
)

View File

@ -8,15 +8,10 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoPDF PocoFoundation CppUnit )
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -9,12 +9,15 @@ file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
src/WinDriver.cpp
src/WinConfigurationTest.cpp
src/WinRegistryTest.cpp
src/WindowsTestSuite.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
src/WinCEDriver.cpp
)
@ -22,7 +25,3 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoUtil PocoJSON PocoXML PocoFoundation CppUnit)
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -8,7 +8,7 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
@ -19,8 +19,3 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
target_link_libraries( ${TESTUNIT} PocoXML PocoFoundation CppUnit)
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)

View File

@ -8,7 +8,7 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp
)
@ -20,12 +20,7 @@ add_executable( ${TESTUNIT} ${TEST_SRCS} )
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
target_link_libraries( ${TESTUNIT} PocoZip PocoNet PocoFoundation CppUnit )
if( WIN32)
add_definitions("-D_AFXDLL")
target_link_libraries( ${TESTUNIT} WinTestRunner)
endif(WIN32)
# The test is run in the build directory. So the test data is copied there too
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data )