| # 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/rust/rustc_binary.gni") | |
| import("//src/sys/build/components.gni") | |
| import("//src/sys/component_index/component_index.gni") | |
| rustc_binary("locate_bin") { | |
| name = "locate" | |
| 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", | |
| ] | |
| sources = [ "src/main.rs" ] | |
| } | |
| fuchsia_shell_package("locate") { | |
| deps = [ ":locate_bin" ] | |
| manifest = "meta/locate.cmx" | |
| } | |
| rustc_binary("locate_integration_test_bin") { | |
| name = "locate_integration_test" | |
| edition = "2018" | |
| source_root = "src/locate_integration_test.rs" | |
| deps = [ | |
| "//sdk/fidl/fuchsia.data:fuchsia.data-rustc", | |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", | |
| "//src/lib/fdio/rust:fdio", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//src/lib/fuchsia-runtime", | |
| "//src/lib/zircon/rust:fuchsia-zircon", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| sources = [ "src/locate_integration_test.rs" ] | |
| } | |
| add_to_component_index("component_index") { | |
| package_name = "locate_integration_test" | |
| manifest = "meta/locate_integration_test.cmx" | |
| } | |
| fuchsia_unittest_package("locate_integration_test") { | |
| manifest = "meta/locate_integration_test.cmx" | |
| deps = [ | |
| ":component_index", | |
| ":locate_integration_test_bin", | |
| ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":locate_integration_test" ] | |
| } |