Skip to content

Commit

Permalink
[Android][webview_flutter] Run integration tests on emulators running…
Browse files Browse the repository at this point in the history
… Android 34 (#6499)

Changes webview_flutter , webview_flutter_android tests to run on emulators running SDK 34 for Android. I also

1. Changed all `unawaited` calls in non-legacy tests to `await`. I believe several of the setup steps need to be completed before running checks based on testing, so this should leave the tests safer overall.
2. Changing the integration test directory structures look like what is described in [the integration_test packages instructions](https://github.com/flutter/flutter/blob/master/packages/integration_test/README.md#package-structure). Without changing the package to this structure, CI seemed to run the tests in parallel. I am still trying to figure out why this is but no longer want to block this PR.

Also removes shards for testing packages against Android 33 since no packages are running on emulators running Android 33 anymore.

Fixes flutter/flutter#140001. Fixes flutter/flutter#137083.
  • Loading branch information
camsim99 committed May 10, 2024
1 parent f18b895 commit a489d49
Show file tree
Hide file tree
Showing 8 changed files with 250 additions and 375 deletions.
83 changes: 0 additions & 83 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,17 +394,13 @@ targets:
"CHANNEL": "stable"
}
# 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
properties:
target_file: android_platform_tests.yaml
channel: master
version_file: flutter_master.version
# set up for 34
package_sharding: "--shardIndex 0 --shardCount 6"
dependencies: >-
[
Expand All @@ -423,7 +419,6 @@ 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: >-
[
Expand All @@ -442,7 +437,6 @@ 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: >-
[
Expand All @@ -461,7 +455,6 @@ 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: >-
[
Expand All @@ -480,7 +473,6 @@ 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: >-
[
Expand All @@ -499,7 +491,6 @@ 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: >-
[
Expand All @@ -511,44 +502,6 @@ targets:
"PACKAGE_SHARDING": "--shardIndex 5 --shardCount 6"
}
- name: Linux_android android_platform_tests_api_33_shard_1 master
recipe: packages/packages
timeout: 60
properties:
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: >-
[
{"dependency": "android_virtual_device", "version": "android_33_google_apis_x64.textpb"}
]
env_variables: >-
{
"CHANNEL": "master",
"PACKAGE_SHARDING": "--shardIndex 0 --shardCount 2"
}
- name: Linux_android android_platform_tests_api_33_shard_2 master
recipe: packages/packages
timeout: 60
properties:
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: >-
[
{"dependency": "android_virtual_device", "version": "android_33_google_apis_x64.textpb"}
]
env_variables: >-
{
"CHANNEL": "master",
"PACKAGE_SHARDING": "--shardIndex 1 --shardCount 2"
}
- name: Linux_android android_platform_tests_shard_1 stable
recipe: packages/packages
presubmit: false
Expand Down Expand Up @@ -663,42 +616,6 @@ targets:
"PACKAGE_SHARDING": "--shardIndex 5 --shardCount 6"
}
- name: Linux_android android_platform_tests_api_33_shard_1 stable
recipe: packages/packages
timeout: 60
properties:
target_file: android_platform_tests_api_33_avd.yaml
channel: stable
version_file: flutter_stable.version
package_sharding: "--shardIndex 0 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "android_33_google_apis_x64.textpb"}
]
env_variables: >-
{
"CHANNEL": "stable",
"PACKAGE_SHARDING": "--shardIndex 0 --shardCount 2"
}
- name: Linux_android android_platform_tests_api_33_shard_2 stable
recipe: packages/packages
timeout: 60
properties:
target_file: android_platform_tests_api_33_avd.yaml
channel: stable
version_file: flutter_stable.version
package_sharding: "--shardIndex 1 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "android_33_google_apis_x64.textpb"}
]
env_variables: >-
{
"CHANNEL": "stable",
"PACKAGE_SHARDING": "--shardIndex 1 --shardCount 2"
}
- name: Linux_android_legacy android_platform_tests_legacy_api_shard_1 master
recipe: packages/packages
timeout: 60
Expand Down
12 changes: 6 additions & 6 deletions .ci/targets/android_platform_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ tasks:
- name: download Dart and Android deps
script: .ci/scripts/tool_runner.sh
infra_step: true
args: ["fetch-deps", "--android", "--supporting-target-platforms-only", "--exclude=script/configs/still_requires_api_33_avd.yaml"]
args: ["fetch-deps", "--android", "--supporting-target-platforms-only"]
- name: build examples
script: .ci/scripts/tool_runner.sh
args: ["build-examples", "--apk", "--exclude=script/configs/still_requires_api_33_avd.yaml"]
args: ["build-examples", "--apk"]
- name: lint
script: .ci/scripts/tool_runner.sh
args: ["lint-android", "--exclude=script/configs/still_requires_api_33_avd.yaml"]
args: ["lint-android"]
# 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: .ci/scripts/tool_runner.sh
args: ["native-test", "--android", "--no-integration", "--exclude=script/configs/exclude_native_unit_android.yaml,script/configs/still_requires_api_33_avd.yaml"]
args: ["native-test", "--android", "--no-integration", "--exclude=script/configs/exclude_native_unit_android.yaml"]
- name: native integration tests
script: .ci/scripts/tool_runner.sh
args: ["native-test", "--android", "--no-unit", "--exclude=script/configs/still_requires_api_33_avd.yaml"]
args: ["native-test", "--android", "--no-unit"]
- name: drive examples
script: .ci/scripts/tool_runner.sh
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"]
args: ["drive-examples", "--android", "--exclude=script/configs/exclude_integration_android.yaml,script/configs/exclude_integration_android_emulator.yaml"]
29 changes: 0 additions & 29 deletions .ci/targets/android_platform_tests_api_33_avd.yaml

This file was deleted.

0 comments on commit a489d49

Please sign in to comment.