From c48170291133cf3b349dcc52956911f3904bfc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg-Christian=20B=C3=B6hme?= Date: Sun, 20 May 2018 05:43:55 +0200 Subject: [PATCH] On android: show SDK version, show files on emulator when test is failling, exclude unknown failing Foundation test --- .travis.yml | 10 ++++++---- cmake/ExecuteOnAndroid.cmake | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 551ae8d9f..7cbbd2c0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/cmake/ExecuteOnAndroid.cmake b/cmake/ExecuteOnAndroid.cmake index bb22474eb..ab9fe4df0 100644 --- a/cmake/ExecuteOnAndroid.cmake +++ b/cmake/ExecuteOnAndroid.cmake @@ -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()