mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
88baaa1239
Summary: Out of 57 builds in the 5 days during Christmas only 15 were successful. 15 of the failed ones were caused by `com.android.ddmlib.ShellCommandUnresponsiveException` when running unstrumentation tests. Another 10 were because of crashes probably related to memory usage. This PR follows ideas from https://github.com/Originate/guide/blob/master/android/guide/Continuous%20Integration.md So far I've made 6 successful builds with this setup. Need to run it for a few more days to get accurate stats. Closes https://github.com/facebook/react-native/pull/5021 Reviewed By: svcscm Differential Revision: D2795713 Pulled By: androidtrunkagent fb-gh-sync-id: 33373fed7ca7c5fb83b35cf551f8501286e33d7b
23 lines
665 B
Bash
23 lines
665 B
Bash
# inspired by https://github.com/Originate/guide/blob/master/android/guide/Continuous%20Integration.md
|
|
|
|
function getAndroidSDK {
|
|
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH"
|
|
|
|
DEPS="$ANDROID_HOME/installed-dependencies"
|
|
|
|
if [ ! -e $DEPS ]; then
|
|
echo no | android create avd -n testAVD -f -t android-19 --abi default/armeabi-v7a &&
|
|
touch $DEPS
|
|
fi
|
|
}
|
|
|
|
function waitForAVD {
|
|
local bootanim=""
|
|
export PATH=$(dirname $(dirname $(which android)))/platform-tools:$PATH
|
|
until [[ "$bootanim" =~ "stopped" ]]; do
|
|
sleep 5
|
|
bootanim=$(adb -e shell getprop init.svc.bootanim 2>&1)
|
|
echo "emulator status=$bootanim"
|
|
done
|
|
}
|