blob: 3331b0788b0834f9e844dacc1ad82f4087db9a4b [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")
rustc_binary("bin") {
name = "pkgctl"
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/lib/rust/files_async",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc",
"//sdk/fidl/fuchsia.space:fuchsia.space-rustc",
"//sdk/fidl/fuchsia.update:fuchsia.update-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc",
]
}
package("pkgctl") {
deps = [ ":bin" ]
binaries = [
{
name = "pkgctl"
dest = "pkgctl"
shell = true
},
]
meta = [
{
path = rebase_path("meta/pkgctl.cmx")
dest = "pkgctl.cmx"
},
]
}
test_package("pkgctl-tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "pkgctl_bin_test"
dest = "pkgctl-bin-test"
environments = basic_envs
},
]
}
group("tests") {
testonly = true
deps = [ ":pkgctl-tests" ]
}