test other image
This commit is contained in:
parent
e27224725d
commit
29f09fc0dd
@ -74,14 +74,29 @@ debugTests:
|
|||||||
.connected-template: &connected-template
|
.connected-template: &connected-template
|
||||||
extends: .base
|
extends: .base
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
image: briar/ci-image-android-emulator:latest
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- start-emulator
|
- apt-get update || apt-get update
|
||||||
- wait-for-emulator
|
- apt-get install -y openjdk-17-jdk-headless
|
||||||
- adb devices
|
- update-alternatives --auto java
|
||||||
- adb shell input keyevent 82 &
|
- ./gradlew assembleStaging
|
||||||
# Switch to right java version for building the app
|
- export AVD_SDK=`echo $CI_JOB_NAME | awk '{print $2}'`
|
||||||
- ./gradlew connectedStagingAndroidTest --info || (adb -e logcat -d > logcat.txt; exit 1)
|
- export AVD_TAG=`echo $CI_JOB_NAME | awk '{print $3}'`
|
||||||
|
- export AVD_ARCH=`echo $CI_JOB_NAME | awk '{print $4}'`
|
||||||
|
- export AVD_PACKAGE="system-images;android-${AVD_SDK};${AVD_TAG};${AVD_ARCH}"
|
||||||
|
- echo $AVD_PACKAGE
|
||||||
|
- $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager --verbose delete avd --name "$NAME_AVD"
|
||||||
|
- export AVD="$AVD_PACKAGE"
|
||||||
|
- echo y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "$AVD"
|
||||||
|
- echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager --verbose create avd --name "$NAME_AVD" --package "$AVD" --device "pixel"
|
||||||
|
- start-emulator.sh
|
||||||
|
- ./gradlew installStaging
|
||||||
|
- adb shell am start -n org.pixeldroid.app.debug/org.pixeldroid.app.MainActivity
|
||||||
|
- if [ $AVD_SDK -lt 25 ] || ! emulator -accel-check; then
|
||||||
|
export FLAG=-Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.LargeTest;
|
||||||
|
fi
|
||||||
|
- ./gradlew connectedStagingAndroidTest $FLAG --info || (adb -e logcat -d > logcat.txt; exit 1)
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- logcat.txt
|
- logcat.txt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user