Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit aa3f016

Browse files
[Fuchsia] Run arm64 tests on terminal.qemu-arm64 on x64 hosts (#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: flutter/flutter#140179 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent fe5b419 commit aa3f016

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

DEPS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ vars = {
252252
# The version / instance id of the cipd:chromium/fuchsia/test-scripts which
253253
# will be used altogether with fuchsia-sdk to setup the build / test
254254
# environment.
255-
'fuchsia_test_scripts_version': 'MXOVCk7s_1bZ8hJZ5M5DgS_9i8FeSjYojkSGY8zpnxQC',
255+
'fuchsia_test_scripts_version': 'vf8imeAzGv_gjYQDoqub2laI-6nkB3gQNiGuVaFForMC',
256256
}
257257

258258
gclient_gn_args_file = 'src/third_party/dart/build/config/gclient_args.gni'
@@ -1184,7 +1184,7 @@ hooks = [
11841184
'python3',
11851185
'src/flutter/tools/fuchsia/with_envs.py',
11861186
'src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py',
1187-
'terminal.x64',
1187+
'terminal.x64,terminal.qemu-arm64',
11881188
]
11891189
}
11901190
]

ci/builders/linux_fuchsia.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@
5252
"archives": [],
5353
"drone_dimensions": [
5454
"device_type=none",
55+
"kvm=1",
5556
"os=Linux"
5657
],
5758
"gclient_variables": {
58-
"download_android_deps": false
59+
"download_android_deps": false,
60+
"run_fuchsia_emu": true
5961
},
6062
"gn": [
6163
"--fuchsia",
@@ -70,6 +72,7 @@
7072
"config": "fuchsia_debug_arm64",
7173
"targets": [
7274
"flutter/shell/platform/fuchsia:fuchsia",
75+
"flutter/shell/platform/fuchsia/dart_runner:dart_runner_tests",
7376
"fuchsia_tests"
7477
]
7578
},
@@ -86,6 +89,15 @@
8689
"${REVISION}",
8790
"--upload"
8891
]
92+
},
93+
{
94+
"name": "arm64 emulator based debug tests",
95+
"language": "python3",
96+
"script": "flutter/tools/fuchsia/with_envs.py",
97+
"parameters": [
98+
"testing/fuchsia/run_tests.py",
99+
"fuchsia_debug_arm64"
100+
]
89101
}
90102
]
91103
},

testing/fuchsia/run_tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def _bundled_test_runner_of(target_id: str) -> _BundledTestRunner:
128128
# TODO(zijiehe-google-com): Run all tests in release build,
129129
# https://github.com/flutter/flutter/issues/140179.
130130
def variant(test) -> bool:
131-
return 'variant' not in test or test['variant'] == VARIANT
131+
return 'variant' not in test or test['variant'] in VARIANT
132132

133133
tests = [t for t in tests if variant(t)]
134134
return _BundledTestRunner(target_id, resolve_packages(tests), build_test_cases(tests), log_dir)
@@ -142,6 +142,8 @@ def _get_test_runner(runner_args: argparse.Namespace, *_) -> TestRunner:
142142
logging.basicConfig(level=logging.INFO)
143143
logging.info('Running tests in %s', OUT_DIR)
144144
sys.argv.append('--out-dir=' + OUT_DIR)
145+
if VARIANT.endswith('_arm64'):
146+
sys.argv.append('--product=terminal.qemu-arm64')
145147
# The 'flutter-test-type' is a place holder and has no specific meaning; the
146148
# _get_test_runner is overrided.
147149
sys.argv.append('flutter-test-type')

