| # 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/components.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_test("driver") { |
| name = "omaha_client_integration_test" |
| edition = "2021" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_rust", |
| "//sdk/fidl/fuchsia.feedback:fuchsia.feedback_rust", |
| "//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.net.name:fuchsia.net.name_rust", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_rust", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//sdk/fidl/fuchsia.update:fuchsia.update_rust", |
| "//sdk/fidl/fuchsia.update.channel:fuchsia.update.channel_rust", |
| "//sdk/fidl/fuchsia.update.channelcontrol:fuchsia.update.channelcontrol_rust", |
| "//sdk/fidl/fuchsia.update.config:fuchsia.update.config_rust", |
| "//src/lib/diagnostics/hierarchy/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions", |
| "//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/pkg/fidl/fuchsia.update.installer:fuchsia.update.installer_rust", |
| "//src/sys/pkg/fidl/fuchsia.update.verify:fuchsia.update.verify_rust", |
| "//src/sys/pkg/lib/fidl-fuchsia-update-installer-ext", |
| "//src/sys/pkg/lib/fuchsia-pkg-testing", |
| "//src/sys/pkg/lib/update-package", |
| "//src/sys/pkg/testing/mock-boot-arguments:lib", |
| "//src/sys/pkg/testing/mock-crash-reporter:lib", |
| "//src/sys/pkg/testing/mock-installer", |
| "//src/sys/pkg/testing/mock-omaha-server", |
| "//src/sys/pkg/testing/mock-paver", |
| "//src/sys/pkg/testing/mock-reboot", |
| "//src/sys/pkg/testing/mock-resolver", |
| "//src/sys/pkg/testing/mock-verifier:lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:omaha_client", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| |
| inputs = [ "src/test_private_key.pem" ] |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_test_component("omaha-client-test-root") { |
| component_name = "test_root" |
| manifest = "meta/test_root.cml" |
| test_type = "system" |
| } |
| |
| fuchsia_component("omaha-client-test-driver") { |
| component_name = "test_driver" |
| testonly = true |
| manifest = "meta/test_driver.cml" |
| deps = [ ":driver" ] |
| } |
| |
| fuchsia_test_package("omaha-client-integration-tests") { |
| test_components = [ ":omaha-client-test-root" ] |
| deps = [ |
| ":omaha-client-test-driver", |
| "//src/cobalt/bin/testing/mock_cobalt:component_v2", |
| "//src/connectivity/network:netstack-for-tests", |
| "//src/connectivity/network/dns:component", |
| "//src/sys/pkg/bin/omaha-client:component", |
| "//src/sys/pkg/bin/omaha-client:omaha-client-structured-config", |
| "//src/sys/pkg/bin/system-update-committer:component", |
| "//src/sys/pkg/bin/system-updater:production-component-and-config", |
| "//src/sys/stash:stash2_v2", |
| ] |
| |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":omaha-client-integration-tests" ] |
| } |