blob: 310a826fb55e62847744085e8c427f0d40bcd13c [file] [log] [blame]
# Copyright 2019 The Fuchsia 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("//build/host.gni")
import("//build/sdk/sdk_host_tool.gni")
import("//build/testing/host_test.gni")
import("./build/ffx.gni")
group("ffx") {
testonly = true
public_deps = [
":ffx_tool",
":tests",
]
}
if (is_host) {
ffx("ffx") {
version = "0.1.0"
edition = "2018"
with_unit_tests = true
plugin_deps = [
"//src/developer/ffx/plugins/component:ffx_component",
"//src/developer/ffx/plugins/config:ffx_config_plugin",
"//src/developer/ffx/plugins/daemon:ffx_daemon_plugin",
"//src/developer/ffx/plugins/doctor:ffx_doctor",
"//src/developer/ffx/plugins/overnet:ffx_overnet_plugin",
"//src/developer/ffx/plugins/packaging:ffx_packaging",
"//src/developer/ffx/plugins/self-test:ffx_selftest",
"//src/developer/ffx/plugins/target:ffx_target",
"//src/developer/ffx/plugins/version:ffx_version",
"//src/developer/ffx/plugins/zxdb:ffx_zxdb_plugin",
]
sources = [
"src/args.rs",
"src/lib.rs",
"src/main.rs",
]
}
sdk_host_tool("bin_sdk") {
# TODO(fxbug.dev/57313): partner only at this time while we shake
# out alpha bugs and fill-in docs, etc.
category = "partner"
output_name = "ffx"
deps = [ ":ffx_bin" ]
}
host_test("ffx-e2e-without-target") {
binary_path = "$root_out_dir/ffx"
args = [
"self-test",
"--include-target",
"false",
]
deps = [ ":ffx_bin" ]
# TODO(fxbug.dev/60684): re-enable on MacOS once deadlock is resolved.
environments = [ linux_env ]
}
host_test("ffx-e2e-with-target") {
binary_path = "$root_out_dir/ffx"
args = [ "self-test" ]
deps = [ ":ffx_bin" ]
# TODO(fxbug.dev/60683): split additional dimensions such as multi-device
# mac + device, etc.
#
# TODO(fxbug.dev/60740): Further diagnose flake conditions in nuc_env
environments = [
# nuc_env
]
}
}
install_host_tools("host") {
deps = [ ":ffx_bin" ]
outputs = [ "ffx" ]
}
group("ffx_tool") {
deps = [
":ffx_bin($host_toolchain)",
":host",
]
}
group("runtime") {
deps = [
# The tool
":host",
# Target-side dependencies
"//src/developer/remote-control:runtime",
]
}
group("tests") {
testonly = true
deps = [
":ffx-e2e-with-target($host_toolchain)",
":ffx-e2e-without-target($host_toolchain)",
":ffx_tests($host_toolchain)",
]
}