Skip to content
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

[Fuchsia] Run arm64 tests on terminal.qemu-arm64 on x64 hosts #50657

Merged
merged 14 commits into from
Feb 15, 2024
4 changes: 2 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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',
]
}
]
14 changes: 13 additions & 1 deletion ci/builders/linux_fuchsia.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
]
},
Expand All @@ -86,6 +89,15 @@
"${REVISION}",
"--upload"
]
},
{
"name": "arm64 emulator based debug tests",
zijiehe-google-com marked this conversation as resolved.
Show resolved Hide resolved
"language": "python3",
"script": "flutter/tools/fuchsia/with_envs.py",
"parameters": [
"testing/fuchsia/run_tests.py",
"fuchsia_debug_arm64"
]
}
]
},
Expand Down
4 changes: 3 additions & 1 deletion testing/fuchsia/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -142,6 +142,8 @@ def _get_test_runner(runner_args: argparse.Namespace, *_) -> TestRunner:
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')
Expand Down
21 changes: 11 additions & 10 deletions testing/fuchsia/test_suites.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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