From 914efefa879f0b7a981cb44e0c6b2516eba63906 Mon Sep 17 00:00:00 2001 From: "zijiehe@" <68449066+zijiehe-google-com@users.noreply.github.com> Date: Tue, 20 Feb 2024 10:39:09 -0800 Subject: [PATCH] [Fuchsia] Create dedicated testers to run tests and deprecate femu_test (flutter/engine#50697) This change creates a fuchsia_profile_arm64_tester builder inside of the existing linux_fuchsia group. Comparing with fuchsia_profile_arm64, it uses `--no-lto` to limit the cost of compilation of test suites. Similar to the fuchsia_profile_x64, it runs release build test cases + aot test. E.g. https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20Engine%20Drone/1998852/overview or more accurately https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8755990392554423809/+/u/test:_arm64_emulator_based_profile___aot_tests/stdout. The same approach also applied to other builders. Now each fuchsia builder has its own tester which compiles test cases without lto. The change reduces the time cost of linux_fuchsia to around 20 min, e.g. https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20linux_fuchsia/6662/overview After this change, linux_fuchsia group has a higher coverage than the combination of linux fuchsia emu + linux fuchsia emu arm64. So I removed both builders from the `.ci.yaml` as well. Bug: https://github.com/flutter/flutter/issues/140179 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- engine/src/flutter/.ci.yaml | 42 ---- .../flutter/ci/builders/linux_fuchsia.json | 229 ++++++++++++++++-- .../flutter/testing/fuchsia/test_suites.yaml | 7 +- 3 files changed, 210 insertions(+), 68 deletions(-) diff --git a/engine/src/flutter/.ci.yaml b/engine/src/flutter/.ci.yaml index 7581b5498f..e8f9800384 100644 --- a/engine/src/flutter/.ci.yaml +++ b/engine/src/flutter/.ci.yaml @@ -161,48 +161,6 @@ targets: config_name: linux_benchmarks timeout: 60 - - name: Linux Fuchsia FEMU - recipe: engine/femu_test - properties: - add_recipes_cq: "true" - build_fuchsia: "true" - fuchsia_ctl_version: version:0.0.27 - # ensure files from pre-production Fuchsia SDK tests are purged from cache - clobber: "true" - emulator_arch: "x64" - enable_cso: "true" - timeout: 60 - # TODO(https://github.com/flutter/flutter/issues/138559): Re-enable/delete. - # runIfNot: - # - lib/web_ui/** - # - shell/platform/android/** - # - shell/platform/darwin/** - # - shell/platform/glfw/** - # - shell/platform/linux/** - # - shell/platform/windows/** - # - web_sdk/** - - - name: Linux Fuchsia arm64 FEMU - recipe: engine/femu_test - properties: - build_fuchsia: "true" - fuchsia_ctl_version: version:0.0.27 - # ensure files from pre-production Fuchsia SDK tests are purged from cache - clobber: "true" - emulator_arch: "arm64" - enable_cso: "true" - timeout: 60 - bringup: true - # TODO(https://github.com/flutter/flutter/issues/138559): Re-enable/delete. - # runIfNot: - # - lib/web_ui/** - # - shell/platform/android/** - # - shell/platform/darwin/** - # - shell/platform/glfw/** - # - shell/platform/linux/** - # - shell/platform/windows/** - # - web_sdk/** - - name: Linux linux_fuchsia recipe: engine_v2/engine_v2 timeout: 60 diff --git a/engine/src/flutter/ci/builders/linux_fuchsia.json b/engine/src/flutter/ci/builders/linux_fuchsia.json index 57df0a5d01..249ba44090 100644 --- a/engine/src/flutter/ci/builders/linux_fuchsia.json +++ b/engine/src/flutter/ci/builders/linux_fuchsia.json @@ -1,7 +1,6 @@ { "builds": [ { - "archives": [], "drone_dimensions": [ "device_type=none", "os=Linux" @@ -25,7 +24,46 @@ } }, { - "archives": [], + "cas_archive": false, + "drone_dimensions": [ + "device_type=none", + "kvm=1", + "os=Linux" + ], + "gclient_variables": { + "download_android_deps": false, + "run_fuchsia_emu": true + }, + "gn": [ + "--fuchsia", + "--fuchsia-cpu", + "arm64", + "--runtime-mode", + "profile", + "--no-lto" + ], + "name": "fuchsia_profile_arm64_tester", + "ninja": { + "config": "fuchsia_profile_arm64", + "targets": [ + "flutter/shell/platform/fuchsia:fuchsia", + "flutter/shell/platform/fuchsia/dart_runner:dart_runner_tests", + "fuchsia_tests" + ] + }, + "tests": [ + { + "name": "arm64 emulator based profile / aot tests", + "language": "python3", + "script": "flutter/tools/fuchsia/with_envs.py", + "parameters": [ + "testing/fuchsia/run_tests.py", + "fuchsia_profile_arm64" + ] + } + ] + }, + { "drone_dimensions": [ "device_type=none", "os=Linux" @@ -49,7 +87,86 @@ } }, { - "archives": [], + "cas_archive": false, + "drone_dimensions": [ + "device_type=none", + "kvm=1", + "os=Linux" + ], + "gclient_variables": { + "download_android_deps": false, + "run_fuchsia_emu": true + }, + "gn": [ + "--fuchsia", + "--fuchsia-cpu", + "arm64", + "--runtime-mode", + "release", + "--no-lto" + ], + "name": "fuchsia_release_arm64_tester", + "ninja": { + "config": "fuchsia_release_arm64", + "targets": [ + "flutter/shell/platform/fuchsia:fuchsia", + "flutter/shell/platform/fuchsia/dart_runner:dart_runner_tests", + "fuchsia_tests" + ] + }, + "tests": [ + { + "name": "arm64 emulator based release tests", + "language": "python3", + "script": "flutter/tools/fuchsia/with_envs.py", + "parameters": [ + "testing/fuchsia/run_tests.py", + "fuchsia_release_arm64" + ] + } + ] + }, + { + "drone_dimensions": [ + "device_type=none", + "os=Linux" + ], + "gclient_variables": { + "download_android_deps": false + }, + "gn": [ + "--fuchsia", + "--fuchsia-cpu", + "arm64", + "--runtime-mode", + "debug", + "--no-lto" + ], + "name": "fuchsia_debug_arm64", + "ninja": { + "config": "fuchsia_debug_arm64", + "targets": [ + "flutter/shell/platform/fuchsia:fuchsia" + ] + }, + "tests": [ + { + "name": "Upload to Symbol Server for arch: arm64", + "language": "python3", + "contexts": ["depot_tools_on_path"], + "script": "flutter/tools/fuchsia/upload_to_symbol_server.py", + "parameters": [ + "--symbol-dir", + "out/fuchsia_debug_arm64/.build-id", + "--engine-version", + "${REVISION}", + "--upload" + ] + } + ] + }, + { + "cas_archive": false, "drone_dimensions": [ "device_type=none", "kvm=1", @@ -67,7 +184,7 @@ "debug", "--no-lto" ], - "name": "fuchsia_debug_arm64", + "name": "fuchsia_debug_arm64_tester", "ninja": { "config": "fuchsia_debug_arm64", "targets": [ @@ -77,19 +194,6 @@ ] }, "tests": [ - { - "name": "Upload to Symbol Server for arch: arm64", - "language": "python3", - "contexts": ["depot_tools_on_path"], - "script": "flutter/tools/fuchsia/upload_to_symbol_server.py", - "parameters": [ - "--symbol-dir", - "out/fuchsia_debug_arm64/.build-id", - "--engine-version", - "${REVISION}", - "--upload" - ] - }, { "name": "arm64 emulator based debug tests", "language": "python3", @@ -102,6 +206,30 @@ ] }, { + "drone_dimensions": [ + "device_type=none", + "os=Linux" + ], + "gclient_variables": { + "download_android_deps": false + }, + "gn": [ + "--fuchsia", + "--fuchsia-cpu", + "x64", + "--runtime-mode", + "profile" + ], + "name": "fuchsia_profile_x64", + "ninja": { + "config": "fuchsia_profile_x64", + "targets": [ + "flutter/shell/platform/fuchsia:fuchsia" + ] + } + }, + { + "cas_archive": false, "drone_dimensions": [ "device_type=none", "kvm=1", @@ -119,7 +247,7 @@ "profile", "--no-lto" ], - "name": "fuchsia_profile_x64", + "name": "fuchsia_profile_x64_tester", "ninja": { "config": "fuchsia_profile_x64", "targets": [ @@ -141,6 +269,31 @@ ] }, { + "drone_dimensions": [ + "device_type=none", + "os=Linux" + ], + "gclient_variables": { + "download_android_deps": false, + "run_fuchsia_emu": true + }, + "gn": [ + "--fuchsia", + "--fuchsia-cpu", + "x64", + "--runtime-mode", + "release" + ], + "name": "fuchsia_release_x64", + "ninja": { + "config": "fuchsia_release_x64", + "targets": [ + "flutter/shell/platform/fuchsia:fuchsia" + ] + } + }, + { + "cas_archive": false, "drone_dimensions": [ "device_type=none", "kvm=1", @@ -158,7 +311,7 @@ "release", "--no-lto" ], - "name": "fuchsia_release_x64", + "name": "fuchsia_release_x64_tester", "ninja": { "config": "fuchsia_release_x64", "targets": [ @@ -182,7 +335,6 @@ { "drone_dimensions": [ "device_type=none", - "kvm=1", "os=Linux" ], "gclient_variables": { @@ -201,9 +353,7 @@ "ninja": { "config": "fuchsia_debug_x64", "targets": [ - "flutter/shell/platform/fuchsia:fuchsia", - "flutter/shell/platform/fuchsia/dart_runner:dart_runner_tests", - "fuchsia_tests" + "flutter/shell/platform/fuchsia:fuchsia" ] }, "tests": [ @@ -219,7 +369,38 @@ "${REVISION}", "--upload" ] - }, + } + ] + }, + { + "cas_archive": false, + "drone_dimensions": [ + "device_type=none", + "kvm=1", + "os=Linux" + ], + "gclient_variables": { + "download_android_deps": false, + "run_fuchsia_emu": true + }, + "gn": [ + "--fuchsia", + "--fuchsia-cpu", + "x64", + "--runtime-mode", + "debug", + "--no-lto" + ], + "name": "fuchsia_debug_x64_tester", + "ninja": { + "config": "fuchsia_debug_x64", + "targets": [ + "flutter/shell/platform/fuchsia:fuchsia", + "flutter/shell/platform/fuchsia/dart_runner:dart_runner_tests", + "fuchsia_tests" + ] + }, + "tests": [ { "name": "run_tests test", "script": "flutter/testing/fuchsia/run_tests_test.py" diff --git a/engine/src/flutter/testing/fuchsia/test_suites.yaml b/engine/src/flutter/testing/fuchsia/test_suites.yaml index 49358facb2..f017c6e0d7 100644 --- a/engine/src/flutter/testing/fuchsia/test_suites.yaml +++ b/engine/src/flutter/testing/fuchsia/test_suites.yaml @@ -15,12 +15,14 @@ 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 + disabled: on arm64 because of the slowness 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: debug + disabled: on debug_arm64 because of the slowness + variant: debug_x64 - test_command: test run fuchsia-pkg://fuchsia.com/shell_tests#meta/shell_tests.cm package: shell_tests-0.far variant: debug_x64 @@ -31,7 +33,8 @@ variant: debug - test_command: test run fuchsia-pkg://fuchsia.com/ui_tests#meta/ui_tests.cm package: ui_tests-0.far - variant: debug + disabled: on debug_arm64 because of the slowness + variant: debug_x64 - test_command: test run fuchsia-pkg://fuchsia.com/embedder_tests#meta/embedder_tests.cm package: embedder_tests-0.far variant: debug_x64