| # Copyright 2017 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/fidl/fidl.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/test/test_package.gni") |
| |
| rustc_library("fuchsia-component") { |
| version = "0.1.0" |
| edition = "2018" |
| deps = [ |
| "//garnet/lib/rust/io_util", |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:thiserror", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| ] |
| } |
| |
| rustc_test("fuchsia-component-blackbox-unit-tests") { |
| edition = "2018" |
| source_root = "blackbox_unit_tests/lib.rs" |
| deps = [ |
| ":fuchsia-component", |
| ":fuchsia.component.test-rustc", |
| "//garnet/lib/rust/files_async", |
| "//garnet/lib/rust/io_util", |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/storage/pseudo-fs", |
| "//src/lib/test_util", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| ] |
| } |
| |
| fidl("fuchsia.component.test") { |
| sources = [ "blackbox_unit_tests/test.test.fidl" ] |
| } |
| |
| unittest_package("fuchsia-component-blackbox-tests") { |
| deps = [ ":fuchsia-component-blackbox-unit-tests" ] |
| tests = [ |
| { |
| name = "fuchsia_component_blackbox_unit_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fuchsia-component-blackbox-tests" ] |
| } |