blob: 8f5d1a7165aeb630d5f7a1c9246896691fea297d [file]
# Copyright 2026 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_test.gni")
import("//src/starnix/tests/starnix_test_subpackages.gni")
group("tests") {
testonly = true
deps = [ ":starnix_netstack_suspend_test" ]
}
rustc_test("bin") {
edition = "2024"
output_name = "starnix_netstack_suspend_test"
sources = [ "src/lib.rs" ]
deps = [
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_rust",
"//sdk/fidl/fuchsia.starnix.runner:fuchsia.starnix.runner_rust",
"//sdk/rust/zx",
"//src/lib/fdio/rust:fdio",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component-test",
"//src/lib/network/fidl_fuchsia_posix_socket_ext",
"//src/sys/lib/component-events",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:socket2",
"//third_party/rust_crates:test-case",
]
}
fuchsia_test_component("realm_tcp") {
manifest = "meta/realm_tcp.cml"
}
fuchsia_test_component("realm_udp") {
manifest = "meta/realm_udp.cml"
}
fuchsia_test_component("integration_test") {
component_name = "starnix_netstack_suspend_test"
manifest = "meta/integration_test.cml"
deps = [ ":bin" ]
test_type = "starnix"
}
fuchsia_test_component("container") {
manifest = "//src/starnix/containers/debian/meta/debian_container.cml"
}
fuchsia_test_package("starnix_netstack_suspend_test") {
test_components = [ ":integration_test" ]
deps = [
":container",
":realm_tcp",
":realm_udp",
"linux:suspend_for_tcp_wakeup",
"linux:suspend_for_udp_wakeup",
"//src/starnix/containers/debian:container_resources",
]
subpackages = starnix_test_subpackages
}