| # Copyright 2022 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") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":driver_tools_tests" ] |
| } |
| |
| rustc_library("lib") { |
| edition = "2021" |
| name = "driver_tools" |
| with_unit_tests = true |
| deps = [ |
| "//sdk/fidl/fuchsia.device:fuchsia.device-rustc", |
| "//sdk/fidl/fuchsia.device.manager:fuchsia.device.manager-rustc", |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development-rustc", |
| "//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework-rustc", |
| "//sdk/fidl/fuchsia.driver.playground:fuchsia.driver.playground-rustc", |
| "//sdk/fidl/fuchsia.driver.registrar:fuchsia.driver.registrar-rustc", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block-rustc", |
| "//sdk/fidl/fuchsia.hardware.block.partition:fuchsia.hardware.block.partition-rustc", |
| "//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c-rustc", |
| "//sdk/fidl/fuchsia.hardware.pci:fuchsia.hardware.pci-rustc", |
| "//sdk/fidl/fuchsia.hardware.skipblock:fuchsia.hardware.skipblock-rustc", |
| "//sdk/fidl/fuchsia.input:fuchsia.input-rustc", |
| "//sdk/fidl/fuchsia.input.report:fuchsia.input.report-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/lib/device-watcher/rust", |
| "//src/developer/ffx/lib/errors:lib", |
| "//src/devices/lib/bind", |
| "//src/devices/pci/bin/lspci:lib", |
| "//src/devices/usb/bin/lsusb:lib", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/storage/fuchsia-vfs-watcher", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:blocking", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:uuid", |
| "//third_party/rust_crates:zstd", |
| "//third_party/zstd", |
| ] |
| test_deps = [ |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| ] |
| sources = [ |
| "src/args.rs", |
| "src/common.rs", |
| "src/lib.rs", |
| "src/subcommands/debug_bind/args.rs", |
| "src/subcommands/debug_bind/mod.rs", |
| "src/subcommands/device/args.rs", |
| "src/subcommands/device/mod.rs", |
| "src/subcommands/dump/args.rs", |
| "src/subcommands/dump/mod.rs", |
| "src/subcommands/i2c/args.rs", |
| "src/subcommands/i2c/mod.rs", |
| "src/subcommands/i2c/subcommands/mod.rs", |
| "src/subcommands/i2c/subcommands/ping/args.rs", |
| "src/subcommands/i2c/subcommands/ping/mod.rs", |
| "src/subcommands/i2c/subcommands/read/args.rs", |
| "src/subcommands/i2c/subcommands/read/mod.rs", |
| "src/subcommands/i2c/subcommands/transact/args.rs", |
| "src/subcommands/i2c/subcommands/transact/mod.rs", |
| "src/subcommands/i2c/subcommands/write/args.rs", |
| "src/subcommands/i2c/subcommands/write/mod.rs", |
| "src/subcommands/list/args.rs", |
| "src/subcommands/list/mod.rs", |
| "src/subcommands/list_devices/args.rs", |
| "src/subcommands/list_devices/mod.rs", |
| "src/subcommands/list_hosts/args.rs", |
| "src/subcommands/list_hosts/mod.rs", |
| "src/subcommands/lsblk/args.rs", |
| "src/subcommands/lsblk/guids.rs", |
| "src/subcommands/lsblk/mod.rs", |
| "src/subcommands/lspci/args.rs", |
| "src/subcommands/lspci/mod.rs", |
| "src/subcommands/lsusb/args.rs", |
| "src/subcommands/lsusb/mod.rs", |
| "src/subcommands/mod.rs", |
| "src/subcommands/print_input_report/args.rs", |
| "src/subcommands/print_input_report/mod.rs", |
| "src/subcommands/print_input_report/subcommands/descriptor/args.rs", |
| "src/subcommands/print_input_report/subcommands/descriptor/mod.rs", |
| "src/subcommands/print_input_report/subcommands/feature/args.rs", |
| "src/subcommands/print_input_report/subcommands/feature/mod.rs", |
| "src/subcommands/print_input_report/subcommands/get/args.rs", |
| "src/subcommands/print_input_report/subcommands/get/mod.rs", |
| "src/subcommands/print_input_report/subcommands/mod.rs", |
| "src/subcommands/print_input_report/subcommands/read/args.rs", |
| "src/subcommands/print_input_report/subcommands/read/mod.rs", |
| "src/subcommands/register/args.rs", |
| "src/subcommands/register/mod.rs", |
| "src/subcommands/restart/args.rs", |
| "src/subcommands/restart/mod.rs", |
| "src/subcommands/runtool/args.rs", |
| "src/subcommands/runtool/mod.rs", |
| ] |
| inputs = [ "//third_party/pciids/pci.ids.zst" ] |
| } |
| |
| fuchsia_unittest_package("driver_tools_tests") { |
| deps = [ ":lib_test" ] |
| } |
| |
| rustc_binary("driver_tools") { |
| edition = "2021" |
| name = "driver" |
| with_unit_tests = false |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.device.manager:fuchsia.device.manager-rustc", |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development-rustc", |
| "//sdk/fidl/fuchsia.driver.playground:fuchsia.driver.playground-rustc", |
| "//sdk/fidl/fuchsia.driver.registrar:fuchsia.driver.registrar-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| ] |
| sources = [ "src/main.rs" ] |
| } |