blob: a495e38a4c335a17175e21079ff2d636b25293cb [file]
# Copyright 2022 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/sdk/sdk_atom.gni")
import("//build/testing/host_test_data.gni")
import("//src/developer/ffx/build/ffx_tool.gni")
assert(is_host, "bazel_ffx_tool() can only be called in a host toolchain.")
group("coverage") {
public_deps = [
":ffx_coverage_tool",
":ffx_coverage_tool_host_tool",
]
}
group("bin") {
public_deps = [ ":ffx_coverage_tool_versioned" ]
}
bazel_ffx_tool("ffx_coverage_tool") {
output_name = "ffx-coverage"
sdk_category = "partner"
}
host_test_data("ffx_coverage_tool_test_data") {
visibility = [ "//src/tests/coverage:*" ]
data_deps = [ ":ffx_coverage_tool_host_tool" ]
sources = [
"${host_tools_dir}/ffx-coverage",
"${host_tools_dir}/ffx-coverage.json",
]
}
# TODO(https://fxbug.dev/438572714): Remove once the IDK uses the Bazel atom.
_idk_path = "tools/$current_cpu/ffx_tools/ffx-coverage"
sdk_atom("sdk") {
category = "partner"
sdk_area = "Developer"
id = "sdk://$_idk_path"
idk_name = "ffx-coverage"
meta = {
dest = "$_idk_path-meta.json"
type = "ffx_tool"
source_prebuild_info = {
arch = current_cpu
file_base = "tools"
}
}
files = [
{
source = "$root_out_dir/ffx-coverage"
dest = _idk_path
},
{
source = "$root_out_dir/ffx-coverage.json"
dest = "$_idk_path.json"
},
]
non_sdk_deps = [ ":ffx_coverage_tool_versioned" ]
}