blob: 1aef292b795dd9d6ccf16de8b0360cb5cd9055e3 [file] [log] [blame]
# Copyright 2019 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/components.gni")
import("//build/rust/rustc_test.gni")
rustc_test("driver") {
name = "system_updater_test"
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.logger:fuchsia.logger_rust",
"//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust",
"//sdk/fidl/fuchsia.paver:fuchsia.paver_rust",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//sdk/fidl/fuchsia.space:fuchsia.space_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-component-test",
"//src/lib/fuchsia-fs",
"//src/lib/fuchsia-sync",
"//src/lib/fuchsia-url",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/fidl/fuchsia.update.installer:fuchsia.update.installer_rust",
"//src/sys/pkg/lib/fidl-fuchsia-update-installer-ext",
"//src/sys/pkg/lib/fuchsia-hash",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/lib/metrics:cobalt_sw_delivery_registry_rustlib",
"//src/sys/pkg/lib/update-package",
"//src/sys/pkg/testing/mock-metrics",
"//src/sys/pkg/testing/mock-paver",
"//src/sys/pkg/testing/mock-reboot",
"//src/sys/pkg/testing/mock-resolver",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:pretty_assertions",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:thiserror",
]
sources = [
"src/board.rs",
"src/cancel.rs",
"src/cobalt_metrics.rs",
"src/commits_images.rs",
"src/epoch.rs",
"src/fetch_packages.rs",
"src/history.rs",
"src/lib.rs",
"src/mode_force_recovery.rs",
"src/mode_normal.rs",
"src/progress_reporting.rs",
"src/reboot_controller.rs",
"src/retained_packages.rs",
"src/update_package.rs",
"src/writes_firmware.rs",
"src/writes_images.rs",
]
configs += [ "//build/config/rust/lints:clippy_warn_all" ]
}
fuchsia_component("system-updater-test") {
testonly = true
manifest = "meta/system-updater-test.cml"
deps = [ ":driver" ]
}
fuchsia_test_package("system-updater-integration-tests") {
test_components = [ ":system-updater-test" ]
deps = [ "//src/sys/pkg/bin/system-updater:isolated-v2" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
public_deps = [ ":system-updater-integration-tests" ]
}