diff --git a/BUILD.gn b/BUILD.gn index 0c299cf4d13771d5edcfaf9c4f492ab16f7ea48c..4cb8037d3a65876ecb4929e7d95d49551ea32035 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -129,9 +129,7 @@ if (is_fuchsia) { deps = [ "$flutter_root/flow:flow_tests", - - # TODO(gw280): Re-enable fml_tests on Fuchsia (https://github.com/flutter/flutter/issues/46122) - # "$flutter_root/fml:fml_tests", + "$flutter_root/fml:fml_tests", "$flutter_root/shell/platform/fuchsia/flutter:flutter_runner_tests", ] } diff --git a/fml/BUILD.gn b/fml/BUILD.gn index 21ce86c58ceeda865157435ea9a708acfa0281f4..8deb8dbdde26328cfacb2e9aa7eaab4c5878c002 100644 --- a/fml/BUILD.gn +++ b/fml/BUILD.gn @@ -225,7 +225,6 @@ executable("fml_unittests") { "memory/weak_ptr_unittest.cc", "message_loop_task_queues_merge_unmerge_unittests.cc", "message_loop_task_queues_unittests.cc", - "message_loop_unittests.cc", "message_unittests.cc", "paths_unittests.cc", "platform/darwin/string_range_sanitization_unittests.mm", @@ -242,7 +241,10 @@ executable("fml_unittests") { # TODO(gw280): Figure out why these tests don't work currently on Fuchsia if (!is_fuchsia) { - sources += [ "file_unittest.cc" ] + sources += [ + "file_unittest.cc", + "message_loop_unittests.cc", + ] } deps = [ @@ -252,6 +254,10 @@ executable("fml_unittests") { "$flutter_root/runtime:libdart", "$flutter_root/testing", ] + + if (is_fuchsia && using_fuchsia_sdk) { + libs = [ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ] + } } if (is_fuchsia) { diff --git a/fml/platform/fuchsia/message_loop_fuchsia.cc b/fml/platform/fuchsia/message_loop_fuchsia.cc index 506de40ef8974f31b3724dd34f6e17063b4f6e9e..4e44c913cac46ccbbf462d59c05f5583911d242c 100644 --- a/fml/platform/fuchsia/message_loop_fuchsia.cc +++ b/fml/platform/fuchsia/message_loop_fuchsia.cc @@ -30,9 +30,9 @@ void MessageLoopFuchsia::WakeUp(fml::TimePoint time_point) { due_time = zx::nsec((time_point - now).ToNanoseconds()); } - FML_DCHECK(async::PostDelayedTask( - loop_.dispatcher(), [this]() { RunExpiredTasksNow(); }, - due_time) == ZX_OK); + auto status = async::PostDelayedTask( + loop_.dispatcher(), [this]() { RunExpiredTasksNow(); }, due_time); + FML_DCHECK(status == ZX_OK); } } // namespace fml diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index edd3f8198bcbfad30ac672813dc165302b1aedbe..c970e05b30a29505edc5bdc5fc2ed488249a8b97 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -28,17 +28,13 @@ source_set("test_font") { group("libdart") { public_deps = [] - if (!(is_fuchsia && using_fuchsia_sdk)) { - if (flutter_runtime_mode == "profile" || - flutter_runtime_mode == "release") { - public_deps += - [ "//third_party/dart/runtime:libdart_precompiled_runtime" ] - } else { - public_deps += [ - "$flutter_root/lib/snapshot", - "//third_party/dart/runtime:libdart_jit", - ] - } + if (flutter_runtime_mode == "profile" || flutter_runtime_mode == "release") { + public_deps += [ "//third_party/dart/runtime:libdart_precompiled_runtime" ] + } else { + public_deps += [ + "$flutter_root/lib/snapshot", + "//third_party/dart/runtime:libdart_jit", + ] } } diff --git a/shell/platform/fuchsia/dart_runner/BUILD.gn b/shell/platform/fuchsia/dart_runner/BUILD.gn index a129ecd4a53de12c6002a8da3ab2abf425303cbd..caff5a6667400d48e78f8d007fdb9e57d775dbb9 100644 --- a/shell/platform/fuchsia/dart_runner/BUILD.gn +++ b/shell/platform/fuchsia/dart_runner/BUILD.gn @@ -53,7 +53,6 @@ template("runner") { deps = [ "$flutter_root/common", "$flutter_root/fml", - "$flutter_root/runtime:libdart", "$flutter_root/shell/platform/fuchsia/dart-pkg/fuchsia", "$flutter_root/shell/platform/fuchsia/dart-pkg/zircon", "$fuchsia_sdk_root/pkg:async", diff --git a/testing/fuchsia/run_tests.sh b/testing/fuchsia/run_tests.sh index 186a00907adf546db15d8557030430e4c3cc047b..695225b02fd5ada9cf85f1090d642fa98945dda8 100755 --- a/testing/fuchsia/run_tests.sh +++ b/testing/fuchsia/run_tests.sh @@ -39,3 +39,11 @@ trap reboot EXIT -f flutter_runner_tests-0.far \ -t flutter_runner_tests +./fuchsia_ctl -d $device_name test \ + -f fml_tests-0.far \ + -t fml_tests + +./fuchsia_ctl -d $device_name test \ + -f flow_tests-0.far \ + -t flow_tests + diff --git a/testing/fuchsia/test_fars b/testing/fuchsia/test_fars index b163073a8370a9d5b5e357d34e9e13b62cbe6415..53eb49192ae9ef92f2498646835b23d271f995f4 100644 --- a/testing/fuchsia/test_fars +++ b/testing/fuchsia/test_fars @@ -1 +1,3 @@ flutter_runner_tests-0.far +fml_tests-0.far +flow_tests-0.far \ No newline at end of file