| # Copyright 2023 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("//src/diagnostics/archivist/configs.gni") |
| |
| rustc_binary("bin") { |
| testonly = true |
| edition = "2021" |
| name = "archivist_realm_factory" |
| sources = [ |
| "src/main.rs", |
| "src/realm_factory.rs", |
| ] |
| deps = [ |
| "fidl:fuchsia.archivist.test_rust", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_rust", |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect_rust", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_rust", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//src/sys/lib/cm_rust", |
| "//src/testing/realm_proxy", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| } |
| |
| fuchsia_component("archivist_realm_factory_component") { |
| testonly = true |
| component_name = "realm_factory" |
| manifest = "meta/realm_factory.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_component_manifest("archivist_manifest") { |
| testonly = true |
| component_name = "archivist" |
| manifest = "meta/archivist.cml" |
| } |
| |
| fuchsia_component("archivist_component") { |
| testonly = true |
| deps = [ "//src/diagnostics/archivist:bin" ] |
| component_name = "archivist" |
| cm_label = ":archivist_manifest" |
| } |
| |
| fuchsia_structured_config_values("archivist_config") { |
| testonly = true |
| cm_label = ":archivist_manifest" |
| values = embedded_config |
| } |
| |
| fuchsia_package("pkg") { |
| package_name = "archivist_realm_factory" |
| testonly = true |
| deps = [ |
| ":archivist_component", |
| ":archivist_config", |
| ":archivist_realm_factory_component", |
| ":do_not_filter_feedback", |
| ":filter_feedback", |
| ":filter_lowpan", |
| ] |
| subpackages = [ |
| # The puppet is subpackaged instead of included locally because the inspect |
| # data for a package-local child component contains an unstable |
| # `metadata.component_url` property that gets overwritten by realm builder, |
| # whereas the inspect data for a subpackaged component uses a stable, |
| # relative URL for this property. |
| "puppet", |
| ] |
| } |
| |
| resource("filter_feedback") { |
| sources = [ "configs/pipelines/static_selectors.cfg" ] |
| outputs = [ |
| "data/config/pipelines/feedback_filtered/feedback/static_selectors.cfg", |
| ] |
| } |
| |
| resource("do_not_filter_feedback") { |
| sources = [ "configs/pipelines/DISABLE_FILTERING.txt" ] |
| outputs = [ "data/config/pipelines/feedback_filtering_disabled/feedback/DISABLE_FILTERING.txt" ] |
| } |
| |
| resource("filter_lowpan") { |
| sources = [ "configs/pipelines/static_selectors.cfg" ] |
| outputs = |
| [ "data/config/pipelines/lowpan_filtered/lowpan/static_selectors.cfg" ] |
| } |