blob: c1019fe59ed651682469d344571500c55c544349 [file] [log] [blame]
# Copyright 2023 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_library.gni")
rustc_library("omaha-client-fuchsia") {
version = "0.0.1"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-hyper",
"//src/lib/fuchsia-url",
"//src/sys/lib/fidl-connector",
"//src/sys/pkg/fidl/fuchsia.update.installer:fuchsia.update.installer_rust",
"//src/sys/pkg/lib/channel-config",
"//src/sys/pkg/lib/fidl-fuchsia-update-installer-ext",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:hyper",
"//third_party/rust_crates:hyper-rustls",
"//third_party/rust_crates:log",
"//third_party/rust_crates:omaha_client",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:url",
]
test_deps = [
"//src/lib/fuchsia",
"//src/lib/fuchsia-sync",
"//src/lib/testing/fuchsia-hyper-test-support",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:serde_json",
]
sources = [
"src/app_set.rs",
"src/http_request.rs",
"src/install_plan.rs",
"src/installer.rs",
"src/lib.rs",
"src/timer.rs",
]
}
fuchsia_component("omaha-client-fuchsia-tests-test-driver") {
testonly = true
component_name = "test-driver"
manifest = "meta/test-driver.cml"
deps = [ ":omaha-client-fuchsia_test" ]
}
fuchsia_unittest_package("omaha-client-fuchsia-tests") {
manifest = "meta/omaha-client-fuchsia-test.cml"
deps = [
":omaha-client-fuchsia-tests-test-driver",
"//src/connectivity/network:netstack-for-tests",
"//src/connectivity/network/dns:component",
"//src/power/shutdown-shim/tests:shutdown_shim_component",
"//src/sys/pkg/bin/fake-channel-control",
"//src/sys/stash:stash2_v2",
]
test_type = "system"
}
group("tests") {
testonly = true
deps = [ ":omaha-client-fuchsia-tests" ]
}