From 051762798888ebea4666c5f9c9f4c0e4d3b3b481 Mon Sep 17 00:00:00 2001 From: George Wright Date: Thu, 6 Feb 2020 11:19:47 -0800 Subject: [PATCH] Enable runtime_unittests on Fuchsia --- BUILD.gn | 1 + runtime/BUILD.gn | 26 ++++++++++++++++++++++++++ testing/fuchsia/run_tests.sh | 3 +++ testing/fuchsia/test_fars | 1 + 4 files changed, 31 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 349d32354073d..d4bf45f18d962 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -135,6 +135,7 @@ if (is_fuchsia) { deps = [ "//flutter/flow:flow_tests", "//flutter/fml:fml_tests", + "//flutter/runtime:runtime_tests", "//flutter/shell/platform/fuchsia/flutter:flutter_runner_scenic_tests", "//flutter/shell/platform/fuchsia/flutter:flutter_runner_tests", ] diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 87196401a57b4..a61d36256698b 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -5,6 +5,11 @@ import("//flutter/common/config.gni") import("//flutter/testing/testing.gni") +if (is_fuchsia) { + import("//build/fuchsia/sdk.gni") + import("//flutter/tools/fuchsia/fuchsia_archive.gni") +} + source_set("test_font") { sources = [ "test_font_data.cc", @@ -168,3 +173,24 @@ executable("runtime_unittests") { ":runtime_unittests_common", ] } + +if (is_fuchsia) { + fuchsia_test_archive("runtime_tests") { + deps = [ + ":runtime_fixtures", + ":runtime_unittests", + ] + + binary = "runtime_unittests" + + # TODO(gw280): https://github.com/flutter/flutter/issues/50294 + # Right now we need to manually specify all the fixtures that are + # declared in the test_fixtures() call above. + resources = [ + { + path = "$target_gen_dir/assets/kernel_blob.bin" + dest = "assets/kernel_blob.bin" + }, + ] + } +} diff --git a/testing/fuchsia/run_tests.sh b/testing/fuchsia/run_tests.sh index 898f76aef3f75..176d3a7b798c7 100755 --- a/testing/fuchsia/run_tests.sh +++ b/testing/fuchsia/run_tests.sh @@ -60,3 +60,6 @@ done -f flow_tests-0.far \ -t flow_tests +./fuchsia_ctl -d $device_name test \ + -f runtime_tests-0.far \ + -t runtime_tests diff --git a/testing/fuchsia/test_fars b/testing/fuchsia/test_fars index 2414763c7edbe..1360800ae0241 100644 --- a/testing/fuchsia/test_fars +++ b/testing/fuchsia/test_fars @@ -2,3 +2,4 @@ flutter_runner_tests-0.far flutter_runner_scenic_tests-0.far fml_tests-0.far flow_tests-0.far +runtime_tests-0.far