From 70b7664ba297d9a97051ce479ced5cc31954de5a Mon Sep 17 00:00:00 2001 From: "zijiehe@" <68449066+zijiehe-google-com@users.noreply.github.com> Date: Tue, 25 Feb 2025 09:51:36 -0800 Subject: [PATCH] [fuchsia] enable assets_unittests (#164019) It is an easy fix. http://b/394632376 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --- .../src/flutter/assets/native_assets_unittests.cc | 14 +++++++++++++- .../src/flutter/testing/fuchsia/test_suites.yaml | 2 -- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/assets/native_assets_unittests.cc b/engine/src/flutter/assets/native_assets_unittests.cc index 006f72437c..1d33b22df6 100644 --- a/engine/src/flutter/assets/native_assets_unittests.cc +++ b/engine/src/flutter/assets/native_assets_unittests.cc @@ -32,6 +32,18 @@ const char* kTestManifest = R"({ "libmy_package.so" ] }, + "fuchsia_arm64": { + "package:my_package/my_package_bindings_generated.dart": [ + "absolute", + "libmy_package.so" + ] + }, + "fuchsia_x64": { + "package:my_package/my_package_bindings_generated.dart": [ + "absolute", + "libmy_package.so" + ] + }, "macos_arm64": { "package:my_package/my_package_bindings_generated.dart": [ "absolute", @@ -75,7 +87,7 @@ TEST(NativeAssetsManagerTest, NativeAssetsManifestParsing) { ASSERT_EQ(existing_asset[0], "absolute"); #if defined(FML_OS_MACOSX) ASSERT_EQ(existing_asset[1], "my_package.framework/my_package"); -#elif defined(FML_OS_LINUX) +#elif defined(FML_OS_LINUX) || defined(FML_OS_FUCHSIA) ASSERT_EQ(existing_asset[1], "libmy_package.so"); #elif defined(FML_OS_WIN) ASSERT_EQ(existing_asset[1], "my_package.dll"); diff --git a/engine/src/flutter/testing/fuchsia/test_suites.yaml b/engine/src/flutter/testing/fuchsia/test_suites.yaml index 0e4f1c8032..83251f9cbb 100644 --- a/engine/src/flutter/testing/fuchsia/test_suites.yaml +++ b/engine/src/flutter/testing/fuchsia/test_suites.yaml @@ -6,9 +6,7 @@ # Please keep the list alphabetical order. - test_command: test run fuchsia-pkg://fuchsia.com/assets_unittests#meta/assets_unittests.cm - disabled: flutter/engine/src/flutter/assets/native_assets_unittests.cc does not support fuchsia yet. package: assets_unittests-0.far - variant: disabled - test_command: test run fuchsia-pkg://fuchsia.com/client_wrapper_unittests#meta/client_wrapper_unittests.cm package: client_wrapper_unittests-0.far - test_command: test run fuchsia-pkg://fuchsia.com/common_cpp_core_unittests#meta/common_cpp_core_unittests.cm