blob: 3c89439bafbb92f64cfa16cc7bd7259c4c0fb448 [file]
# Copyright 2021 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")
if (is_host) {
bazel_ffx_tool("ffx_session_tool") {
output_name = "ffx-session"
sdk_category = "partner"
}
group("session") {
public_deps = [
":ffx_session_tool",
":ffx_session_tool_host_tool",
]
}
group("bin") {
public_deps = [ ":ffx_session_tool_versioned" ]
}
# Needed for Honeydew's SDK inclusion
#
# TODO(b/330934833): Remove when IDK allows for `testonly` targets in dep
# tree or when we can separate the concept of data_dep from host_test_data.
host_test_data("ffx_session_tool_test_data") {
testonly = false
visibility = [ "//src/testing/end_to_end/honeydew:*" ]
data_deps = [ ":ffx_session_tool_host_tool" ]
sources = [
"${host_tools_dir}/ffx-session",
"${host_tools_dir}/ffx-session.json",
]
}
# TODO(https://fxbug.dev/438572714): Remove once the IDK uses the Bazel atom.
_idk_path = "tools/$current_cpu/ffx_tools/ffx-session"
sdk_atom("sdk") {
category = "partner"
sdk_area = "Developer"
id = "sdk://$_idk_path"
idk_name = "ffx-session"
meta = {
dest = "$_idk_path-meta.json"
type = "ffx_tool"
source_prebuild_info = {
arch = current_cpu
file_base = "tools"
}
}
files = [
{
source = "$root_out_dir/ffx-session"
dest = _idk_path
},
{
source = "$root_out_dir/ffx-session.json"
dest = "$_idk_path.json"
},
]
non_sdk_deps = [ ":ffx_session_tool_versioned" ]
}
}