| # 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") |
| |
| rustc_library("lib") { |
| name = "test_manager_lib" |
| with_unit_tests = true |
| edition = "2018" |
| |
| # Only for internal use. |
| visibility = [ |
| ":*", |
| "tests/*", |
| ] |
| |
| deps = [ |
| "//garnet/lib/rust/files_async", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.component:fuchsia.component-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//sdk/fidl/fuchsia.test:fuchsia.test-rustc", |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager-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:thiserror", |
| "//third_party/rust_crates:uuid", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| rustc_binary("bin") { |
| name = "test_manager" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//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:thiserror", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| package("test_manager_pkg") { |
| testonly = true |
| deps = [ |
| ":bin", |
| "//src/sys/component_manager/tests/memfs", |
| ] |
| package_name = "test_manager" |
| |
| binaries = [ |
| { |
| name = "test_manager" |
| }, |
| { |
| name = "memfs" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/test_manager.cml") |
| dest = "test_manager.cm" |
| }, |
| { |
| path = rebase_path("meta/memfs.cml") |
| dest = "memfs.cm" |
| }, |
| ] |
| } |
| |
| # Defines test manager and its dependencies. |
| group("test_manager") { |
| testonly = true |
| deps = [ |
| ":test_manager_pkg", |
| "//src/sys/test_runners", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "tests" ] |
| } |