mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-14 08:11:00 +00:00
Gradle: change emulator to ARM for testing
This commit is contained in:
1 parent
76819656bf
commit
bb35a5d3c5
1 file changed
+10
-6
@@ -607,10 +607,11 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
|
|||||||
echo "TRACKING_APP_VERSION=$TRACKING_APP_VERSION"
|
echo "TRACKING_APP_VERSION=$TRACKING_APP_VERSION"
|
||||||
extra="$extra -Dtracking-app-version=$TRACKING_APP_VERSION"
|
extra="$extra -Dtracking-app-version=$TRACKING_APP_VERSION"
|
||||||
|
|
||||||
ANDROID_SDK_VERSION="r24.0.2"
|
ANDROID_SDK_VERSION=r24.0.2
|
||||||
BUILD_TOOLS="21.1.2"
|
BUILD_TOOLS=21.1.2
|
||||||
TARGET_API="21"
|
TARGET_API=21
|
||||||
ANDROID_ABI="x86_64"
|
TEST_API=18
|
||||||
|
ANDROID_ABI=armeabi-v7a
|
||||||
echo "Updating Android SDK...."
|
echo "Updating Android SDK...."
|
||||||
echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null
|
echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null
|
||||||
echo yes | android update sdk --filter build-tools-${BUILD_TOOLS} --no-ui --force > /dev/null
|
echo yes | android update sdk --filter build-tools-${BUILD_TOOLS} --no-ui --force > /dev/null
|
||||||
@@ -623,15 +624,18 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
|
|||||||
fi
|
fi
|
||||||
if [ $testing -eq 1 ]; then
|
if [ $testing -eq 1 ]; then
|
||||||
echo "Downloading and installing emulator image..."
|
echo "Downloading and installing emulator image..."
|
||||||
echo yes | android update sdk -u -a -t sys-img-${ANDROID_ABI}-android-${TARGET_API} > /dev/null
|
echo yes | android update sdk -u -a -t sys-img-${ANDROID_ABI}-android-${TEST_API} > /dev/null
|
||||||
echo no | android create avd --force -n androidTest -t android-${TARGET_API} --abi ${ANDROID_ABI}
|
echo no | android create avd --force -n androidTest -t android-${TEST_API} --abi ${ANDROID_ABI}
|
||||||
emulator -avd androidTest -no-skin -no-audio -no-window &
|
emulator -avd androidTest -no-skin -no-audio -no-window &
|
||||||
echo "Waiting for device to start..."
|
echo "Waiting for device to start..."
|
||||||
adb wait-for-device
|
adb wait-for-device
|
||||||
|
echo "Waiting 10 seconds to complete startup..."
|
||||||
|
sleep 10
|
||||||
adb shell input keyevent 82 &
|
adb shell input keyevent 82 &
|
||||||
./gradlew deviceCheck connectedCheck
|
./gradlew deviceCheck connectedCheck
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
exit 101
|
exit 101
|
||||||
|
adb emu kill
|
||||||
fi
|
fi
|
||||||
adb emu kill
|
adb emu kill
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user