blob: a276f3e6f3efa31904682f179ad999beb36ebc38 [file] [log] [blame]
# Copyright 2018 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/components.gni")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_staticlib.gni")
import("//build/testing/environments.gni")
rustc_library("fuchsia") {
name = "fuchsia"
edition = "2021"
deps = [
"macro",
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust",
"//src/lib/diagnostics/log/rust",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:tracing",
]
sources = [ "src/lib.rs" ]
}
rustc_test("fuchsia_test") {
name = "fuchsia_test"
edition = "2021"
deps = [
":fuchsia",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
]
source_root = "src/test.rs"
sources = [ "src/test.rs" ]
}
fuchsia_unittest_package("fuchsia-tests") {
deps = [ ":fuchsia_test" ]
test_specs = {
environments = [ emu_env ]
}
}
group("tests") {
testonly = true
deps = [
":fuchsia-tests",
":fuchsia_test($host_toolchain)",
"tests",
]
}