mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
- Copies fuchsia_test.sh into the testing/fuchsia directory - Fixes a small issue with fuchsia_archive to ensure the cmx file is correctly named according to the target - Add a list of fuchsia unittest fars to run on CI - Add a GN build target to build all currently-enabled unittests for Fuchsia
139 lines
3.6 KiB
Plaintext
139 lines
3.6 KiB
Plaintext
# Copyright 2013 The Flutter Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("$flutter_root/common/config.gni")
|
|
|
|
if (is_fuchsia) {
|
|
import("//build/fuchsia/sdk.gni")
|
|
}
|
|
|
|
# Whether to build the dartdevc sdk, libraries, and source files
|
|
# required for the flutter web sdk.
|
|
declare_args() {
|
|
full_dart_sdk = false
|
|
}
|
|
|
|
group("flutter") {
|
|
testonly = true
|
|
|
|
public_deps = []
|
|
|
|
if (!(is_fuchsia && using_fuchsia_sdk)) {
|
|
public_deps += [
|
|
"$flutter_root/lib/snapshot:generate_snapshot_bin",
|
|
"$flutter_root/lib/snapshot:kernel_platform_files",
|
|
]
|
|
}
|
|
|
|
public_deps += [
|
|
"$flutter_root/shell/platform/embedder:flutter_engine",
|
|
"$flutter_root/sky",
|
|
]
|
|
|
|
if (current_toolchain == host_toolchain) {
|
|
public_deps += [ "$flutter_root/shell/testing" ]
|
|
}
|
|
|
|
if (is_fuchsia && using_fuchsia_sdk) {
|
|
public_deps += [
|
|
"$flutter_root/shell/platform/fuchsia",
|
|
"$flutter_root/shell/testing($host_toolchain)",
|
|
]
|
|
}
|
|
|
|
if (!is_fuchsia && !is_fuchsia_host) {
|
|
if (current_toolchain == host_toolchain) {
|
|
public_deps += [
|
|
"$flutter_root/flutter_frontend_server:frontend_server",
|
|
"//third_party/dart:create_sdk",
|
|
]
|
|
|
|
if (full_dart_sdk) {
|
|
public_deps += [ "$flutter_root/web_sdk" ]
|
|
}
|
|
}
|
|
}
|
|
|
|
# If on the host, compile all unittests targets.
|
|
if (current_toolchain == host_toolchain) {
|
|
if (is_mac) {
|
|
public_deps += [
|
|
"$flutter_root/shell/platform/darwin:flutter_channels_unittests",
|
|
"$flutter_root/shell/platform/darwin/macos:flutter_desktop_darwin_unittests",
|
|
]
|
|
}
|
|
|
|
public_deps += [
|
|
"$flutter_root/flow:flow_unittests",
|
|
"$flutter_root/fml:fml_unittests",
|
|
"$flutter_root/lib/ui:ui_unittests",
|
|
"$flutter_root/runtime:runtime_unittests",
|
|
"$flutter_root/shell/common:shell_unittests",
|
|
"$flutter_root/shell/platform/common/cpp/client_wrapper:client_wrapper_unittests",
|
|
"$flutter_root/shell/platform/embedder:embedder_unittests",
|
|
"$flutter_root/shell/platform/glfw/client_wrapper:client_wrapper_glfw_unittests",
|
|
"$flutter_root/testing:testing_unittests",
|
|
"$flutter_root/third_party/txt:txt_unittests",
|
|
]
|
|
|
|
if (is_win) {
|
|
public_deps += [
|
|
"$flutter_root/shell/platform/windows:flutter_windows_unittests",
|
|
"$flutter_root/shell/platform/windows/client_wrapper:client_wrapper_windows_unittests",
|
|
]
|
|
}
|
|
|
|
if (!is_win) {
|
|
public_deps += [
|
|
"$flutter_root/fml:fml_benchmarks",
|
|
"$flutter_root/shell/common:shell_benchmarks",
|
|
"$flutter_root/third_party/txt:txt_benchmarks",
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
config("config") {
|
|
include_dirs = [ ".." ]
|
|
if (is_win) {
|
|
if (current_cpu != "x86") {
|
|
cflags = [ "/WX" ] # Treat warnings as errors.
|
|
}
|
|
}
|
|
}
|
|
|
|
config("export_dynamic_symbols") {
|
|
if (is_linux) {
|
|
inputs = [
|
|
"$flutter_root/common/exported_symbols.sym",
|
|
]
|
|
ldflags = [ "-Wl,--dynamic-list=" + rebase_path(inputs[0], root_build_dir) ]
|
|
}
|
|
}
|
|
|
|
group("dist") {
|
|
testonly = true
|
|
|
|
deps = [
|
|
"$flutter_root/sky/dist",
|
|
]
|
|
}
|
|
|
|
# Fuchsia currently only supports a subset of our unit tests
|
|
# When adding a new dep here, please also ensure the dep is added to
|
|
# testing/fuchsia/run_tests.sh and testing/fuchsia/test_fars
|
|
if (is_fuchsia) {
|
|
group("fuchsia_tests") {
|
|
testonly = true
|
|
|
|
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/shell/platform/fuchsia/flutter:flutter_runner_tests",
|
|
]
|
|
}
|
|
}
|