blob: ab2ba1ada1427955a85f8445f72dd171c1c772fe [file] [log] [blame]
# 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.
assert(is_fuchsia, "These targets are only compiled in the fuchsia toolchain.")
import("//build/components.gni")
import("//build/rust/rustc_binary.gni")
group("storage") {
testonly = true
deps = [
":hermetic_tests",
":package",
]
}
group("hermetic_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-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 = [
"//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions",
"//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" ]
}