| # 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/components.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/security.gni") |
| |
| rustc_binary("component_index_bin") { |
| name = "component_index" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/component_index/fidl:index-rustc", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:matches" ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_package_with_single_component("component_index") { |
| testonly = fuchsia_zbi_testonly |
| manifest = "meta/component_index.cmx" |
| deps = [ |
| ":component_index_bin", |
| "//build/images:component_index_txt", |
| ] |
| } |
| |
| fuchsia_unittest_package("component_index_tests") { |
| deps = [ ":component_index_bin_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":component_index_tests" ] |
| } |