blob: 85c1cfed56e2a713b324c0b64548e08cf0de71d4 [file] [edit]
# Copyright 2021 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/test_spec.gni")
host_test_data("empty-repo-keys") {
sources = [
"//src/sys/pkg/tests/pkg-resolver/template/keys/root.json",
"//src/sys/pkg/tests/pkg-resolver/template/keys/snapshot.json",
"//src/sys/pkg/tests/pkg-resolver/template/keys/targets.json",
"//src/sys/pkg/tests/pkg-resolver/template/keys/timestamp.json",
]
outputs = [
"$root_out_dir/test_data/ffx_lib_pkg/empty-repo/keys/{{source_file_part}}",
]
}
host_test_data("empty-repo-metadata") {
sources = [
"//src/sys/pkg/tests/pkg-resolver/template/repository/1.root.json",
"//src/sys/pkg/tests/pkg-resolver/template/repository/1.snapshot.json",
"//src/sys/pkg/tests/pkg-resolver/template/repository/1.targets.json",
"//src/sys/pkg/tests/pkg-resolver/template/repository/root.json",
"//src/sys/pkg/tests/pkg-resolver/template/repository/snapshot.json",
"//src/sys/pkg/tests/pkg-resolver/template/repository/targets.json",
"//src/sys/pkg/tests/pkg-resolver/template/repository/timestamp.json",
]
outputs = [ "$root_out_dir/test_data/ffx_lib_pkg/empty-repo/repository/{{source_file_part}}" ]
}
rustc_library("pkg") {
name = "pkg"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.developer.ffx:fuchsia.developer.ffx_rust",
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/fidl-fuchsia-developer-ffx-ext",
"//src/developer/ffx/lib/protocols:lib",
"//src/developer/ffx/lib/protocols:lib",
"//src/lib/analytics/rust:lib",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-hyper",
"//src/lib/network/fidl_fuchsia_net_ext",
"//src/sys/pkg/lib/fuchsia-repo",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-lock",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:percent-encoding",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:pretty_assertions",
"//third_party/rust_crates:serial_test",
]
sources = [
"src/config.rs",
"src/lib.rs",
"src/metrics.rs",
"src/repo.rs",
"src/tunnel.rs",
]
}
group("tests") {
testonly = true
deps = [ ":pkg_test($host_toolchain)" ]
}