From f169019195c13f9e0630098eab950d0a55cc90f6 Mon Sep 17 00:00:00 2001 From: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:25:52 +0000 Subject: [PATCH] [Android] Introduces API 34 emulators for subset of tests (#5105) Introduces API 34 emulators for subset of tests not causing test failures in https://github.com/flutter/packages/pull/4804. Also changes linux_android version to 34v1. Continuation of https://github.com/flutter/packages/pull/4820. --- .ci.yaml | 51 +++++++++++-------- .ci/targets/android_platform_tests.yaml | 12 ++--- .../android_platform_tests_api_33_avd.yaml | 4 +- script/configs/still_requires_api_33_avd.yaml | 1 + 4 files changed, 38 insertions(+), 30 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index 334ef1da2292..4eaaea400185 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -271,7 +271,7 @@ targets: # web_benchmarks needs Chrome. dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"}, + {"dependency": "android_virtual_device", "version": "34"}, {"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"}, {"dependency": "chrome_and_driver", "version": "version:114.0"} ] @@ -288,7 +288,7 @@ targets: # See comments on 'master' version above. dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"}, + {"dependency": "android_virtual_device", "version": "34"}, {"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"}, {"dependency": "chrome_and_driver", "version": "version:114.0"} ] @@ -323,6 +323,9 @@ targets: {"dependency": "open_jdk", "version": "version:11"} ] + # All of the Linux_android android_platform_tests shards have the same + # dependency list, despite some running on Android 33 AVDs versus 34. + # See https://github.com/flutter/flutter/issues/137082 for context. - name: Linux_android android_platform_tests_shard_1 master recipe: packages/packages timeout: 60 @@ -330,10 +333,11 @@ targets: target_file: android_platform_tests.yaml channel: master version_file: flutter_master.version + # set up for 34 package_sharding: "--shardIndex 0 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_2 master @@ -343,10 +347,11 @@ targets: target_file: android_platform_tests.yaml channel: master version_file: flutter_master.version + # set up for 34 package_sharding: "--shardIndex 1 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_3 master @@ -356,10 +361,11 @@ targets: target_file: android_platform_tests.yaml channel: master version_file: flutter_master.version + # set up for 34 package_sharding: "--shardIndex 2 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_4 master @@ -369,10 +375,11 @@ targets: target_file: android_platform_tests.yaml channel: master version_file: flutter_master.version + # set up for 34 package_sharding: "--shardIndex 3 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_5 master @@ -382,10 +389,11 @@ targets: target_file: android_platform_tests.yaml channel: master version_file: flutter_master.version + # set up for 34 package_sharding: "--shardIndex 4 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_6 master @@ -395,20 +403,21 @@ targets: target_file: android_platform_tests.yaml channel: master version_file: flutter_master.version + # set up for 34 package_sharding: "--shardIndex 5 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_api_33_shard_1 master recipe: packages/packages timeout: 60 - bringup: true properties: - target_file: android_platform_tests_api_33.yaml + target_file: android_platform_tests_api_33_avd.yaml channel: master version_file: flutter_master.version + # set up for 33 package_sharding: "--shardIndex 0 --shardCount 2" dependencies: >- [ @@ -418,11 +427,11 @@ targets: - name: Linux_android android_platform_tests_api_33_shard_2 master recipe: packages/packages timeout: 60 - bringup: true properties: - target_file: android_platform_tests_api_33.yaml + target_file: android_platform_tests_api_33_avd.yaml channel: master version_file: flutter_master.version + # set up for 33 package_sharding: "--shardIndex 1 --shardCount 2" dependencies: >- [ @@ -440,7 +449,7 @@ targets: package_sharding: "--shardIndex 0 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_2 stable @@ -454,7 +463,7 @@ targets: package_sharding: "--shardIndex 1 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_3 stable @@ -468,7 +477,7 @@ targets: package_sharding: "--shardIndex 2 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_4 stable @@ -482,7 +491,7 @@ targets: package_sharding: "--shardIndex 3 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_5 stable @@ -496,7 +505,7 @@ targets: package_sharding: "--shardIndex 4 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_shard_6 stable @@ -510,15 +519,14 @@ targets: package_sharding: "--shardIndex 5 --shardCount 6" dependencies: >- [ - {"dependency": "android_virtual_device", "version": "33"} + {"dependency": "android_virtual_device", "version": "34"} ] - name: Linux_android android_platform_tests_api_33_shard_1 stable recipe: packages/packages timeout: 60 - bringup: true properties: - target_file: android_platform_tests_api_33.yaml + target_file: android_platform_tests_api_33_avd.yaml channel: master version_file: flutter_stable.version package_sharding: "--shardIndex 0 --shardCount 2" @@ -530,9 +538,8 @@ targets: - name: Linux_android android_platform_tests_api_33_shard_2 stable recipe: packages/packages timeout: 60 - bringup: true properties: - target_file: android_platform_tests_api_33.yaml + target_file: android_platform_tests_api_33_avd.yaml channel: master version_file: flutter_stable.version package_sharding: "--shardIndex 1 --shardCount 2" diff --git a/.ci/targets/android_platform_tests.yaml b/.ci/targets/android_platform_tests.yaml index eea5063cb713..7e27f17d5819 100644 --- a/.ci/targets/android_platform_tests.yaml +++ b/.ci/targets/android_platform_tests.yaml @@ -5,23 +5,23 @@ tasks: - name: download Dart and Android deps script: script/tool_runner.sh infra_step: true - args: ["fetch-deps", "--android", "--supporting-target-platforms-only"] + args: ["fetch-deps", "--android", "--supporting-target-platforms-only", "--exclude=script/configs/still_requires_api_33_avd.yaml"] - name: build examples script: script/tool_runner.sh - args: ["build-examples", "--apk"] + args: ["build-examples", "--apk", "--exclude=script/configs/still_requires_api_33_avd.yaml"] - name: lint script: script/tool_runner.sh - args: ["lint-android"] + args: ["lint-android", "--exclude=script/configs/still_requires_api_33_avd.yaml"] # Native unit and native integration are split into two steps to allow for # different exclusions. # TODO(stuartmorgan): Eliminate the native unit test exclusion, and combine # these steps. - name: native unit tests script: script/tool_runner.sh - args: ["native-test", "--android", "--no-integration", "--exclude=script/configs/exclude_native_unit_android.yaml"] + args: ["native-test", "--android", "--no-integration", "--exclude=script/configs/exclude_native_unit_android.yaml,script/configs/still_requires_api_33_avd.yaml"] - name: native integration tests script: script/tool_runner.sh - args: ["native-test", "--android", "--no-unit"] + args: ["native-test", "--android", "--no-unit", "--exclude=script/configs/still_requires_api_33_avd.yaml"] - name: drive examples script: script/tool_runner.sh - args: ["drive-examples", "--android", "--exclude=script/configs/exclude_integration_android.yaml,script/configs/exclude_integration_android_emulator.yaml"] + args: ["drive-examples", "--android", "--exclude=script/configs/exclude_integration_android.yaml,script/configs/exclude_integration_android_emulator.yaml,script/configs/still_requires_api_33_avd.yaml"] diff --git a/.ci/targets/android_platform_tests_api_33_avd.yaml b/.ci/targets/android_platform_tests_api_33_avd.yaml index cbec7c79127b..bebcb9a93b92 100644 --- a/.ci/targets/android_platform_tests_api_33_avd.yaml +++ b/.ci/targets/android_platform_tests_api_33_avd.yaml @@ -20,11 +20,11 @@ tasks: # these steps. - name: native unit tests script: script/tool_runner.sh - args: ["native-test", "--android", "--no-integration", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"] + args: ["native-test", "--android", "--no-integration", "--exclude=script/configs/exclude_native_unit_android.yaml", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"] - name: native integration tests script: script/tool_runner.sh args: ["native-test", "--android", "--no-unit", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"] - name: drive examples script: script/tool_runner.sh - args: ["drive-examples", "--android", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"] + args: ["drive-examples", "--android", "--exclude=script/configs/exclude_integration_android.yaml,script/configs/exclude_integration_android_emulator.yaml", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"] diff --git a/script/configs/still_requires_api_33_avd.yaml b/script/configs/still_requires_api_33_avd.yaml index 87f711c25b77..79f9c99c86c2 100644 --- a/script/configs/still_requires_api_33_avd.yaml +++ b/script/configs/still_requires_api_33_avd.yaml @@ -2,3 +2,4 @@ - file_selector - quick_actions - webview_flutter +- path_provider