testing/fuchsia/test_suites.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,26 @@
1515
package: display_list_tests-0.far
1616
- test_command: test run fuchsia-pkg://fuchsia.com/display_list_render_tests#meta/display_list_render_tests.cm
1717
package: display_list_render_tests-0.far
18+
variant: x64
1819
- test_command: test run fuchsia-pkg://fuchsia.com/flow_tests#meta/flow_tests.cm
1920
package: flow_tests-0.far
2021
- test_command: test run fuchsia-pkg://fuchsia.com/runtime_tests#meta/runtime_tests.cm
2122
package: runtime_tests-0.far
22-
variant: fuchsia_debug_x64
23+
variant: debug
2324
- test_command: test run fuchsia-pkg://fuchsia.com/shell_tests#meta/shell_tests.cm
2425
package: shell_tests-0.far
25-
variant: fuchsia_debug_x64
26+
variant: debug_x64
2627
- test_command: test run fuchsia-pkg://fuchsia.com/testing_tests#meta/testing_tests.cm
2728
package: testing_tests-0.far
2829
- test_command: test run fuchsia-pkg://fuchsia.com/txt_tests#meta/txt_tests.cm -- --gtest_filter=-ParagraphTest.*
2930
package: txt_tests-0.far
30-
variant: fuchsia_debug_x64
31+
variant: debug
3132
- test_command: test run fuchsia-pkg://fuchsia.com/ui_tests#meta/ui_tests.cm
3233
package: ui_tests-0.far
33-
variant: fuchsia_debug_x64
34+
variant: debug
3435
- test_command: test run fuchsia-pkg://fuchsia.com/embedder_tests#meta/embedder_tests.cm
3536
package: embedder_tests-0.far
36-
variant: fuchsia_debug_x64
37+
variant: debug_x64
3738
- test_command: test run fuchsia-pkg://fuchsia.com/dart_utils_tests#meta/dart_utils_tests.cm
3839
package: dart_utils_tests-0.far
3940
- test_command: test run fuchsia-pkg://fuchsia.com/dart-jit-runner-integration-test#meta/dart-jit-runner-integration-test.cm
@@ -44,7 +45,7 @@
4445
emulator_arch:
4546
- 'x64'
4647
- 'arm64'
47-
variant: fuchsia_debug_x64
48+
variant: debug
4849
- test_command: test run fuchsia-pkg://fuchsia.com/dart-aot-runner-integration-test#meta/dart-aot-runner-integration-test.cm
4950
run_with_dart_aot: 'true'
5051
packages:
@@ -54,21 +55,21 @@
5455
emulator_arch:
5556
- 'x64'
5657
- 'arm64'
57-
variant: fuchsia_profile_x64
58+
variant: profile
5859
- test_command: test run fuchsia-pkg://fuchsia.com/flutter-embedder-test#meta/flutter-embedder-test.cm
5960
packages:
6061
- flutter-embedder-test-0.far
6162
- oot_flutter_jit_runner-0.far
6263
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/embedder/child-view/child-view/child-view.far
6364
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/embedder/parent-view/parent-view/parent-view.far
64-
variant: fuchsia_debug_x64
65+
variant: debug_x64
6566
- test_command: test run fuchsia-pkg://fuchsia.com/touch-input-test#meta/touch-input-test.cm
6667
packages:
6768
- touch-input-test-0.far
6869
- oot_flutter_jit_runner-0.far
6970
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/touch-input/touch-input-view/touch-input-view/touch-input-view.far
7071
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/touch-input/embedding-flutter-view/embedding-flutter-view/embedding-flutter-view.far
71-
variant: fuchsia_debug_x64
72+
variant: debug_x64
7273
- test_command: test run fuchsia-pkg://fuchsia.com/mouse-input-test#meta/mouse-input-test.cm
7374
packages:
7475
- mouse-input-test-0.far
@@ -79,4 +80,4 @@
7980
- text-input-test-0.far
8081
- oot_flutter_jit_runner-0.far
8182
- gen/flutter/shell/platform/fuchsia/flutter/tests/integration/text-input/text-input-view/text-input-view/text-input-view.far
82-
variant: fuchsia_debug_x64
83+
variant: debug_x64

0 commit comments

Comments
 (0)