| # 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("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/test/test_package.gni") |
| |
| rustc_library("echo_interposer") { |
| name = "echo_interposer" |
| edition = "2018" |
| source_root = "echo_interposer.rs" |
| deps = [ |
| "//examples/components/routing/fidl:echo-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/sys/component_manager/tests:test_utils_lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "echo_interposer.rs" ] |
| } |
| |
| rustc_library("echo_factory_interposer") { |
| name = "echo_factory_interposer" |
| edition = "2018" |
| source_root = "echo_factory_interposer.rs" |
| deps = [ |
| ":echo_interposer", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/sys/component_manager/tests:test_utils_lib", |
| "//src/sys/component_manager/tests/fidl:echofactory-rustc", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "echo_factory_interposer.rs" ] |
| } |
| |
| rustc_test("events_integration_test_bin") { |
| name = "events_integration_test" |
| edition = "2018" |
| source_root = "integration_test.rs" |
| deps = [ |
| ":echo_factory_interposer", |
| ":echo_interposer", |
| "//examples/components/routing/fidl:echo-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/component_manager/tests:test_utils_lib", |
| "//src/sys/component_manager/tests/fidl:components-rustc", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| # TODO(56138): Fix the leaks and remove this. |
| deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| |
| sources = [ "integration_test.rs" ] |
| } |
| |
| test_package("events_integration_test") { |
| deps = [ |
| ":events_integration_test_bin", |
| "components:async_reporter_bin", |
| "components:capability_ready_child_bin", |
| "components:capability_ready_root_bin", |
| "components:chained_interpose_echo_client_bin", |
| "components:chained_interpose_echo_factory_bin", |
| "components:echo_client_for_events_bin", |
| "components:echo_reporter_bin", |
| "components:echo_server_for_events_bin", |
| "components:interpose_echo_looper_bin", |
| "components:nested_reporter_bin", |
| "components:realm_offered_bin", |
| "components:realm_offered_nested", |
| "components:resolved_error_reporter_bin", |
| "components:stub_component_bin", |
| "components:synthesis_reporter_bin", |
| "components:trigger_client_bin", |
| "components:trigger_server_bin", |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("components/async/meta/reporter.cml") |
| dest = "async_reporter.cm" |
| }, |
| { |
| path = rebase_path("components/interpose/meta/echo_looper.cml") |
| dest = "interpose_echo_looper.cm" |
| }, |
| { |
| path = rebase_path("components/interpose/meta/echo_realm.cml") |
| dest = "interpose_echo_realm.cm" |
| }, |
| { |
| path = rebase_path("components/nested/meta/reporter.cml") |
| dest = "nested_reporter.cm" |
| }, |
| { |
| path = rebase_path("components/resolved_error/meta/reporter.cml") |
| dest = "resolved_error_reporter.cm" |
| }, |
| { |
| path = rebase_path("components/scoped/meta/echo_realm.cml") |
| dest = "echo_realm.cm" |
| }, |
| { |
| path = rebase_path("components/scoped/meta/echo_client.cml") |
| dest = "echo_client.cm" |
| }, |
| { |
| path = rebase_path("components/scoped/meta/echo_server.cml") |
| dest = "echo_server.cm" |
| }, |
| { |
| path = rebase_path("components/scoped/meta/echo_reporter.cml") |
| dest = "echo_reporter.cm" |
| }, |
| { |
| path = rebase_path("components/chained_interpose/meta/echo_realm.cml") |
| dest = "chained_interpose_echo_realm.cm" |
| }, |
| { |
| path = rebase_path("components/chained_interpose/meta/echo_client.cml") |
| dest = "chained_interpose_echo_client.cm" |
| }, |
| { |
| path = rebase_path("components/chained_interpose/meta/echo_factory.cml") |
| dest = "chained_interpose_echo_factory.cm" |
| }, |
| { |
| path = rebase_path("components/event_dispatch_order/meta/root.cml") |
| dest = "event_dispatch_order_root.cm" |
| }, |
| { |
| path = rebase_path("components/realm_offered/meta/root.cml") |
| dest = "realm_offered_root.cm" |
| }, |
| { |
| path = rebase_path("components/realm_offered/meta/nested.cml") |
| dest = "realm_offered_nested.cm" |
| }, |
| { |
| path = rebase_path("components/realm_offered/meta/reporter.cml") |
| dest = "realm_offered_reporter.cm" |
| }, |
| { |
| path = rebase_path("components/stub/meta/component.cml") |
| dest = "stub_component.cm" |
| }, |
| { |
| path = rebase_path("components/capability_ready/meta/root.cml") |
| dest = "capability_ready_root.cm" |
| }, |
| { |
| path = rebase_path("components/capability_ready/meta/child.cml") |
| dest = "capability_ready_child.cm" |
| }, |
| { |
| path = rebase_path("components/synthesis/meta/reporter.cml") |
| dest = "synthesis_reporter.cm" |
| }, |
| { |
| path = |
| rebase_path("components/static_event_stream/meta/trigger_client.cml") |
| dest = "static_event_stream_trigger_client.cm" |
| }, |
| { |
| path = |
| rebase_path("components/static_event_stream/meta/trigger_realm.cml") |
| dest = "trigger_realm.cm" |
| }, |
| { |
| path = |
| rebase_path("components/static_event_stream/meta/trigger_server.cml") |
| dest = "static_event_stream_trigger_server.cm" |
| }, |
| ] |
| |
| binaries = [ |
| { |
| name = "async_reporter" |
| }, |
| { |
| name = "interpose_echo_looper" |
| }, |
| { |
| name = "chained_interpose_echo_client" |
| }, |
| { |
| name = "chained_interpose_echo_client" |
| }, |
| { |
| name = "chained_interpose_echo_factory" |
| }, |
| { |
| name = "scoped_echo_server" |
| }, |
| { |
| name = "nested_reporter" |
| }, |
| { |
| name = "resolved_error_reporter" |
| }, |
| { |
| name = "scoped_echo_client" |
| }, |
| { |
| name = "scoped_echo_reporter" |
| }, |
| { |
| name = "realm_offered_reporter" |
| }, |
| { |
| name = "realm_offered_nested" |
| }, |
| { |
| name = "stub_component" |
| }, |
| { |
| name = "capability_ready_root" |
| }, |
| { |
| name = "capability_ready_child" |
| }, |
| { |
| name = "synthesis_reporter" |
| }, |
| { |
| name = "static_event_stream_trigger_client" |
| }, |
| { |
| name = "static_event_stream_trigger_server" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "events_integration_test" |
| }, |
| ] |
| } |