blob: 6d11d35930cdc7aa9f9c242163cef6f3e33ca24b [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_library.gni")
group("tests") {
testonly = true
deps = [ ":httpdate-hyper-tests" ]
}
rustc_library("httpdate-hyper") {
name = "httpdate-hyper"
version = "0.1.0"
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/fuchsia-hyper",
"//src/lib/webpki-roots-fuchsia",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:hyper",
"//third_party/rust_crates:rustls",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:webpki",
]
sources = [ "src/lib.rs" ]
test_deps = [
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:base64",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:tokio-rustls",
"//third_party/rust_crates:tracing",
]
inputs = [
"certs/ca.cert",
"certs/notafter",
"certs/notbefore",
"certs/server.rsa",
"certs/server.certchain",
]
}
fuchsia_unittest_package("httpdate-hyper-tests") {
manifest = "meta/httpdate-hyper-lib-test.cml"
deps = [
":httpdate-hyper_test",
"//src/connectivity/network/dns:component",
"//src/connectivity/network/netstack3:component-dropin",
]
# This test depends on root ssl certificate which is a system capability.
test_type = "system"
if (current_cpu == "riscv64") {
# TODO(https://fxbug.dev/298470623): Make this target pass on RISC-V and remove this.
test_specs = {
environments = []
}
}
}