From 58a1a13e7ff9e12c44c9922f1037ac6cb048560e Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Tue, 13 Feb 2024 13:15:35 -0800 Subject: [PATCH 1/6] run_with_dart_aot --- ci/builders/linux_fuchsia.json | 21 ++++++++++++++++++--- testing/fuchsia/run_tests.py | 5 ----- testing/fuchsia/test_suites.yaml | 1 + 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index ca1c999c09d56..4a40866096b85 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -92,6 +92,7 @@ { "drone_dimensions": [ "device_type=none", + "kvm=1", "os=Linux" ], "gclient_variables": { @@ -102,15 +103,29 @@ "--fuchsia-cpu", "x64", "--runtime-mode", - "profile" + "profile", + "--no-lto" ], "name": "fuchsia_profile_x64", "ninja": { "config": "fuchsia_profile_x64", "targets": [ - "flutter/shell/platform/fuchsia:fuchsia" + "flutter/shell/platform/fuchsia:fuchsia", + "flutter/shell/platform/fuchsia/dart_runner:dart_runner_tests", + "fuchsia_tests" ] - } + }, + "tests": [ + { + "name": "x64 emulator based profile / aot tests", + "language": "python3", + "script": "flutter/tools/fuchsia/with_envs.py", + "parameters": [ + "testing/fuchsia/run_tests.py", + "fuchsia_profile_x64" + ] + } + ] }, { "drone_dimensions": [ diff --git a/testing/fuchsia/run_tests.py b/testing/fuchsia/run_tests.py index e833329925f1a..1c1c0e434f807 100755 --- a/testing/fuchsia/run_tests.py +++ b/testing/fuchsia/run_tests.py @@ -125,11 +125,6 @@ def _bundled_test_runner_of(target_id: str) -> _BundledTestRunner: log_dir = os.environ.get('FLUTTER_LOGS_DIR', '/tmp/log') with open(os.path.join(os.path.dirname(__file__), 'test_suites.yaml'), 'r') as file: tests = yaml.safe_load(file) - # TODO(zijiehe-google-com): Run tests with dart aot, - # https://github.com/flutter/flutter/issues/140179. - def dart_jit(test) -> bool: - return 'run_with_dart_aot' not in test or test['run_with_dart_aot'] != 'true' - # TODO(zijiehe-google-com): Run all tests in release build, # https://github.com/flutter/flutter/issues/140179. def variant(test) -> bool: diff --git a/testing/fuchsia/test_suites.yaml b/testing/fuchsia/test_suites.yaml index c315a8aadf8cd..8f018241a4350 100644 --- a/testing/fuchsia/test_suites.yaml +++ b/testing/fuchsia/test_suites.yaml @@ -54,6 +54,7 @@ emulator_arch: - 'x64' - 'arm64' + variant: fuchsia_profile_x64 - test_command: test run fuchsia-pkg://fuchsia.com/flutter-embedder-test#meta/flutter-embedder-test.cm packages: - flutter-embedder-test-0.far From 1d0e72bf50aa7cc51147964cdeeaf45038a4a60f Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Tue, 13 Feb 2024 13:59:55 -0800 Subject: [PATCH 2/6] typo --- testing/fuchsia/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/fuchsia/run_tests.py b/testing/fuchsia/run_tests.py index 1c1c0e434f807..d4221d7945bcc 100755 --- a/testing/fuchsia/run_tests.py +++ b/testing/fuchsia/run_tests.py @@ -130,7 +130,7 @@ def _bundled_test_runner_of(target_id: str) -> _BundledTestRunner: def variant(test) -> bool: return 'variant' not in test or test['variant'] == VARIANT - tests = [t for t in tests if dart_jit(t) and variant(t)] + tests = [t for t in tests if variant(t)] return _BundledTestRunner(target_id, resolve_packages(tests), build_test_cases(tests), log_dir) From c86af55ae68122950448d4924ccb165242467037 Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Tue, 13 Feb 2024 14:08:31 -0800 Subject: [PATCH 3/6] more variant --- 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 d4221d7945bcc..26f608b046b26 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..913ce322caeb4 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_x64 + - fuchsia_profile_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_x64 + - fuchsia_profile_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_x64 + - fuchsia_profile_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_x64 + - fuchsia_profile_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_x64 + - fuchsia_profile_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_x64 + - fuchsia_profile_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_x64 + - fuchsia_profile_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_x64 + - fuchsia_profile_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_x64 + - fuchsia_profile_x64 From 3362c0ff6ace7a81a045b1cb01d9ae2e2e56678c Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Tue, 13 Feb 2024 14:26:35 -0800 Subject: [PATCH 4/6] remove --- testing/fuchsia/test_suites.yaml | 36 ++++++++------------------------ 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/testing/fuchsia/test_suites.yaml b/testing/fuchsia/test_suites.yaml index 913ce322caeb4..8f018241a4350 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_x64 - - fuchsia_profile_x64 + variant: 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 - - fuchsia_profile_x64 + variant: 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 - - fuchsia_profile_x64 + variant: 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 - - fuchsia_profile_x64 + variant: 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 - - fuchsia_profile_x64 + variant: 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 @@ -54,9 +44,7 @@ emulator_arch: - 'x64' - 'arm64' - variant: - - fuchsia_debug_x64 - - fuchsia_profile_x64 + variant: 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: @@ -73,18 +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: - - fuchsia_debug_x64 - - fuchsia_profile_x64 + variant: 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 - - fuchsia_profile_x64 + variant: 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 @@ -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_x64 - - fuchsia_profile_x64 + variant: fuchsia_debug_x64 From 9fe51dd427eeb94f42f2aa03fe05571f7973350b Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Tue, 13 Feb 2024 14:27:11 -0800 Subject: [PATCH 5/6] remove --- testing/fuchsia/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/fuchsia/run_tests.py b/testing/fuchsia/run_tests.py index 26f608b046b26..d4221d7945bcc 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'] == VARIANT tests = [t for t in tests if variant(t)] return _BundledTestRunner(target_id, resolve_packages(tests), build_test_cases(tests), log_dir) From 44dc34238457843bf6b56329e44510a6a7c2942e Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Tue, 13 Feb 2024 16:01:25 -0800 Subject: [PATCH 6/6] missing run_fuchsia_emu --- ci/builders/linux_fuchsia.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index 4a40866096b85..ea2a496343299 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -96,7 +96,8 @@ "os=Linux" ], "gclient_variables": { - "download_android_deps": false + "download_android_deps": false, + "run_fuchsia_emu": true }, "gn": [ "--fuchsia",