On android: show SDK version, show files on emulator when test is failling, exclude unknown failing Foundation test

This commit is contained in:
Jörg-Christian Böhme 2018-05-20 05:43:55 +02:00
parent 938a1044e8
commit c481702911
2 changed files with 10 additions and 4 deletions

View File

@ -66,7 +66,8 @@ matrix:
- echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> /usr/local/android-sdk/licenses/android-sdk-license
# Install NDK and cmake via android sdkmanager.
- /usr/local/android-sdk/tools/bin/sdkmanager --update > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager "emulator" "ndk-bundle" "cmake;3.6.4111459" > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager "emulator" "ndk-bundle" "cmake;3.6.4111459" > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager --list
before_script:
- export TERM=dumb
- export _NO_CHECK_SIGNATURE=true
@ -80,7 +81,7 @@ matrix:
# See also in /usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake
# Using the ninja build command. Is much faster then make build command.
- mkdir cmake-build && cd cmake-build && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -G'Android Gradle - Ninja' -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-19 -DCMAKE_MAKE_PROGRAM=/usr/local/android-sdk/cmake/3.6.4111459/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DENABLE_TESTS=ON -DENABLE_LONG_RUNNING_TESTS=OFF -DOLD_REDIS_VERSION=ON .. && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake --build . --target all && travis_wait 30 /usr/local/android-sdk/cmake/3.6.4111459/bin/ctest --output-on-failure
- mkdir cmake-build && cd cmake-build && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -G'Android Gradle - Ninja' -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-19 -DCMAKE_MAKE_PROGRAM=/usr/local/android-sdk/cmake/3.6.4111459/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DENABLE_TESTS=ON -DENABLE_LONG_RUNNING_TESTS=OFF -DOLD_REDIS_VERSION=ON .. && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake --build . --target all && travis_wait 30 /usr/local/android-sdk/cmake/3.6.4111459/bin/ctest -E Foundation --output-on-failure
- env: TEST_NAME="android API level 24"
language: android
@ -112,7 +113,8 @@ matrix:
- echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> /usr/local/android-sdk/licenses/android-sdk-license
# Install NDK and cmake via android sdkmanager.
- /usr/local/android-sdk/tools/bin/sdkmanager --update > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager "emulator" "ndk-bundle" "cmake;3.6.4111459" > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager "emulator" "ndk-bundle" "cmake;3.6.4111459" > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager --list
before_script:
- export TERM=dumb
- export _NO_CHECK_SIGNATURE=true
@ -126,7 +128,7 @@ matrix:
# See also in /usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake
# Using the ninja build command. Is much faster then make build command.
- mkdir cmake-build && cd cmake-build && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -G'Android Gradle - Ninja' -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-24 -DCMAKE_MAKE_PROGRAM=/usr/local/android-sdk/cmake/3.6.4111459/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DENABLE_TESTS=ON -DENABLE_LONG_RUNNING_TESTS=OFF -DOLD_REDIS_VERSION=ON .. && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake --build . --target all && travis_wait 30 /usr/local/android-sdk/cmake/3.6.4111459/bin/ctest --output-on-failure
- mkdir cmake-build && cd cmake-build && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -G'Android Gradle - Ninja' -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-24 -DCMAKE_MAKE_PROGRAM=/usr/local/android-sdk/cmake/3.6.4111459/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DENABLE_TESTS=ON -DENABLE_LONG_RUNNING_TESTS=OFF -DOLD_REDIS_VERSION=ON .. && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake --build . --target all && travis_wait 30 /usr/local/android-sdk/cmake/3.6.4111459/bin/ctest -E Foundation --output-on-failure
- env: TEST_NAME="gcc (make)"
compiler: gcc

View File

@ -21,10 +21,14 @@ execute_process(
)
if(_RESULT)
execute_process(COMMAND ls -l ${UNITTEST})
execute_process(COMMAND ${ANDROID_NDK}/../platform-tools/adb shell "ls -R /data/local/tmp")
message(FATAL_ERROR "Execution of ${UNITTEST_FILENAME} failed")
else()
string(REGEX MATCH "exit code ([0-9]+)" _EXIT_CODE ${_OUT})
if(NOT "${CMAKE_MATCH_1}" EQUAL 0)
execute_process(COMMAND ls -l ${UNITTEST})
execute_process(COMMAND ${ANDROID_NDK}/../platform-tools/adb shell "ls -R /data/local/tmp")
string(REGEX REPLACE "exit code [0-9]+" "" _PRINT_OUT ${_OUT})
message(FATAL_ERROR "${UNITTEST_FILENAME} execution error: ${_PRINT_OUT} ${_ERR}")
endif()