blob: f3fc119302f1e342037006d8021114c708816855 [file]
{{>copyright comment="#"}}
{{>generated comment="#"}}
import("//build/components.gni")
import("//build/rust/rustc_test.gni")
group("tests") {
testonly = true
deps = [ ":package" ]
}
rustc_test("bin") {
name = "{{PROJECT_NAME}}"
edition = "2024"
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:log",
]
sources = [ "src/lib.rs" ]
}
fuchsia_component("component") {
testonly = true
component_name = "{{PROJECT_NAME}}"
manifest = "meta/{{snake_case PROJECT_NAME}}.cml"
deps = [ ":bin" ]
}
# Run with `fx test {{PROJECT_NAME}}-tests`.
fuchsia_test_package("package") {
package_name = "{{PROJECT_NAME}}-tests"
test_components = [ ":component" ]
}