Skip to content

Commit

Permalink
[Android] Add new tasks for subset of tests to run API 33 (#4974)
Browse files Browse the repository at this point in the history
Adds new tasks to create shards to run a subset of Android platform tests on API 33 AVD tests when the update to run tests on AVDs with API 34 lands due to test failures on a subset of plugins. Prequel PR to #4820.
  • Loading branch information
camsim99 authored Sep 26, 2023
1 parent 63daefb commit 21c2ebb
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,34 @@ targets:
{"dependency": "android_virtual_device", "version": "33"}
]
- 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
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 0 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "33"}
]
- 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
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 1 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "33"}
]
- name: Linux_android android_platform_tests_shard_1 stable
recipe: packages/packages
presubmit: false
Expand Down Expand Up @@ -464,6 +492,34 @@ targets:
{"dependency": "android_virtual_device", "version": "33"}
]
- 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
channel: master
version_file: flutter_stable.version
package_sharding: "--shardIndex 0 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "33"}
]
- 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
channel: master
version_file: flutter_stable.version
package_sharding: "--shardIndex 1 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "33"}
]
# Device versions of Android integration tests, run via FTL.
# TODO(stuartmorgan): Revisit whether physical device tests are redundant once
# we have more data about emulator tests; see
Expand Down
30 changes: 30 additions & 0 deletions .ci/targets/android_platform_tests_api_33_avd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Same as android_platform_tests.yaml with only packages currently requiring
# Android 33 due to test failures caused by running on Android 34 AVDs.
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart and Android deps
script: script/tool_runner.sh
infra_step: true
args: ["fetch-deps", "--android", "--supporting-target-platforms-only", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"]
- name: build examples
script: script/tool_runner.sh
args: ["build-examples", "--apk", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"]
- name: lint
script: script/tool_runner.sh
args: ["lint-android", "--filter-packages-to=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", "--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"]

4 changes: 4 additions & 0 deletions script/configs/still_requires_api_33_avd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Running the somes tests from these packages on an AVD with Android 34 causes failures.
- file_selector
- quick_actions
- webview_flutter

0 comments on commit 21c2ebb

Please sign in to comment.