blob: 3e94b55fe989a5fb481e0832cfeedafb159cb565 [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_library.gni")
import("//build/testing/environments.gni")
import("//src/sys/build/components.gni")
rustc_library("isolated-swd") {
version = "0.1.0"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.boot:fuchsia.boot-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//sdk/fidl/fuchsia.net:fuchsia.net-rustc",
"//sdk/fidl/fuchsia.paver:fuchsia.paver-rustc",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc",
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-rustc",
"//sdk/fidl/fuchsia.update:fuchsia.update-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-hyper",
"//src/lib/fuchsia-runtime",
"//src/lib/fuchsia-url",
"//src/lib/scoped_task",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/fidl/fuchsia.update.installer:fuchsia.update.installer-rustc",
"//src/sys/pkg/lib/fidl-fuchsia-update-installer-ext",
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/lib/omaha-client",
"//src/sys/pkg/lib/pkgfs",
"//src/sys/pkg/lib/version",
"//src/sys/pkg/testing/blobfs-ramdisk",
"//src/sys/pkg/testing/mock-paver",
"//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:matches",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//sdk/fidl/fuchsia.space:fuchsia.space-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//third_party/rust_crates:hyper",
"//third_party/rust_crates:openat",
]
sources = [
"src/cache.rs",
"src/lib.rs",
"src/omaha.rs",
"src/omaha/http_request.rs",
"src/omaha/install_plan.rs",
"src/omaha/installer.rs",
"src/omaha/timer.rs",
"src/pkgfs.rs",
"src/resolver.rs",
"src/updater.rs",
]
}
fuchsia_component("isolated-swd-tests-component") {
testonly = true
component_name = "isolated-swd-tests"
manifest = "meta/isolated-swd-tests.cmx"
deps = [ ":isolated-swd_test" ]
}
isolated_swd_components = [
"//src/sys/pkg/bin/pkg-cache:isolated",
"//src/sys/pkg/bin/pkg-resolver:isolated",
"//src/sys/pkg/bin/system-updater:isolated",
]
fuchsia_test_package("isolated-swd-tests") {
test_components = [ ":isolated-swd-tests-component" ]
deps = [
"//src/storage/bin/blobfs",
"//src/sys/pkg/bin/pkgfs:pkgsvr_bin",
"//src/sys/pkg/bin/pm:pm_bin",
"//src/sys/pkg/lib/fuchsia-pkg-testing/certs",
"//src/sys/pkg/tests/pkg-resolver:empty-repo",
]
deps += isolated_swd_components
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
fuchsia_package("isolated-swd-components") {
deps = isolated_swd_components
}
group("tests") {
testonly = true
public_deps = [
":isolated-swd-tests",
"//src/lib/storage/ramdevice_client:ramdisk-isolated-devmgr",
]
}