From 356d2a068b949ee06e079abbc50b50245766e148 Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Wed, 14 Feb 2024 12:19:40 -0800 Subject: [PATCH 1/8] terminal.qemu-arm64 --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 514b30cadd7f9..f91e2886472af 100644 --- a/DEPS +++ b/DEPS @@ -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', ] } ] From e073f8dbc0cfa2954a7bb9b668cfafd83f3d3b83 Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Wed, 14 Feb 2024 12:23:26 -0800 Subject: [PATCH 2/8] test --- ci/builders/linux_fuchsia.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index ca1c999c09d56..199ca2a36d302 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -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,17 @@ "${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", + "--product", + "terminal.qemu-arm64" + ] } ] }, From ef6bcde176777dc8deb8861ff0fdf87d86ddb844 Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Wed, 14 Feb 2024 12:26:40 -0800 Subject: [PATCH 3/8] product --- ci/builders/linux_fuchsia.json | 4 +--- testing/fuchsia/run_tests.py | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index 199ca2a36d302..e4aa7b404d02c 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -96,9 +96,7 @@ "script": "flutter/tools/fuchsia/with_envs.py", "parameters": [ "testing/fuchsia/run_tests.py", - "fuchsia_debug_arm64", - "--product", - "terminal.qemu-arm64" + "fuchsia_debug_arm64" ] } ] diff --git a/testing/fuchsia/run_tests.py b/testing/fuchsia/run_tests.py index e833329925f1a..c73b824ca90b7 100755 --- a/testing/fuchsia/run_tests.py +++ b/testing/fuchsia/run_tests.py @@ -147,6 +147,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') From 9ef639dc1879f33887341a01b688d307bd4dafe7 Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Wed, 14 Feb 2024 17:18:02 -0800 Subject: [PATCH 4/8] update test scripts --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f91e2886472af..c2cedb64f3e58 100644 --- a/DEPS +++ b/DEPS @@ -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' From 84f903f3a75b6df353009327640023b18ca4516b Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Wed, 14 Feb 2024 17:46:24 -0800 Subject: [PATCH 5/8] more tests --- testing/fuchsia/run_tests.py | 2 +- testing/fuchsia/test_suites.yaml | 36 ++++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/testing/fuchsia/run_tests.py b/testing/fuchsia/run_tests.py index 2db27185aae39..7aca837864476 100755 --- a/testing/fuchsia/run_tests.py +++ b/testing/fuchsia/run_tests.py @@ -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 VARIANT in test['variant'] tests = [t for t in tests if variant(t)] return _BundledTestRunner(target_id, resolve_packages(tests), build_test_cases(tests), log_dir) diff --git a/testing/fuchsia/test_suites.yaml b/testing/fuchsia/test_suites.yaml index 8f018241a4350..f287490be78b2 100644 --- a/testing/fuchsia/test_suites.yaml +++ b/testing/fuchsia/test_suites.yaml @@ -19,21 +19,31 @@ 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: + - fuchsia_debug_arm64 + - fuchsia_debug_x64 - test_command: test run fuchsia-pkg://fuchsia.com/shell_tests#meta/shell_tests.cm package: shell_tests-0.far - variant: fuchsia_debug_x64 + variant: + - fuchsia_debug_arm64 + - fuchsia_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: + - fuchsia_debug_arm64 + - fuchsia_debug_x64 - test_command: test run fuchsia-pkg://fuchsia.com/ui_tests#meta/ui_tests.cm package: ui_tests-0.far - variant: fuchsia_debug_x64 + variant: + - fuchsia_debug_arm64 + - fuchsia_debug_x64 - test_command: test run fuchsia-pkg://fuchsia.com/embedder_tests#meta/embedder_tests.cm package: embedder_tests-0.far - variant: fuchsia_debug_x64 + variant: + - fuchsia_debug_arm64 + - fuchsia_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 +54,9 @@ emulator_arch: - 'x64' - 'arm64' - variant: fuchsia_debug_x64 + variant: + - fuchsia_debug_arm64 + - fuchsia_debug_x64 - 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: @@ -61,14 +73,18 @@ - 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: + - fuchsia_debug_arm64 + - fuchsia_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: + - fuchsia_debug_arm64 + - fuchsia_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 +95,6 @@ - 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: + - fuchsia_debug_arm64 + - fuchsia_debug_x64 From 067639a6d25de6238a88c5311d385a38e42a98b6 Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Wed, 14 Feb 2024 18:10:24 -0800 Subject: [PATCH 6/8] less --- testing/fuchsia/run_tests.py | 2 +- testing/fuchsia/test_suites.yaml | 38 +++++++++----------------------- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/testing/fuchsia/run_tests.py b/testing/fuchsia/run_tests.py index 7aca837864476..f7155e5563cc0 100755 --- a/testing/fuchsia/run_tests.py +++ b/testing/fuchsia/run_tests.py @@ -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 VARIANT in test['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) diff --git a/testing/fuchsia/test_suites.yaml b/testing/fuchsia/test_suites.yaml index f287490be78b2..42859e6f22644 100644 --- a/testing/fuchsia/test_suites.yaml +++ b/testing/fuchsia/test_suites.yaml @@ -19,31 +19,21 @@ 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_arm64 - - 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_arm64 - - fuchsia_debug_x64 + variant: debug - 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_arm64 - - 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_arm64 - - 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_arm64 - - fuchsia_debug_x64 + variant: debug - 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 @@ -54,9 +44,7 @@ emulator_arch: - 'x64' - 'arm64' - variant: - - fuchsia_debug_arm64 - - 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: @@ -66,25 +54,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_arm64 - - fuchsia_debug_x64 + variant: debug - 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_arm64 - - fuchsia_debug_x64 + variant: debug - test_command: test run fuchsia-pkg://fuchsia.com/mouse-input-test#meta/mouse-input-test.cm packages: - mouse-input-test-0.far @@ -95,6 +79,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_arm64 - - fuchsia_debug_x64 + variant: debug From 1494cc8fc19ac31b37111ee1cfaa049f0f679c93 Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Wed, 14 Feb 2024 18:45:23 -0800 Subject: [PATCH 7/8] reduce tests --- testing/fuchsia/test_suites.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/fuchsia/test_suites.yaml b/testing/fuchsia/test_suites.yaml index 42859e6f22644..b56afdeffda02 100644 --- a/testing/fuchsia/test_suites.yaml +++ b/testing/fuchsia/test_suites.yaml @@ -22,7 +22,7 @@ variant: debug - test_command: test run fuchsia-pkg://fuchsia.com/shell_tests#meta/shell_tests.cm package: shell_tests-0.far - variant: debug + 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.* @@ -33,7 +33,7 @@ variant: debug - test_command: test run fuchsia-pkg://fuchsia.com/embedder_tests#meta/embedder_tests.cm package: embedder_tests-0.far - variant: debug + 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 @@ -61,14 +61,14 @@ - 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: debug + 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: debug + 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 +79,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: debug + variant: debug_x64 From 8c445b1765433e56235ae67198913df76d692527 Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Wed, 14 Feb 2024 19:03:47 -0800 Subject: [PATCH 8/8] exclude display_list_render_tests --- testing/fuchsia/test_suites.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/fuchsia/test_suites.yaml b/testing/fuchsia/test_suites.yaml index b56afdeffda02..49358facb25ca 100644 --- a/testing/fuchsia/test_suites.yaml +++ b/testing/fuchsia/test_suites.yaml @@ -15,6 +15,7 @@ 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