blob: 53413741943f8fed230f46c12a239f1e0acbe364 [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("//build/test/test_package.gni")
import("//src/sys/build/components.gni")
rustc_library("lib") {
name = "run_test_suite_lib"
with_unit_tests = true
edition = "2018"
# Only to be used by internal bin and tests.
visibility = [
":*",
"ffx/*",
"tests/*",
"//src/sys/test_runners/rust/tests/*",
]
deps = [
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//sdk/fidl/fuchsia.test:fuchsia.test-rustc",
"//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager-rustc",
"//src/lib/fuchsia-async",
"//src/lib/test_executor/rust:test_executor",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
]
if (!is_host) {
deps += [ "//src/lib/zircon/rust:fuchsia-zircon" ]
}
sources = [ "src/lib.rs" ]
}
rustc_binary("bin") {
name = "run_test_suite_bin"
with_unit_tests = true
edition = "2018"
deps = [
":lib",
"//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager-rustc",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-runtime",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
]
sources = [ "src/main.rs" ]
}
package("run_test_suite_pkg") {
testonly = true
package_name = "run_test_suite"
deps = [ ":bin" ]
binaries = [
{
name = "run-test-suite"
source = "run_test_suite_bin"
shell = true
},
]
}
fuchsia_unittest_package("run-test-suite-unit-tests") {
deps = [ ":bin_test" ]
}
# fxbug.dev/44251: Packages cannot include other packages, so making a group here for dependency.
group("run_test_suite") {
testonly = true
deps = [
":run_test_suite_pkg",
"//src/sys/component_manager_for_test",
]
}
group("tests") {
testonly = true
deps = [
":run-test-suite-unit-tests",
"tests",
]
}