blob: 7380fbe491284a5d5f0234c15a4a8ca2c7961943 [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/rust/rustc_binary.gni")
import("//src/sys/build/components.gni")
group("tests") {
testonly = true
deps = [ ":usb-system-update-checker-tests" ]
}
rustc_binary("bin") {
name = "usb_system_update_checker"
with_unit_tests = true
deps = [
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//sdk/fidl/fuchsia.update.usb:fuchsia.update.usb-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-url",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/pkg/fidl/fuchsia.update.installer:fuchsia.update.installer-rustc",
"//src/sys/pkg/lib/update-package",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
test_deps = [
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//src/sys/pkg/lib/version",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:tempfile",
]
sources = [
"src/main.rs",
"src/update_checker.rs",
]
}
fuchsia_component("component") {
component_name = "usb-system-update-checker"
manifest = "meta/usb-system-update-checker.cmx"
deps = [ ":bin" ]
}
fuchsia_component("isolated") {
component_name = "usb-system-update-checker-isolated"
manifest = "meta/usb-system-update-checker-isolated.cmx"
deps = [ ":bin" ]
}
fuchsia_package("usb-system-update-checker") {
package_name = "usb-system-update-checker"
deps = [ ":component" ]
}
fuchsia_unittest_package("usb-system-update-checker-tests") {
manifest = "meta/usb-system-update-checker-tests.cmx"
deps = [ ":bin_test" ]
}