| # 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/test/test_package.gni") |
| |
| rustc_library("lib") { |
| name = "test_runners_lib" |
| with_unit_tests = true |
| edition = "2018" |
| |
| # Only for internal use. |
| visibility = [ |
| "gtest/*", |
| "rust/*", |
| ":*", |
| ] |
| |
| deps = [ |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner-rustc", |
| "//sdk/fidl/fuchsia.test:fuchsia.test-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/runner", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:thiserror", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| "//zircon/system/fidl/fuchsia-process:fuchsia-process-rustc", |
| ] |
| } |
| |
| rustc_library("test_lib") { |
| testonly = true |
| name = "test_runners_test_lib" |
| edition = "2018" |
| source_root = "src/test_lib.rs" |
| |
| # Only for internal use. |
| visibility = [ |
| "gtest/*", |
| "rust/*", |
| ":*", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.test:fuchsia.test-rustc", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| } |
| |
| test_package("test-runner-unit-tests") { |
| deps = [ ":lib_test" ] |
| |
| tests = [ |
| { |
| name = "test_runners_lib_lib_test" |
| dest = "test-runner-unit-tests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("test_runners") { |
| testonly = true |
| deps = [ |
| "gtest", |
| "rust", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":test-runner-unit-tests", |
| "gtest:tests", |
| "rust:tests", |
| ] |
| } |