| # 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") |
| import("//src/sys/pkg/sysmgr_config.gni") |
| |
| rustc_binary("bin") { |
| name = "system_updater" |
| with_unit_tests = true |
| edition = "2018" |
| deps = [ |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.space:fuchsia.space-rustc", |
| "//src/lib/cobalt/rust:fuchsia-cobalt", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-url", |
| "//src/lib/mundane", |
| "//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/async-generator", |
| "//src/sys/pkg/lib/bounded-node", |
| "//src/sys/pkg/lib/event-queue", |
| "//src/sys/pkg/lib/fidl-fuchsia-update-installer-ext", |
| "//src/sys/pkg/lib/metrics:cobalt_sw_delivery_registry_rustlib", |
| "//src/sys/pkg/lib/pkgfs", |
| "//src/sys/pkg/lib/update-package", |
| "//third_party/cobalt/src/lib/client/rust:cobalt-client", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:pin-project", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:uuid", |
| ] |
| test_deps = [ |
| "//src/sys/pkg/lib/fuchsia-pkg-testing", |
| "//src/sys/pkg/lib/version", |
| "//src/sys/pkg/testing/mock-paver", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:pretty_assertions", |
| "//third_party/rust_crates:proptest", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ |
| "src/fidl.rs", |
| "src/install_manager.rs", |
| "src/main.rs", |
| "src/update.rs", |
| "src/update/channel.rs", |
| "src/update/config.rs", |
| "src/update/environment.rs", |
| "src/update/genutil.rs", |
| "src/update/history.rs", |
| "src/update/history/version.rs", |
| "src/update/metrics.rs", |
| "src/update/paver.rs", |
| "src/update/paver/configuration.rs", |
| "src/update/reboot.rs", |
| "src/update/resolver.rs", |
| "src/update/state.rs", |
| ] |
| } |
| |
| fuchsia_package_with_single_component("system-updater") { |
| manifest = "meta/system-updater.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_unittest_package("system-updater-tests") { |
| deps = [ ":bin_test" ] |
| manifest = "meta/system-updater-bin-test.cmx" |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_component("isolated") { |
| component_name = "system-updater-isolated" |
| manifest = "meta/system-updater-isolated.cmx" |
| deps = [ "//src/sys/pkg/bin/system-updater:bin" ] |
| } |
| |
| sysmgr_config("config") { |
| source = "sysmgr.config" |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":system-updater-tests" ] |
| } |