blob: 64f2cf57cb11b5217bea0c5854be18f647dc8b61 [file] [log] [blame]
# Copyright {{ year }} 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/component/config.gni")
import("//build/components.gni")
import("//build/fidl/fidl.gni")
import("//build/rust/rustc_binary.gni")
group("tests") {
testonly = true
deps = [ ":{{ test_package_name }}" ]
}
rustc_test("bin") {
testonly = true
edition = "2021"
source_root = "src/main.rs"
sources = [ source_root ]
name = "{{ test_binary_name }}"
deps = [
"../testing/fidl:{{ fidl_library_name }}_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/testing/realm_proxy/client",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:tracing",
]
}
fuchsia_component("test-suite-component") {
testonly = true
component_name = "test-suite"
manifest = "meta/test-suite.cml"
deps = [ ":bin" ]
}
fuchsia_package("test-suite") {
testonly = true
deps = [ ":test-suite-component" ]
}
fuchsia_component("test-root") {
testonly = true
manifest = "meta/test-root.cml"
}
fuchsia_test_package("{{ test_package_name }}") {
test_components = [ ":test-root" ]
subpackages = [
"../testing/realm-factory",
":test-suite",
]
}