Skip to content

[ci] Add emulator tests on older Android version #4616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ platform_properties:
{"dependency": "open_jdk", "version": "version:17"},
{"dependency": "curl", "version": "version:7.64.0"}
]
linux_android_legacy:
properties:
os: Ubuntu
cores: "8"
device_type: none
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
{"dependency": "open_jdk", "version": "version:17"},
{"dependency": "curl", "version": "version:7.64.0"},
{"dependency": "android_virtual_device", "version": "22"}
]
linux_desktop:
properties:
os: Ubuntu
Expand Down Expand Up @@ -529,6 +541,66 @@ targets:
{"dependency": "android_virtual_device", "version": "33"}
]

- name: linux_android_legacy android_platform_tests_legacy_api_shard_1 master
recipe: packages/packages
timeout: 60
bringup: true # New target
properties:
target_file: android_legacy_emulator_tests.yaml
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 0 --shardCount 6"

- name: linux_android_legacy android_platform_tests_legacy_api_shard_2 master
recipe: packages/packages
timeout: 60
bringup: true # New target
properties:
target_file: android_legacy_emulator_tests.yaml
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 1 --shardCount 6"

- name: linux_android_legacy android_platform_tests_legacy_api_shard_3 master
recipe: packages/packages
timeout: 60
bringup: true # New target
properties:
target_file: android_legacy_emulator_tests.yaml
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 2 --shardCount 6"

- name: linux_android_legacy android_platform_tests_legacy_api_shard_4 master
recipe: packages/packages
timeout: 60
bringup: true # New target
properties:
target_file: android_legacy_emulator_tests.yaml
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 3 --shardCount 6"

- name: linux_android_legacy android_platform_tests_legacy_api_shard_5 master
recipe: packages/packages
timeout: 60
bringup: true # New target
properties:
target_file: android_legacy_emulator_tests.yaml
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 4 --shardCount 6"

- name: linux_android_legacy android_platform_tests_legacy_api_shard_6 master
recipe: packages/packages
timeout: 60
bringup: true # New target
properties:
target_file: android_legacy_emulator_tests.yaml
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 5 --shardCount 6"

# 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
16 changes: 16 additions & 0 deletions .ci/targets/android_legacy_emulator_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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", "--exclude=script/configs/exclude_integration_android_legacy_emulator.yaml"]
# Only these two tests are run because they are the only ones that use the
# emulator. Other tests would just duplicate android_platform_test.yaml tests.
- name: native integration tests
script: script/tool_runner.sh
args: ["native-test", "--android", "--no-unit", "--exclude=script/configs/exclude_integration_android_legacy_emulator.yaml"]
- name: drive examples
script: script/tool_runner.sh
args: ["drive-examples", "--android", "--exclude=script/configs/exclude_integration_android_legacy_emulator.yaml,script/configs/exclude_integration_android.yaml,script/configs/exclude_integration_android_emulator.yaml"]
13 changes: 13 additions & 0 deletions script/configs/exclude_integration_android_legacy_emulator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This plugin no-ops below API 25, which is newer than the legacy emulator.
# This can be removed once the legacy emulator test is using at least
# API level 25.
- quick_actions
- quick_actions_android
# Fails on the legacy emulator. See https://github.com/flutter/flutter/issues/136823
# TODO(stuartmorgan): Remove this if the limitation can be worked around.
- video_player
- video_player_android
# Hangs on the legacy emulator. See https://github.com/flutter/flutter/issues/136824
# TODO(stuartmorgan): Remove this if the hang can be fixed.
- webview_flutter
- webview_flutter_android