blob: adcf56d71563b96f5088d96ad15d4c0f212bf664 [file] [log] [blame]
# 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_binary.gni")
import("//build/rust/rustc_library.gni")
import("//src/sys/build/components.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:tracing",
"//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",
"//third_party/rust_crates:tracing",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("test_manager_cmp") {
component_name = "test_manager"
deps = [ ":bin" ]
manifest = "meta/test_manager.cml"
}
fuchsia_component("memfs") {
deps = [ "//src/sys/component_manager/tests/memfs" ]
manifest = "meta/memfs.cml"
}
fuchsia_package("test_manager_pkg") {
testonly = true
package_name = "test_manager"
deps = [
":memfs",
":test_manager_cmp",
]
}
# Defines test manager and its dependencies.
group("test_manager") {
testonly = true
deps = [
":test_manager_pkg",
"//src/sys/test_runners",
"//src/sys/universe-resolver",
]
}
group("tests") {
testonly = true
deps = [ "tests" ]
}