| # Copyright 2020 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_binary.gni") | |
| import("//src/sys/build/components.gni") | |
| rustc_binary("bin") { | |
| testonly = true | |
| name = "rust_test_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.io:fuchsia.io-rustc", | |
| "//sdk/fidl/fuchsia.process:fuchsia.process-rustc", | |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", | |
| "//sdk/fidl/fuchsia.test:fuchsia.test-rustc", | |
| "//sdk/fidl/fuchsia.test:rust_measure_tape_for_case", | |
| "//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/lib/zircon/rust:fuchsia-zircon-sys", | |
| "//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:lazy_static", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:rand", | |
| "//third_party/rust_crates:regex", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:thiserror", | |
| "//third_party/rust_crates:uuid", | |
| ] | |
| test_deps = [ | |
| "//src/sys/test_runners:test_lib", | |
| "//third_party/rust_crates:itertools", | |
| "//third_party/rust_crates:matches", | |
| "//third_party/rust_crates:pretty_assertions", | |
| ] | |
| sources = [ | |
| "src/main.rs", | |
| "src/test_server.rs", | |
| ] | |
| } | |
| fuchsia_component("rust_test_runner") { | |
| testonly = true | |
| manifest = "meta/rust-test-runner.cml" | |
| component_name = "rust-test-runner" | |
| deps = [ ":bin" ] | |
| } | |
| fuchsia_package("rust-test-runner") { | |
| testonly = true | |
| deps = [ ":rust_test_runner" ] | |
| } | |
| group("rust") { | |
| testonly = true | |
| deps = [ ":rust-test-runner" ] | |
| } | |
| fuchsia_unittest_component("test-component") { | |
| deps = [ ":bin_test" ] | |
| } | |
| fuchsia_test_package("rust-test-runner-test") { | |
| test_components = [ ":test-component" ] | |
| deps = [ | |
| "test_data/huge-rust-tests", | |
| "test_data/no-rust-tests", | |
| "test_data/sample-rust-tests", | |
| ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":rust-test-runner-test", | |
| "tests", | |
| ] | |
| } |