| # 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/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_test("integration_test_bin") { |
| name = "component_hub_integration_test" |
| edition = "2021" |
| deps = [ |
| "//examples/components/routing/fidl:echo-rustc", |
| "//src/lib/component_hub", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/sys/lib/moniker", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:regex" ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| fuchsia_component("test") { |
| testonly = true |
| manifest = "meta/test.cml" |
| deps = [ ":integration_test_bin" ] |
| } |
| |
| rustc_binary("foo_noop") { |
| edition = "2021" |
| sources = [ "src/foo.rs" ] |
| source_root = "src/foo.rs" |
| } |
| |
| fuchsia_component_manifest("foo_manifest") { |
| testonly = true |
| component_name = "foo" |
| manifest = "meta/foo.cml" |
| } |
| |
| fuchsia_component("foo") { |
| testonly = true |
| cm_label = ":foo_manifest" |
| deps = [ ":foo_noop" ] |
| } |
| |
| fuchsia_structured_config_values("foo_config_values") { |
| testonly = true |
| cm_label = ":foo_manifest" |
| values_source = "config/config_values.json5" |
| } |
| |
| fuchsia_test_package("component_hub_integration_tests") { |
| test_components = [ ":test" ] |
| deps = [ |
| ":foo", |
| ":foo_config_values", |
| "//src/sys/component_manager/testing/echo_server", |
| ] |
| } |