blob: 3117364eee92d981a254cb80c1984caaf772863d [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/fidl/fidl.gni")
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
package("component_index") {
testonly = true
deps = [
":component_index_bin",
"//build/images:component_index_metadata",
]
binaries = [
{
name = "component_index"
},
]
meta = [
{
path = rebase_path("meta/component_index.cmx")
dest = "component_index.cmx"
},
]
resources = [
{
path = get_label_info("//build/images:component_index_metadata",
"target_out_dir") + "/component_index_metadata"
dest = "component_index.txt"
},
]
}
rustc_binary("component_index_bin") {
name = "component_index"
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/public/lib/fidl/rust/fidl",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-runtime",
"//garnet/public/rust/fuchsia-zircon",
"//src/sys/component_index/fidl:index-rustc",
"//third_party/rust_crates:failure",
"//third_party/rust_crates:futures-preview",
]
}
test_package("component_index_tests") {
deps = [
":component_index_bin_test",
]
tests = [
{
name = "component_index_bin_test"
dest = "component_index_tests"
environments = basic_envs
},
]
}