| # 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/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//src/sys/build/components.gni") |
| |
| group("component_events") { |
| testonly = true |
| deps = [ ":component_events_integration_tests" ] |
| } |
| |
| fuchsia_component("test_component") { |
| testonly = true |
| deps = [ ":test_component_bin" ] |
| manifest = "meta/test_component.cmx" |
| } |
| |
| fuchsia_component("test_component_with_subrealm") { |
| testonly = true |
| deps = [ ":test_component_with_subrealm_bin" ] |
| manifest = "meta/test_component_with_subrealm.cmx" |
| } |
| |
| fuchsia_component("component_events_integration_test") { |
| testonly = true |
| deps = [ ":component_events_test_bin" ] |
| manifest = "meta/component_events_integration_test.cmx" |
| } |
| |
| fuchsia_component("observer_integration_test") { |
| testonly = true |
| deps = [ ":observer_integration_test_bin" ] |
| manifest = "meta/observer_integration_test.cmx" |
| } |
| |
| fuchsia_test_package("component_events_integration_tests") { |
| test_components = [ |
| ":component_events_integration_test", |
| ":observer_integration_test", |
| ] |
| |
| deps = [ |
| ":test_component", |
| ":test_component_with_subrealm", |
| ] |
| |
| test_specs = { |
| } |
| } |
| |
| rustc_test("component_events_test_bin") { |
| name = "component_events_integration_test" |
| source_root = "./component_events_integration_test.rs" |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.sys.internal:fuchsia.sys.internal-rustc", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:regex", |
| ] |
| |
| sources = [ "component_events_integration_test.rs" ] |
| } |
| |
| rustc_test("observer_integration_test_bin") { |
| name = "observer_integration_test" |
| source_root = "./observer_integration_test.rs" |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.sys.internal:fuchsia.sys.internal-rustc", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| ] |
| |
| sources = [ "observer_integration_test.rs" ] |
| } |
| |
| rustc_binary("test_component_bin") { |
| name = "test_component" |
| source_root = "./test_component.rs" |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "test_component.rs" ] |
| } |
| |
| rustc_binary("test_component_with_subrealm_bin") { |
| name = "test_component_with_subrealm" |
| source_root = "./test_component_with_subrealm.rs" |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.sys.internal:fuchsia.sys.internal-rustc", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| ] |
| |
| sources = [ "test_component_with_subrealm.rs" ] |
| } |