| # 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_library.gni") |
| import("//third_party/cobalt/metrics_registry.gni") |
| |
| rustc_library("wlan-storage") { |
| name = "wlan_storage" |
| version = "0.1.0" |
| with_unit_tests = true |
| edition = "2021" |
| |
| deps = [ |
| ":wlan-storage-constants", |
| ":wlan_metrics_registry_rustlib", |
| "//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust", |
| "//sdk/fidl/fuchsia.stash:fuchsia.stash_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia_nix", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:serde_json", |
| ] |
| test_deps = [ |
| "//src/connectivity/wlan/lib/ieee80211", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:rand", |
| ] |
| |
| sources = [ |
| "src/lib.rs", |
| "src/policy.rs", |
| "src/stash_store.rs", |
| "src/storage_store.rs", |
| ] |
| } |
| |
| rustc_library("wlan-storage-constants") { |
| name = "wlan_storage_constants" |
| version = "0.1.0" |
| edition = "2021" |
| source_root = "src/constants.rs" |
| |
| deps = [ "//third_party/rust_crates:serde" ] |
| |
| sources = [ "src/constants.rs" ] |
| } |
| |
| fuchsia_component("wlan_storage_lib_test") { |
| testonly = true |
| manifest = "meta/wlan_storage_lib_test.cml" |
| deps = [ ":wlan-storage_test" ] |
| } |
| |
| fuchsia_test_package("wlan-storage-tests") { |
| test_components = [ ":wlan_storage_lib_test" ] |
| deps = [ |
| "//src/sys/stash:stash_secure_v2", |
| "//src/sys/stash:stash_v2", |
| ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| metrics_registry("wlan_metrics_registry") { |
| # This must match the ID of our Cobalt project as specified in: |
| # third_party/cobalt_config/projects.yaml |
| project_id = 3708719327 |
| generate_rust = true |
| generate_binarypb = false |
| } |