blob: a59d682b322bb677ff32a2003305f0c9add0eb23 [file] [log] [blame] [edit]
# Copyright 2021 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")
rustc_binary("bin") {
name = "credential_manager"
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/lib/rust/files_async",
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.identity.credential:fuchsia.identity.credential-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.tpm.cr50:fuchsia.tpm.cr50-rustc",
"//src/identity/lib/identity_common",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:paste",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_cbor",
"//third_party/rust_crates:sha2",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:mockall",
"//third_party/rust_crates:tempfile",
]
sources = [
"src/credential_manager.rs",
"src/diagnostics/fake.rs",
"src/diagnostics/inspect.rs",
"src/diagnostics/mod.rs",
"src/hash_tree.rs",
"src/label_generator.rs",
"src/lookup_table.rs",
"src/main.rs",
"src/pinweaver.rs",
"src/provision.rs",
]
}
fuchsia_component("component") {
component_name = "credential-manager"
manifest = "meta/credential-manager.cml"
deps = [ ":bin" ]
}
fuchsia_package("credential_manager") {
deps = [ ":component" ]
}
fuchsia_unittest_package("credential-manager-tests") {
manifest = "meta/credential-manager-test.cml"
deps = [
":bin_test",
"//src/sys/test_runners:tmp_storage",
]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
public_deps = [ ":credential-manager-tests" ]
}