blob: 9ac61e37fdc79f88f67497e504784b53fbd7c143 [file] [log] [blame]
# Copyright 2020 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")
rustc_binary("bin") {
name = "system_updater"
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.paver:fuchsia.paver-rustc",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/pkg/lib/update-package",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc",
"//zircon/system/fidl/fuchsia-mem:fuchsia-mem-rustc",
]
test_deps = [
"//src/sys/pkg/testing/mock-paver",
"//third_party/rust_crates:matches",
]
}
package("system-updater") {
deps = [ ":bin" ]
binaries = [
{
name = "system_updater"
dest = "system-updater"
},
]
meta = [
{
path = rebase_path("meta/system-updater.cmx")
dest = "system-updater.cmx"
},
]
resources = [
{
path = rebase_path("images")
dest = "images"
},
]
}
test_package("system-updater-tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "system_updater_bin_test"
dest = "system-updater-bin-test"
environments = basic_envs
},
]
}
group("tests") {
testonly = true
deps = [ ":system-updater-tests" ]
}