blob: b1d9d55c85186ca67a7a4f9d8a6942c1a2b7f14c [file] [log] [blame]
# Copyright 2018 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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
group("stash") {
testonly = true
public_deps = [
":pkg",
":tests",
]
}
group("tests") {
testonly = true
public_deps = [
":stash-tests",
"tests",
]
}
rustc_binary("bin") {
name = "stash"
with_unit_tests = true
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.stash:fuchsia.stash-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/inspect/rust/fuchsia-inspect",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/lib/zircon/rust:fuchsia-zircon-sys",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:bytes",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-mem:fuchsia-mem-rustc",
]
}
package("pkg") {
package_name = "stash"
deps = [ ":bin" ]
binary = "stash"
meta = [
{
path = rebase_path("meta/stash.cmx")
dest = "stash.cmx"
},
{
path = rebase_path("meta/stash2.cmx")
dest = "stash2.cmx"
},
{
path = rebase_path("meta/stash_secure.cmx")
dest = "stash_secure.cmx"
},
]
}
test_package("stash-tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "stash_bin_test"
environments = basic_envs
},
]
}