blob: 7d17c726ee93c8f37c313a4928ee5d5cdca0c0dc [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")
group("tests") {
testonly = true
deps = [
# Plugins migrated to Bazel define standalone unit test targets that are
# not aggregated by `:ffx_package_tests`.
"archive:tests",
"archive/cat:tests",
"archive/list:tests",
]
}
if (is_host) {
# LINT.IfChange(ffx_package_tool)
bazel_ffx_tool("ffx_package_tool") {
output_name = "ffx-package"
sdk_category = "partner"
}
# LINT.ThenChange(//src/developer/ffx/plugins/package/BUILD.bazel:ffx_package_tool)
host_test_data("ffx_package_tool_test_data") {
visibility = [
"//src/sys/pkg/tests/system-tests:*",
"//src/testing/end_to_end/honeydew:*",
"//src/testing/host-target-testing/packages:*",
]
data_deps = [ ":ffx_package_tool_host_tool" ]
sources = [
"${host_tools_dir}/ffx-package",
"${host_tools_dir}/ffx-package.json",
]
}
group("package") {
public_deps = [
":ffx_package_tool",
":ffx_package_tool_host_tool",
]
}
group("bin") {
public_deps = [ ":ffx_package_tool_versioned" ]
}
# TODO(https://fxbug.dev/438572714): Remove once the IDK uses the Bazel atom.
_idk_path = "tools/$current_cpu/ffx_tools/ffx-package"
sdk_atom("sdk") {
category = "partner"
sdk_area = "Developer"
id = "sdk://$_idk_path"
idk_name = "ffx-package"
meta = {
dest = "$_idk_path-meta.json"
type = "ffx_tool"
source_prebuild_info = {
arch = current_cpu
file_base = "tools"
}
}
files = [
{
source = "$root_out_dir/ffx-package"
dest = _idk_path
},
{
source = "$root_out_dir/ffx-package.json"
dest = "$_idk_path.json"
},
]
non_sdk_deps = [ ":ffx_package_tool_versioned" ]
}
}