[Fuchsia] Run run_with_dart_aot test on fuchsia_profile_x64 (flutter/engine#50613)

This change starts running dart aot tests on fuchsia_profile_x64 builder which were previously ignored. But it also requires to build `profile` with `--no-lto`.
Since running tests are in general quite fast, this change does not exclude other test suites from fuchsia_profile_x64.

After this change, linux_fuchsia has higher coverage than the femu_test, later one can be removed.
But I may prefer submitting https://github.com/flutter/engine/pull/50657 first, so we can fully remove the femu_test.py.

Bug: https://github.com/flutter/flutter/issues/140179

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
zijiehe@
2024-02-14 15:11:56 -08:00
committed by GitHub
parent b0faf1e1d5
commit 52b63c363d
3 changed files with 22 additions and 10 deletions

View File

@@ -92,25 +92,41 @@
{
"drone_dimensions": [
"device_type=none",
"kvm=1",
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
"--fuchsia",
"--fuchsia-cpu",
"x64",
"--runtime-mode",
"profile"
"profile",
"--no-lto"
],
"name": "fuchsia_profile_x64",
"ninja": {
"config": "fuchsia_profile_x64",
"targets": [
"flutter/shell/platform/fuchsia:fuchsia"
"flutter/shell/platform/fuchsia:fuchsia",
"flutter/shell/platform/fuchsia/dart_runner:dart_runner_tests",
"fuchsia_tests"
]
}
},
"tests": [
{
"name": "x64 emulator based profile / aot tests",
"language": "python3",
"script": "flutter/tools/fuchsia/with_envs.py",
"parameters": [
"testing/fuchsia/run_tests.py",
"fuchsia_profile_x64"
]
}
]
},
{
"drone_dimensions": [

View File

@@ -125,17 +125,12 @@ def _bundled_test_runner_of(target_id: str) -> _BundledTestRunner:
log_dir = os.environ.get('FLUTTER_LOGS_DIR', '/tmp/log')
with open(os.path.join(os.path.dirname(__file__), 'test_suites.yaml'), 'r') as file:
tests = yaml.safe_load(file)
# TODO(zijiehe-google-com): Run tests with dart aot,
# https://github.com/flutter/flutter/issues/140179.
def dart_jit(test) -> bool:
return 'run_with_dart_aot' not in test or test['run_with_dart_aot'] != 'true'
# TODO(zijiehe-google-com): Run all tests in release build,
# https://github.com/flutter/flutter/issues/140179.
def variant(test) -> bool:
return 'variant' not in test or test['variant'] == VARIANT
tests = [t for t in tests if dart_jit(t) and variant(t)]
tests = [t for t in tests if variant(t)]
return _BundledTestRunner(target_id, resolve_packages(tests), build_test_cases(tests), log_dir)

View File

@@ -54,6 +54,7 @@
emulator_arch:
- 'x64'
- 'arm64'
variant: fuchsia_profile_x64
- test_command: test run fuchsia-pkg://fuchsia.com/flutter-embedder-test#meta/flutter-embedder-test.cm
packages:
- flutter-embedder-test-0.far