Add android build on travis (#1981)

* Add build for android in travis CI.

* Fix review findings. Change from __ANDORID__ to POCO_ANDROID

* Add android test

* Fix compile issue after rebase

* Ignore test big ping when its failing
This commit is contained in:
Joerg-Christian Boehme
2018-02-27 01:54:40 +01:00
committed by Jörg-Christian Böhme
parent a44ef96281
commit a834aad0b1
36 changed files with 685 additions and 222 deletions

View File

@@ -17,7 +17,12 @@ 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)
if(ANDROID)
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/${TESTUNIT} -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
else()
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
endif()
target_link_libraries( ${TESTUNIT} ${CMAKE_THREAD_LIBS_INIT} PocoSQLSQLite PocoSQL PocoFoundation PocoCppUnit )