| # 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/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_binary("stub_inspect_component_bin") { |
| output_name = "stub_inspect_component" |
| edition = "2018" |
| source_root = "components/stub_inspect_component.rs" |
| deps = [ |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "components/stub_inspect_component.rs" ] |
| } |
| |
| fuchsia_component("stub_inspect_component") { |
| deps = [ ":stub_inspect_component_bin" ] |
| manifest = "meta/stub_inspect_component.cml" |
| } |
| |
| fuchsia_component("component_with_children") { |
| deps = [ ":stub_inspect_component_bin" ] |
| manifest = "meta/component_with_children.cml" |
| } |
| |
| rustc_test("integration_tests_bin") { |
| output_name = "archivist_integration_tests" |
| edition = "2018" |
| deps = [ |
| "//src/lib/diagnostics/data/rust", |
| "//src/lib/diagnostics/hierarchy/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/diagnostics/testing/rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component-test", |
| "//src/lib/syslog/rust:syslog", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| fuchsia_component("driver") { |
| testonly = true |
| deps = [ ":integration_tests_bin" ] |
| manifest = "meta/driver.cml" |
| } |
| |
| fuchsia_component("archivist_for_integration") { |
| component_name = "archivist" |
| testonly = true |
| deps = [ "//src/diagnostics/archivist:bin" ] |
| manifest = "meta/archivist_for_integration.cml" |
| } |
| |
| fuchsia_component("archivist_integration_tests") { |
| testonly = true |
| deps = [ ":integration_tests_bin" ] |
| manifest = "meta/archivist_integration_tests.cml" |
| } |
| |
| resource("testdata") { |
| sources = [ "configs/archivist_config.json" ] |
| outputs = [ "data/config/archivist_config.json" ] |
| } |
| |
| fuchsia_test_package("archivist-integration-tests-v2") { |
| test_components = [ ":archivist_integration_tests" ] |
| deps = [ |
| ":archivist_for_integration", |
| ":component_with_children", |
| ":driver", |
| ":stub_inspect_component", |
| ":testdata", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":archivist-integration-tests-v2" ] |
| } |