Now using right sdkmanager but More debug

Change-Id: If32a685aefebe5c3d18a3e6023b9a681452ab7fe
ja/edge-to-edge-dropshots
Jose Alcérreca 4 months ago
parent 4c324f4b8b
commit b81ebd2f3d

@ -247,8 +247,10 @@ jobs:
include:
- api-level: 27
profile: pixel_5
target: google_apis
- api-level: 33
profile: pixel_fold
target: google_apis
# Enable when a new version of the runner is released. Currently v2.30.1
# https://github.com/ReactiveCircus/android-emulator-runner/releases/tag/v2.30.1
# Also, change from VanillaIceCream to 35 when that image is available
@ -302,20 +304,9 @@ jobs:
mv ${{ env.ANDROID_HOME}}/cmdline-tools/11479570 ${{ env.ANDROID_HOME}}/cmdline-tools/latest
echo ${{ env.ANDROID_HOME}}/cmdline-tools/latest/bin >> $GITHUB_PATH
- name: Debug Environment
- name: Print debug avd
run: |
echo "PATH: $PATH"
echo "SHELL: $SHELL"
shell: bash
- name: Print debug avdmanager list
run: avdmanager list
- name: Print debug sdkmanager
run: |
sdkmanager --version
which sdkmanager
which avdmanager
ls -alR ~/.android/avd/
- name: Build projects and run instrumented screenshot tests
id: dropshotsverify
@ -330,6 +321,11 @@ jobs:
heap-size: 600M
profile: ${{ matrix.profile }}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# TODO DEBUG
pre-emulator-launch-script: |
which sdkmanager
sdkmanager --version
sdkmanager --install 'system-images;android-33;default;x86_64' --channel=0
# Run tests, if they fail, record screenshots and exit with a failure
script: >
./gradlew connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.google.samples.apps.nowinandroid.ui.InstrumentedScreenshotTests --daemon

@ -18,7 +18,6 @@ package com.google.samples.apps.nowinandroid.ui
import android.graphics.Bitmap
import android.util.Log
import android.view.WindowInsets
import androidx.core.view.WindowInsetsCompat
import androidx.test.core.app.takeScreenshot
import androidx.test.espresso.device.DeviceInteraction.Companion.setClosedMode
@ -162,8 +161,8 @@ class EdgeToEdgeTest {
).bottom
width = metrics.bounds.width()
}
Log.d("jalc", "width: $width" )
Log.d("jalc", "topInset: $topInset" )
Log.d("jalc", "width: $width")
Log.d("jalc", "topInset: $topInset")
// Crop the top, adding extra pixels to check continuity
val bitmap = takeScreenshot().let {
Bitmap.createBitmap(it, 0, 0, width!!, (topInset!! * 2))
@ -186,8 +185,8 @@ class EdgeToEdgeTest {
width = metrics.bounds.width()
height = metrics.bounds.height()
}
Log.d("jalc", "height: $height" )
Log.d("jalc", "bottomInset: $bottomInset" )
Log.d("jalc", "height: $height")
Log.d("jalc", "bottomInset: $bottomInset")
// Crop the top, adding extra pixels to check continuity
val bitmap = takeScreenshot().let {
Bitmap.createBitmap(it, 0, height!! - (bottomInset!! * 2), width!!, (bottomInset!! * 2))

Loading…
Cancel
Save