Fix message_loop_fuchsia and thus enable fml_tests and flow_tests for Fuchsia (flutter/engine#14583)
This commit is contained in:
@@ -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",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
flutter_runner_tests-0.far
|
||||
fml_tests-0.far
|
||||
flow_tests-0.far
|
||||
Reference in New Issue
Block a user