| # 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_library.gni") |
| |
| rustc_library("ddk-log-lib") { |
| edition = "2021" |
| with_unit_tests = true |
| testonly = true |
| |
| deps = [ |
| "//sdk/lib/device-watcher/rust", |
| "//src/diagnostics/validator/logs/sink/fidl:sink-puppet_rust", |
| "//src/lib/diagnostics/log/encoding/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component-test", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_rust", |
| "//sdk/lib/driver_test_realm/realm_builder/rust", |
| "//src/lib/fuchsia", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_unittest_package("ddk-log-tests-package") { |
| manifest = "meta/ddk-log-test.cml" |
| |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| ":ddk-log-lib_test", |
| "//src/devices/misc/drivers/test-parent", |
| "//src/diagnostics/validator/logs/ddk/log-test-driver", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ddk-log-tests-package" ] |
| } |