|  | # 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/rust/rustc_library.gni") | 
|  | import("//build/rust/rustc_test.gni") | 
|  | import("//build/test/test_package.gni") | 
|  |  | 
|  | group("tests") { | 
|  | testonly = true | 
|  |  | 
|  | deps = [ ":mpmc_tests" ] | 
|  | } | 
|  |  | 
|  | rustc_library("mpmc") { | 
|  | name = "mpmc" | 
|  | edition = "2018" | 
|  | deps = [ | 
|  | "//third_party/rust_crates:crossbeam", | 
|  | "//third_party/rust_crates:futures", | 
|  | ] | 
|  |  | 
|  | sources = [ "src/lib.rs" ] | 
|  | } | 
|  |  | 
|  | rustc_test("mpmc_lib_test") { | 
|  | edition = "2018" | 
|  | source_root = "src/test.rs" | 
|  | deps = [ | 
|  | ":mpmc", | 
|  | "//src/lib/fuchsia-async", | 
|  | "//third_party/rust_crates:futures", | 
|  | ] | 
|  |  | 
|  | sources = [ "src/test.rs" ] | 
|  | } | 
|  |  | 
|  | test_package("mpmc_tests") { | 
|  | deps = [ ":mpmc_lib_test" ] | 
|  |  | 
|  | tests = [ | 
|  | { | 
|  | name = "mpmc_lib_test" | 
|  | environments = basic_envs | 
|  | }, | 
|  | ] | 
|  | } |