| # Copyright 2022 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") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":tpm-tool-tests" ] |
| } |
| |
| rustc_binary("bin") { |
| name = "tpm_tool" |
| with_unit_tests = true |
| edition = "2021" |
| deps = [ |
| "//build/validate:non_production_tag", |
| "//src/security/lib/tpm:tpm-device", |
| "//third_party/rust_crates:anyhow", |
| ] |
| test_deps = [ "//src/lib/fuchsia" ] |
| sources = [ "src/main.rs" ] |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| } |
| |
| fuchsia_component("component") { |
| deps = [ ":bin" ] |
| component_name = "tpm-tool" |
| manifest = "meta/tpm-tool.cml" |
| } |
| |
| fuchsia_package("tpm_tool") { |
| deps = [ ":component" ] |
| } |
| |
| fuchsia_unittest_package("tpm-tool-tests") { |
| deps = [ ":bin_test" ] |
| } |