| # 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/test/test_package.gni") |
| |
| rustc_binary("bin") { |
| testonly = true |
| name = "gtest_runner" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//garnet/lib/rust/files_async", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner-rustc", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//sdk/fidl/fuchsia.test:fuchsia.test-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/storage/vfs/rust:vfs", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/runner", |
| "//src/sys/test_runners:lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_derive", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:uuid", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| "//zircon/system/fidl/fuchsia-process:fuchsia-process-rustc", |
| ] |
| } |
| |
| package("gtest_runner") { |
| testonly = true |
| deps = [ |
| ":bin", |
| ":bin_test", |
| "//src/sys/component_manager/tests/memfs", |
| ] |
| |
| binaries = [ |
| { |
| name = "gtest_runner" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/gtest_runner.cml") |
| dest = "gtest_runner.cm" |
| }, |
| ] |
| } |
| |
| group("gtest") { |
| testonly = true |
| deps = [ ":gtest_runner" ] |
| } |
| |
| test_package("gtest_runner_tests") { |
| deps = [ |
| ":bin_test", |
| "test_data", |
| ] |
| |
| binaries = [ |
| { |
| name = "gtest_runner_sample_tests" |
| dest = "sample_tests" |
| }, |
| { |
| name = "gtest_runner_no_tests" |
| dest = "no_tests" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "gtest_runner_bin_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| package("gtest_runner_example_tests") { |
| testonly = true |
| deps = [ "test_data" ] |
| |
| binaries = [ |
| { |
| name = "gtest_runner_sample_tests" |
| dest = "sample_tests" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/sample_tests.cml") |
| dest = "sample_tests.cm" |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":gtest_runner_tests" ] |
| } |