| # Copyright 2020 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/component/config.gni") |
| import("//build/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":package" ] |
| } |
| |
| rustc_binary("trigger_bin") { |
| output_name = "namespace_capabilities_trigger" |
| edition = "2018" |
| source_root = "trigger.rs" |
| deps = [ |
| "//examples/components/routing/fidl:echo-rustc", |
| "//garnet/lib/rust/io_util", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/sys/component_manager/tests/fidl:components-rustc", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ "trigger.rs" ] |
| } |
| |
| fuchsia_component("trigger") { |
| testonly = true |
| deps = [ ":trigger_bin" ] |
| manifest = "meta/trigger.cml" |
| } |
| |
| rustc_test("integration_test_bin") { |
| output_name = "namespace_capabilities_integration_test" |
| edition = "2018" |
| source_root = "integration_test.rs" |
| deps = [ |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/sys/lib/component-events", |
| ] |
| |
| sources = [ "integration_test.rs" ] |
| } |
| |
| rustc_binary("integration_test_root_bin") { |
| testonly = true |
| output_name = "namespace_capabilities_integration_test_root" |
| edition = "2018" |
| source_root = "integration_test_root.rs" |
| deps = [ |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/sys/component_manager/tests/fidl:components-rustc", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ "integration_test_root.rs" ] |
| } |
| |
| component_config("config") { |
| sources = [ "namespace_config.json5" ] |
| dest = "data/component_manager_config" |
| } |
| |
| resource("testdata") { |
| sources = [ "testdata.txt" ] |
| outputs = [ "data/testdata" ] |
| } |
| |
| fuchsia_component("component-manager") { |
| testonly = true |
| deps = [ |
| ":config", |
| "//src/sys/component_manager:bin", |
| ] |
| manifest = "meta/component_manager.cml" |
| } |
| |
| fuchsia_component("integration-test-root") { |
| testonly = true |
| deps = [ ":integration_test_root_bin" ] |
| manifest = "meta/integration_test_root.cml" |
| } |
| |
| fuchsia_component("integration-test") { |
| testonly = true |
| deps = [ ":integration_test_bin" ] |
| manifest = "meta/integration_test.cml" |
| } |
| |
| fuchsia_test_package("package") { |
| package_name = "namespace-capabilities-integration-test" |
| test_components = [ ":integration-test" ] |
| deps = [ |
| ":component-manager", |
| ":integration-test-root", |
| ":testdata", |
| ":trigger", |
| "//src/sys/component_manager/testing/echo_server", |
| ] |
| } |