blob: 31e47d67d2c3c7f85cb81052e74ee12e9c5744e2 [file]
# Copyright 2026 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_binary.gni")
import("//build/rust/rustc_library.gni")
rustc_library("driver_debug_lib") {
edition = "2024"
name = "driver_debug_lib"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.driver.debug:fuchsia.driver.debug_rust",
"//sdk/rust/zx",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
]
sources = [ "src/lib.rs" ]
test_deps = [
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:futures",
]
}
rustc_binary("debug") {
output_name = "debug"
edition = "2024"
with_unit_tests = true
configs += [ "//build/config/rust:bootfs" ]
deps = [
":driver_debug_lib",
"//sdk/rust/zx",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
]
sources = [ "src/main.rs" ]
}
fuchsia_unittest_component("debug_test_component") {
deps = [ ":debug_test" ]
}
fuchsia_unittest_component("driver_debug_lib_test_component") {
deps = [ ":driver_debug_lib_test" ]
}
fuchsia_test_package("driver_debug_unit_tests") {
test_components = [
":debug_test_component",
":driver_debug_lib_test_component",
]
}
fuchsia_package("driver_debug") {
deps = [ ":debug" ]
}
group("bootfs") {
deps = [ ":debug" ]
}
group("tests") {
testonly = true
deps = [
":driver_debug_unit_tests",
"tests",
]
}