| # 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") |
| |
| group("storage") { |
| testonly = true |
| deps = [ |
| ":package", |
| ":tests", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":unittest_package" ] |
| } |
| |
| rustc_binary("bin") { |
| name = "storage_example" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//src/lib/diagnostics/inspect/runtime/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:test-case", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "storage_example" |
| manifest = "meta/storage_example.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("package") { |
| package_name = "storage_example" |
| deps = [ ":component" ] |
| } |
| |
| fuchsia_unittest_component("unittest_component") { |
| component_name = "storage_example_unittests" |
| manifest = "meta/storage_example_unittests.cml" |
| deps = [ ":bin_test" ] |
| } |
| |
| fuchsia_test_package("unittest_package") { |
| package_name = "storage_example_unittests" |
| test_components = [ ":unittest_component" ] |
| } |