blob: b1fb41b25e1ffe0fbf0fe1f442fe1cd2cb09181f [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/rust/rustc_test.gni")
# All tests in this file currently run only on the host. If that changes,
# remove this.
assert(is_host)
rustc_test("netstack3_core_threading_test") {
edition = "2021"
source_root = "threading/lib.rs"
sources = [ "threading/lib.rs" ]
deps = [
"//src/connectivity/lib/ip-test-macro",
"//src/connectivity/lib/net-declare",
"//src/connectivity/lib/net-types",
"//src/connectivity/lib/packet-formats",
"//src/connectivity/network/netstack3/core:netstack3-core-loom",
"//src/lib/const-unwrap",
"//src/lib/network/packet",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:loom",
]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
# The loom crate documentation recommends compiling with optimizations since
# the number of iterations can be large enough to make tests unreasonably
# slow otherwise.
configs += [
"//build/config/rust:lto_thin",
"//build/config:optimize_default",
]
}
group("tests") {
testonly = true
deps = []
if (!is_coverage) {
deps += [ ":netstack3_core_threading_test" ]
}
}