blob: 6620b58a5ca17f15859d2eb7e1f775d37588e878 [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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_test.gni")
import("//build/test/test_package.gni")
import("//build/testing/test_spec.gni")
group("remote-control") {
testonly = true
public_deps = [
":pkg",
":tests",
]
}
group("tests") {
testonly = true
deps = [ ":remote-control-lib-tests" ]
}
rustc_library("lib") {
name = "remote-control"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol-rustc",
"//sdk/fidl/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet-rustc",
"//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//sdk/fidl/fuchsia.test:fuchsia.test-rustc",
"//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager-rustc",
"//src/connectivity/overnet/lib/hoist",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//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:thiserror",
"//zircon/system/fidl/fuchsia-device:fuchsia-device-rustc",
"//zircon/system/fidl/fuchsia-device-manager:fuchsia-device-manager-rustc",
"//zircon/system/fidl/fuchsia-net:fuchsia-net-rustc",
]
}
rustc_binary("bin") {
name = "remote-control-bin"
edition = "2018"
deps = [
":lib",
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol-rustc",
"//sdk/fidl/fuchsia.overnet:fuchsia.overnet-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//src/connectivity/overnet/lib/hoist",
"//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:thiserror",
"//zircon/system/fidl/fuchsia-device-manager:fuchsia-device-manager-rustc",
]
}
test_package("remote-control-lib-tests") {
deps = [
":lib_test",
"//src/developer/remote-control/testing/mock-sys-launcher:mock-sys-launcher-bin",
]
meta = [
{
path = rebase_path("testing/mock-sys-launcher/meta/mock_sys_launcher.cml")
dest = "mock_sys_launcher.cm"
},
{
path = rebase_path("meta/test_driver.cml")
dest = "test_driver.cm"
},
]
binaries = [
{
name = "mock_sys_launcher"
},
]
v2_tests = [
{
name = "remote_control_lib_test"
environments = basic_envs
},
]
}
package("pkg") {
package_name = "remote-control"
deps = [
":bin",
"//build/validate:non_production_tag",
]
binaries = [
{
name = "remote_control_bin"
},
]
meta = [
{
path = rebase_path("meta/remote-control.cml")
dest = "remote-control.cm"
},
]
}