blob: d895c593386238506c8a89b5e889c0322a5df7da [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_binary.gni")
import("//src/sys/build/components.gni")
rustc_binary("bin") {
name = "ip_forward"
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc",
"//src/connectivity/network/testing/netemul/lib/fidl:sync-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:structopt",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("ip-forward") {
testonly = true
manifest = "meta/ip_forward.cmx"
deps = [ ":bin" ]
}
fuchsia_component("ipv4-forward-test") {
testonly = true
manifest = "meta/ipv4_forward_test.cmx"
deps = [ ":ip-forward" ]
}
fuchsia_component("ipv6-forward-test") {
testonly = true
manifest = "meta/ipv6_forward_test.cmx"
deps = [ ":ip-forward" ]
}
fuchsia_test_package("netemul-ip-forward-tests") {
test_components = [
":ipv4-forward-test",
":ipv6-forward-test",
]
deps = [
# netstack is under test.
"//src/connectivity/network/netstack:component-debug",
"//src/connectivity/network/testing/netemul/runner:netstack-cfg",
]
}