| # 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") |
| |
| rustc_test("test-bin") { |
| edition = "2021" |
| source_root = "integration-test.rs" |
| name = "attributed-logging-test" |
| deps = [ |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component-test", |
| "//src/sys/lib/component-events", |
| "//third_party/rust_crates:futures", |
| ] |
| sources = [ "integration-test.rs" ] |
| } |
| |
| fuchsia_component("integration-test") { |
| testonly = true |
| manifest = "meta/integration-test.cml" |
| deps = [ ":test-bin" ] |
| } |
| |
| rustc_test("e2e-bin") { |
| edition = "2021" |
| source_root = "e2e-test.rs" |
| name = "attributed-logging-e2e-test" |
| deps = [ |
| "//src/lib/fuchsia-async", |
| "//src/sys/component_manager/testing:test_utils_lib", |
| "//src/sys/lib/component-events", |
| "//third_party/rust_crates:futures", |
| ] |
| sources = [ "e2e-test.rs" ] |
| } |
| |
| fuchsia_component("e2e-test") { |
| testonly = true |
| manifest = "meta/e2e-test.cmx" |
| deps = [ ":e2e-bin" ] |
| } |
| |
| fuchsia_component("e2e-root-component") { |
| testonly = true |
| manifest = "meta/e2e-root.cml" |
| component_name = "e2e-root" |
| } |
| |
| component_config("component-manager-debug-config") { |
| sources = [ "//src/sys/component_manager/configs/debug_config.json5" ] |
| } |
| |
| resource("cm-config") { |
| sources = [ "$target_gen_dir/component-manager-debug-config" ] |
| outputs = [ "data/cm_config" ] |
| deps = [ ":component-manager-debug-config" ] |
| } |
| |
| fuchsia_component("component-manager") { |
| deps = [ |
| ":cm-config", |
| "//src/sys/component_manager:bin", |
| ] |
| manifest = |
| rebase_path("//src/sys/component_manager/meta/component_manager.cmx") |
| } |
| |
| fuchsia_test_package("attributed-logging-test") { |
| test_components = [ |
| ":integration-test", |
| ":e2e-test", |
| ] |
| deps = [ |
| ":component-manager", |
| ":e2e-root-component", |
| "components:all-components", |
| "//src/diagnostics/archivist:archivist-for-embedding-v2", |
| "//src/sys/component_manager:component-manager-realm-builder-debug-cmp", |
| ] |
| } |