From e8fddf9cef912a1e3b27a49c7c9c8ec0ba673dbb Mon Sep 17 00:00:00 2001 From: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:33:11 -0700 Subject: [PATCH] [Android] Update integration test AVD dependency to use Android 35 emulators (flutter/engine#54186) Updates AVD dependency to use [latest available AVD dependency](https://chrome-infra-packages.appspot.com/p/chromium/tools/android/avd/linux-amd64/+/I7SIawD0okHpiEe8fKvI5NQrMEWDibsvOduVbbK5pDEC) (older at the time of publishing but the same I set in the framework -- https://github.com/flutter/flutter/pull/152498) so that engine integration tests run on emulators running Android 35, the current latest version of Android. Does not change dependency of one test that is intended to run on Android 28. Also adds tasks to run the same emulator tests on those running Android 34 since Android 35 emulators seem to crash off and on. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- engine/src/flutter/.ci.yaml | 47 +++++- .../ci/builders/linux_android_emulator.json | 28 +-- .../builders/linux_android_emulator_34.json | 159 ++++++++++++++++++ .../builders/linux_android_emulator_skia.json | 10 +- .../linux_android_emulator_skia_34.json | 91 ++++++++++ 5 files changed, 313 insertions(+), 22 deletions(-) create mode 100644 engine/src/flutter/ci/builders/linux_android_emulator_34.json create mode 100644 engine/src/flutter/ci/builders/linux_android_emulator_skia_34.json diff --git a/engine/src/flutter/.ci.yaml b/engine/src/flutter/.ci.yaml index 35a1c8b987..304a04f54f 100644 --- a/engine/src/flutter/.ci.yaml +++ b/engine/src/flutter/.ci.yaml @@ -45,9 +45,6 @@ platform_properties: device_type: none os: Windows-10 -# The current android emulator config names can be found here: -# https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/android/avd/proto -# You may use those names for the android_virtual_device version. targets: - name: Linux local_engine_builds enabled_branches: @@ -57,6 +54,7 @@ targets: config_name: local_engine - name: Linux linux_android_emulator_tests + bringup: true enabled_branches: - main recipe: engine_v2/engine_v2 @@ -76,7 +74,29 @@ targets: - testing/scenario_app/** - testing/skia_gold_client/** + - name: Linux linux_android_emulator_tests_34 + bringup: true + enabled_branches: + - main + recipe: engine_v2/engine_v2 + properties: + config_name: linux_android_emulator_34 + dependencies: >- + [ + {"dependency": "goldctl", "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd"} + ] + timeout: 90 + runIf: + - .ci.yaml + - ci/builders/linux_android_emulator.json + - DEPS + - lib/ui/** + - shell/platform/android/** + - testing/scenario_app/** + - testing/skia_gold_client/** + - name: Linux linux_android_emulator_skia_tests + bringup: true enabled_branches: - main recipe: engine_v2/engine_v2 @@ -96,6 +116,27 @@ targets: - testing/scenario_app/** - testing/skia_gold_client/** + - name: Linux linux_android_emulator_skia_tests_34 + bringup: true + enabled_branches: + - main + recipe: engine_v2/engine_v2 + properties: + config_name: linux_android_emulator_skia_34 + dependencies: >- + [ + {"dependency": "goldctl", "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd"} + ] + timeout: 90 + runIf: + - .ci.yaml + - ci/builders/linux_android_emulator.json + - DEPS + - lib/ui/** + - shell/platform/android/** + - testing/scenario_app/** + - testing/skia_gold_client/** + - name: Linux builder_cache enabled_branches: - main diff --git a/engine/src/flutter/ci/builders/linux_android_emulator.json b/engine/src/flutter/ci/builders/linux_android_emulator.json index 677915c73a..c774b90e61 100644 --- a/engine/src/flutter/ci/builders/linux_android_emulator.json +++ b/engine/src/flutter/ci/builders/linux_android_emulator.json @@ -42,11 +42,11 @@ "test_dependencies": [ { "dependency": "android_virtual_device", - "version": "android_34_google_apis_x64.textpb" + "version": "android_35_google_apis_x64.textpb" }, { "dependency": "avd_cipd_version", - "version": "build_id:8759428741582061553" + "version": "build_id:8740267484269553649" } ], "contexts": [ @@ -54,10 +54,10 @@ ], "script": "flutter/testing/run_tests.py", "parameters": [ - "--android-variant", - "ci/android_emulator_debug_x64", - "--type", - "android" + "--android-variant", + "ci/android_emulator_debug_x64", + "--type", + "android" ] }, { @@ -74,11 +74,11 @@ "test_dependencies": [ { "dependency": "android_virtual_device", - "version": "android_34_google_apis_x64.textpb" + "version": "android_35_google_apis_x64.textpb" }, { "dependency": "avd_cipd_version", - "version": "build_id:8759428741582061553" + "version": "build_id:8740267484269553649" } ], "contexts": [ @@ -139,7 +139,7 @@ }, { "dependency": "avd_cipd_version", - "version": "build_id:8759428741582061553" + "version": "build_id:8740267484269553649" } ], "contexts": [ @@ -147,13 +147,13 @@ ], "script": "flutter/testing/run_tests.py", "parameters": [ - "--android-variant", - "ci/android_emulator_debug_x86", - "--type", - "android" + "--android-variant", + "ci/android_emulator_debug_x86", + "--type", + "android" ] } ] } ] -} +} \ No newline at end of file diff --git a/engine/src/flutter/ci/builders/linux_android_emulator_34.json b/engine/src/flutter/ci/builders/linux_android_emulator_34.json new file mode 100644 index 0000000000..a9f7fb3fcb --- /dev/null +++ b/engine/src/flutter/ci/builders/linux_android_emulator_34.json @@ -0,0 +1,159 @@ +{ + "builds": [ + { + "drone_dimensions": [ + "device_type=none", + "os=Linux", + "kvm=1", + "cores=8" + ], + "gclient_variables": { + "use_rbe": true + }, + "gn": [ + "--android", + "--android-cpu=x64", + "--no-lto", + "--rbe", + "--no-goma", + "--target-dir", + "ci/android_emulator_debug_x64" + ], + "dependencies": [ + { + "dependency": "goldctl", + "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd" + } + ], + "name": "ci/android_emulator_debug_x64", + "description": "Build for debug mode x64 Android emulator tests, and Impeller scenario app tests.", + "ninja": { + "config": "ci/android_emulator_debug_x64", + "targets": [ + "flutter/impeller/toolkit/android:unittests", + "flutter/shell/platform/android:flutter_shell_native_unittests", + "flutter/testing/scenario_app" + ] + }, + "tests": [ + { + "language": "python3", + "name": "Android Unit Tests", + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/run_tests.py", + "parameters": [ + "--android-variant", + "ci/android_emulator_debug_x64", + "--type", + "android" + ] + }, + { + "language": "dart", + "name": "skia_gold_client/e2e_test", + "script": "flutter/testing/skia_gold_client/tool/e2e_test.dart", + "max_attempts": 1 + }, + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Impeller/Vulkan)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_debug_x64", + "--enable-impeller", + "--impeller-backend=vulkan" + ] + } + ] + }, + { + "drone_dimensions": [ + "device_type=none", + "os=Linux", + "kvm=1", + "cores=8" + ], + "gclient_variables": { + "use_rbe": true + }, + "gn": [ + "--android", + "--android-cpu=x86", + "--no-lto", + "--rbe", + "--no-goma", + "--target-dir", + "ci/android_emulator_debug_x86" + ], + "dependencies": [ + { + "dependency": "goldctl", + "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd" + } + ], + "name": "ci/android_emulator_debug_x86", + "description": "Build for debug mode x86 Android emulator tests.", + "ninja": { + "config": "ci/android_emulator_debug_x86", + "targets": [ + "flutter/impeller/toolkit/android:unittests", + "flutter/shell/platform/android:flutter_shell_native_unittests", + "flutter/testing/scenario_app" + ] + }, + "tests": [ + { + "language": "python3", + "name": "Android Unit Tests (API 28)", + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_28_google_apis_x86.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/run_tests.py", + "parameters": [ + "--android-variant", + "ci/android_emulator_debug_x86", + "--type", + "android" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/engine/src/flutter/ci/builders/linux_android_emulator_skia.json b/engine/src/flutter/ci/builders/linux_android_emulator_skia.json index e503550ae3..a3d3a63eb6 100644 --- a/engine/src/flutter/ci/builders/linux_android_emulator_skia.json +++ b/engine/src/flutter/ci/builders/linux_android_emulator_skia.json @@ -44,11 +44,11 @@ "test_dependencies": [ { "dependency": "android_virtual_device", - "version": "android_34_google_apis_x64.textpb" + "version": "android_35_google_apis_x64.textpb" }, { "dependency": "avd_cipd_version", - "version": "build_id:8759428741582061553" + "version": "build_id:8740267484269553649" } ], "contexts": [ @@ -68,11 +68,11 @@ "test_dependencies": [ { "dependency": "android_virtual_device", - "version": "android_34_google_apis_x64.textpb" + "version": "android_35_google_apis_x64.textpb" }, { "dependency": "avd_cipd_version", - "version": "build_id:8759428741582061553" + "version": "build_id:8740267484269553649" } ], "contexts": [ @@ -88,4 +88,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/engine/src/flutter/ci/builders/linux_android_emulator_skia_34.json b/engine/src/flutter/ci/builders/linux_android_emulator_skia_34.json new file mode 100644 index 0000000000..2f14d32c85 --- /dev/null +++ b/engine/src/flutter/ci/builders/linux_android_emulator_skia_34.json @@ -0,0 +1,91 @@ +{ + "builds": [ + { + "drone_dimensions": [ + "device_type=none", + "os=Linux", + "kvm=1", + "cores=8" + ], + "gclient_variables": { + "use_rbe": true + }, + "gn": [ + "--android", + "--android-cpu=x64", + "--no-lto", + "--rbe", + "--no-goma", + "--target-dir", + "ci/android_emulator_skia_debug_x64" + ], + "dependencies": [ + { + "dependency": "goldctl", + "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd" + } + ], + "name": "ci/android_emulator_skia_debug_x64", + "description": "Build for debug mode x64 Android Skia scenario app tests.", + "ninja": { + "config": "ci/android_emulator_skia_debug_x64", + "targets": [ + "flutter/impeller/toolkit/android:unittests", + "flutter/shell/platform/android:flutter_shell_native_unittests", + "flutter/testing/scenario_app" + ] + }, + "tests": [ + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Skia)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_skia_debug_x64", + "--no-enable-impeller" + ] + }, + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Skia, SurfaceTexture)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_skia_debug_x64", + "--no-enable-impeller", + "--force-surface-producer-surface-texture" + ] + } + ] + } + ] +} \ No newline at end of file