[Fuchsia] Run arm64 tests on terminal.qemu-arm64 on x64 hosts (flutter/engine#50657)

This change replicas https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Fuchsia%20arm64%20FEMU and runs tests on simulated arm64 on x64. E.g. https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20Engine%20Drone/1994921/overview
or more accurately, https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8756061244290412945/+/u/test:_arm64_emulator_based_debug_tests/stdout

The vulkan tests are excluded, qemu does not support vulkan.
The display_list_render_tests is excluded as it's way too slow (over 400 seconds).

After this change, comparing to femu_test.py, the only missing case is the dart-aot-runner-integration-test which is executed in fuchsia_profile_x64 anyway. It needs `--no-lto` in fuchsia_profile_arm64. I may need to confirm if the fuchsia_profile_arm64 build is used in fuchsia or the fuchsia_release_arm64.

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-15 12:22:23 -08:00
committed by GitHub
parent 7d9ad5606f
commit 4c418e9452
4 changed files with 29 additions and 14 deletions

4
DEPS
View File

@@ -252,7 +252,7 @@ vars = {
# The version / instance id of the cipd:chromium/fuchsia/test-scripts which
# will be used altogether with fuchsia-sdk to setup the build / test
# environment.
'fuchsia_test_scripts_version': 'MXOVCk7s_1bZ8hJZ5M5DgS_9i8FeSjYojkSGY8zpnxQC',
'fuchsia_test_scripts_version': 'vf8imeAzGv_gjYQDoqub2laI-6nkB3gQNiGuVaFForMC',
}
gclient_gn_args_file = 'src/third_party/dart/build/config/gclient_args.gni'
@@ -1184,7 +1184,7 @@ hooks = [
'python3',
'src/flutter/tools/fuchsia/with_envs.py',
'src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py',
'terminal.x64',
'terminal.x64,terminal.qemu-arm64',
]
}
]

View File

@@ -52,10 +52,12 @@
"archives": [],
"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",
@@ -70,6 +72,7 @@
"config": "fuchsia_debug_arm64",
"targets": [
"flutter/shell/platform/fuchsia:fuchsia",
"flutter/shell/platform/fuchsia/dart_runner:dart_runner_tests",
"fuchsia_tests"
]
},
@@ -86,6 +89,15 @@
"${REVISION}",
"--upload"
]
},
{
"name": "arm64 emulator based debug tests",
"language": "python3",
"script": "flutter/tools/fuchsia/with_envs.py",
"parameters": [
"testing/fuchsia/run_tests.py",
"fuchsia_debug_arm64"
]
}
]
},

View File

@@ -128,7 +128,7 @@ def _bundled_test_runner_of(target_id: str) -> _BundledTestRunner:
# 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
return 'variant' not in test or test['variant'] in VARIANT
tests = [t for t in tests if variant(t)]
return _BundledTestRunner(target_id, resolve_packages(tests), build_test_cases(tests), log_dir)
@@ -142,6 +142,8 @@ if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
logging.info('Running tests in %s', OUT_DIR)
sys.argv.append('--out-dir=' + OUT_DIR)
if VARIANT.endswith('_arm64'):
sys.argv.append('--product=terminal.qemu-arm64')
# The 'flutter-test-type' is a place holder and has no specific meaning; the
# _get_test_runner is overrided.
sys.argv.append('flutter-test-type')

View File

@@ -15,25 +15,26 @@
package: display_list_tests-0.far
- test_command: test run fuchsia-pkg://fuchsia.com/display_list_render_tests#meta/display_list_render_tests.cm
package: display_list_render_tests-0.far
variant: x64
- test_command: test run fuchsia-pkg://fuchsia.com/flow_tests#meta/flow_tests.cm
package: flow_tests-0.far
- test_command: test run fuchsia-pkg://fuchsia.com/runtime_tests#meta/runtime_tests.cm
package: runtime_tests-0.far
variant: fuchsia_debug_x64
variant: debug
- test_command: test run fuchsia-pkg://fuchsia.com/shell_tests#meta/shell_tests.cm
package: shell_tests-0.far
variant: fuchsia_debug_x64
variant: debug_x64
- test_command: test run fuchsia-pkg://fuchsia.com/testing_tests#meta/testing_tests.cm
package: testing_tests-0.far
- test_command: test run fuchsia-pkg://fuchsia.com/txt_tests#meta/txt_tests.cm -- --gtest_filter=-ParagraphTest.*
package: txt_tests-0.far
variant: fuchsia_debug_x64
variant: debug
- test_command: test run fuchsia-pkg://fuchsia.com/ui_tests#meta/ui_tests.cm
package: ui_tests-0.far
variant: fuchsia_debug_x64
variant: debug
- test_command: test run fuchsia-pkg://fuchsia.com/embedder_tests#meta/embedder_tests.cm
package: embedder_tests-0.far
variant: fuchsia_debug_x64
variant: debug_x64
- test_command: test run fuchsia-pkg://fuchsia.com/dart_utils_tests#meta/dart_utils_tests.cm
package: dart_utils_tests-0.far
- test_command: test run fuchsia-pkg://fuchsia.com/dart-jit-runner-integration-test#meta/dart-jit-runner-integration-test.cm
@@ -44,7 +45,7 @@
emulator_arch:
- 'x64'
- 'arm64'
variant: fuchsia_debug_x64
variant: debug
- test_command: test run fuchsia-pkg://fuchsia.com/dart-aot-runner-integration-test#meta/dart-aot-runner-integration-test.cm
run_with_dart_aot: 'true'
packages:
@@ -54,21 +55,21 @@
emulator_arch:
- 'x64'
- 'arm64'
variant: fuchsia_profile_x64
variant: profile
- test_command: test run fuchsia-pkg://fuchsia.com/flutter-embedder-test#meta/flutter-embedder-test.cm
packages:
- flutter-embedder-test-0.far
- oot_flutter_jit_runner-0.far
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/embedder/child-view/child-view/child-view.far
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/embedder/parent-view/parent-view/parent-view.far
variant: fuchsia_debug_x64
variant: debug_x64
- test_command: test run fuchsia-pkg://fuchsia.com/touch-input-test#meta/touch-input-test.cm
packages:
- touch-input-test-0.far
- oot_flutter_jit_runner-0.far
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/touch-input/touch-input-view/touch-input-view/touch-input-view.far
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/touch-input/embedding-flutter-view/embedding-flutter-view/embedding-flutter-view.far
variant: fuchsia_debug_x64
variant: debug_x64
- test_command: test run fuchsia-pkg://fuchsia.com/mouse-input-test#meta/mouse-input-test.cm
packages:
- mouse-input-test-0.far
@@ -79,4 +80,4 @@
- text-input-test-0.far
- oot_flutter_jit_runner-0.far
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/text-input/text-input-view/text-input-view/text-input-view.far
variant: fuchsia_debug_x64
variant: debug_x64