| # Copyright 2025 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_library.gni") |
| |
| group("test_common") { |
| testonly = true |
| deps = [ ":settings_test_common" ] |
| } |
| |
| rustc_library("settings_test_common") { |
| testonly = true |
| name = "settings_test_common" |
| with_unit_tests = true |
| edition = "2021" |
| |
| visibility = [ |
| ":*", |
| "//src/settings/common:*", |
| "//src/settings/light:*", |
| "//src/settings/service:*", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem_rust", |
| "//sdk/fidl/fuchsia.stash:fuchsia.stash_rust", |
| "//sdk/rust/zx", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-fs", |
| "//src/settings/common:settings_common", |
| "//src/settings/storage:settings_storage", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:serde", |
| ] |
| |
| sources = [ |
| "src/fakes.rs", |
| "src/fakes/service.rs", |
| "src/helpers.rs", |
| "src/lib.rs", |
| "src/storage.rs", |
| ] |
| |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_unittest_package("settings_test_common_tests") { |
| component_name = "settings_test_common_test" |
| manifest = "meta/settings_test_common_tests.cml" |
| deps = [ ":settings_test_common_test" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":settings_test_common_tests" ] |
| } |