Skip to content

Commit

Permalink
Ignore tests in cmake from cppignore and set POCO_BASE environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjoe committed Jan 14, 2020
1 parent 0896090 commit 885c5cb
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ matrix:
- env: TEST_NAME="gcc-5.4.0 (CMake)"
compiler: gcc
script:
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH POCO_BASE=$PWD CTEST_OUTPUT_ON_FAILURE=1 cmake --build cmake-build --target test
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH CTEST_OUTPUT_ON_FAILURE=1 cmake --build cmake-build --target test

- env: TEST_NAME="clang (CMake)"
compiler: clang
script:
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH POCO_BASE=$PWD CTEST_OUTPUT_ON_FAILURE=1 cmake --build cmake-build --target test
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH CTEST_OUTPUT_ON_FAILURE=1 cmake --build cmake-build --target test

- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
script:
Expand Down
3 changes: 2 additions & 1 deletion CppParser/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if(ANDROID)
add_test(NAME CppParser WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/CppParser-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME CppParser WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND CppParser-testrunner -all)
add_test(NAME CppParser WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND CppParser-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(CppParser PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(CppParser-testrunner PUBLIC Poco::CppParser CppUnit)
3 changes: 2 additions & 1 deletion Crypto/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if(ANDROID)
add_test(NAME Crypto WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Crypto-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME Crypto WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Crypto-testrunner -all)
add_test(NAME Crypto WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Crypto-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(Crypto PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(Crypto-testrunner PUBLIC Poco::NetSSL Poco::XML CppUnit)
if(UNIX AND NOT ANDROID)
Expand Down
3 changes: 2 additions & 1 deletion Data/MySQL/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if(ANDROID)
add_test(NAME DataMySQL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataMySQL-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME DataMySQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataMySQL-testrunner -all)
add_test(NAME DataMySQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataMySQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(DataMySQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(DataMySQL-testrunner PUBLIC Poco::DataMySQL CppUnit)
3 changes: 2 additions & 1 deletion Data/ODBC/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if(ANDROID)
add_test(NAME DataODBC WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataODBC-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME DataODBC WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataODBC-testrunner -all)
add_test(NAME DataODBC WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataODBC-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(DataODBC PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(DataODBC-testrunner PUBLIC Poco::DataODBC CppUnit)
3 changes: 2 additions & 1 deletion Data/PostgreSQL/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
)

add_executable(DataPostgreSQL-testrunner ${TEST_SRCS} )
add_test(NAME DataPostgreSQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataPostgreSQL-testrunner -all)
add_test(NAME DataPostgreSQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataPostgreSQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(DataPostgreSQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
target_link_libraries(DataPostgreSQL-testrunner PUBLIC Poco::DataPostgreSQL CppUnit)
3 changes: 2 additions & 1 deletion Data/SQLite/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if(ANDROID)
add_test(NAME DataSQLite WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataSQLite-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME DataSQLite WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataSQLite-testrunner -all)
add_test(NAME DataSQLite WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataSQLite-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(DataSQLite PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(DataSQLite-testrunner PUBLIC Poco::DataSQLite CppUnit)
3 changes: 2 additions & 1 deletion Data/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if(ANDROID)
add_test(NAME Data WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Data-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME Data WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Data-testrunner -all)
add_test(NAME Data WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Data-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(Data PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(Data-testrunner PUBLIC Poco::Data CppUnit)
3 changes: 2 additions & 1 deletion Encodings/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if(ANDROID)
add_test(NAME Encodings WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Encodings-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME Encodings WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Encodings-testrunner -all)
add_test(NAME Encodings WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Encodings-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(Encodings PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()

target_link_libraries(Encodings-testrunner PUBLIC Poco::Encodings CppUnit)
Expand Down
5 changes: 3 additions & 2 deletions Foundation/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ if(ANDROID)
add_test(NAME Foundation WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;${CMAKE_BINARY_DIR}/bin/TestApp;${CMAKE_BINARY_DIR}/bin/TestLibrary.so" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Foundation-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME Foundation WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND Foundation-testrunner -all)
set_tests_properties(Foundation PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=.") # The SharedLibaryTest has to look for shared libraries in the working directory
add_test(NAME Foundation WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND Foundation-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(Foundation PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=.") # The SharedLibaryTest has to look for shared libraries in the working directory
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "POCO_BASE=${CMAKE_SOURCE_DIR}")
# The test is run in the runtime directory. So the test data is copied there too
add_custom_command(TARGET Foundation-testrunner POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data )
Expand Down
3 changes: 2 additions & 1 deletion JSON/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if(ANDROID)
add_test(NAME JSON WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/JSON-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME JSON WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND JSON-testrunner -all)
add_test(NAME JSON WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND JSON-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(JSON PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
# The test is run in the build directory. So the test data is copied there too
add_custom_command(TARGET JSON-testrunner POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data )
Expand Down
3 changes: 2 additions & 1 deletion JWT/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if(ANDROID)
add_test(NAME JWT WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/JWT-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME JWT WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND JWT-testrunner -all)
add_test(NAME JWT WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND JWT-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(JWT PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(JWT-testrunner PUBLIC Poco::JWT Poco::Crypto CppUnit)
if(UNIX AND NOT ANDROID)
Expand Down
3 changes: 2 additions & 1 deletion MongoDB/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if(ANDROID)
add_test(NAME MongoDB WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/MongoDB-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME MongoDB WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND MongoDB-testrunner -all)
add_test(NAME MongoDB WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND MongoDB-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(MongoDB PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(MongoDB-testrunner PUBLIC Poco::MongoDB CppUnit)
3 changes: 2 additions & 1 deletion Net/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if(ANDROID)
add_test(NAME Net WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Net-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME Net WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Net-testrunner -all)
add_test(NAME Net WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Net-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(Net PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(Net-testrunner PUBLIC Poco::Net Poco::Util Poco::XML CppUnit)
3 changes: 2 additions & 1 deletion NetSSL_OpenSSL/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if(ANDROID)
add_test(NAME NetSSL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/any.pem;${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem;${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/NetSSL-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME NetSSL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND NetSSL-testrunner -all)
add_test(NAME NetSSL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND NetSSL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(NetSSL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
# The test is run in the build directory. So the test data is copied there too
add_custom_command(TARGET NetSSL-testrunner POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/any.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
Expand Down
3 changes: 2 additions & 1 deletion NetSSL_Win/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
)

add_executable(NetSSLWin-testrunner ${TEST_SRCS} )
add_test(NAME NetSSLWin WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND NetSSLWin-testrunner -all)
add_test(NAME NetSSLWin WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND NetSSLWin-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(NetSSLWin PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
target_link_libraries(NetSSLWin-testrunner PUBLIC Poco::NetSSL Poco::Util Poco::XML CppUnit)

# The test is run in the build directory. So the test data is copied there too
Expand Down
3 changes: 2 additions & 1 deletion PDF/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if(ANDROID)
add_test(NAME PDF WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/PDF-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME PDF WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND PDF-testrunner -all)
add_test(NAME PDF WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND PDF-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(PDF PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(PDF-testrunner PUBLIC Poco::PDF CppUnit )
3 changes: 2 additions & 1 deletion Redis/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if(ANDROID)
add_test(NAME Redis WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Redis-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME Redis WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Redis-testrunner -all)
add_test(NAME Redis WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Redis-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(Redis PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()

target_link_libraries(Redis-testrunner PUBLIC ${CMAKE_THREAD_LIBS_INIT} Poco::Redis CppUnit )
Expand Down
3 changes: 2 additions & 1 deletion Util/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if(ANDROID)
add_test(NAME Util WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Util-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME Util WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Util-testrunner -all)
add_test(NAME Util WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Util-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(Util PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(Util-testrunner PUBLIC Poco::Util Poco::JSON Poco::XML CppUnit)
3 changes: 2 additions & 1 deletion XML/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if(ANDROID)
add_test(NAME XML WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/XML-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME XML WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND XML-testrunner -all)
add_test(NAME XML WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND XML-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(XML PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(XML-testrunner PUBLIC Poco::XML CppUnit)
3 changes: 2 additions & 1 deletion Zip/testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if(ANDROID)
add_test(NAME Zip WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Zip-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME Zip WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Zip-testrunner -all)
add_test(NAME Zip WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Zip-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
set_tests_properties(Zip PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
# The test is run in the build directory. So the test data is copied there too
add_custom_command(TARGET Zip-testrunner POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data )
Expand Down

0 comments on commit 885c5cb

Please sign in to comment.