blob: 14157320cb40248e3260c7f693188ce65e861ed5 [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")
import("//build/rust/rustc_test.gni")
handle_test_sources = [
"src/channel.rs",
"src/lib.rs",
"src/socket.rs",
]
handle_test_deps = [
"//src/lib/fidl/rust/fidl",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
]
rustc_test("fidl_rust_handle_tests_bin") {
output_name = "fidl_rust_handle_tests"
edition = "2021"
sources = handle_test_sources
deps = handle_test_deps + [ "//src/lib/fuchsia-async" ]
}
fuchsia_unittest_package("fidl_rust_handle_tests") {
deps = [ ":fidl_rust_handle_tests_bin" ]
}
# Also build as a library for use in overnet tests.
rustc_library("fidl_handle_tests") {
edition = "2021"
sources = handle_test_sources
deps = handle_test_deps
}
group("handle_tests") {
testonly = true
deps = [
":fidl_rust_handle_tests",
":fidl_rust_handle_tests_bin($host_toolchain)",
]
}