| # 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("//src/developer/ffx/build/ffx_plugin.gni") |
| import("//src/developer/ffx/build/ffx_tool.gni") |
| |
| ffx_plugin("ffx_fuzz") { |
| version = "0.1.0" |
| edition = "2021" |
| args_sources = [ "src/args.rs" ] |
| sources = [ |
| "src/autocomplete.rs", |
| "src/fuzzer.rs", |
| "src/lib.rs", |
| "src/options.rs", |
| "src/reader.rs", |
| "src/shell.rs", |
| ] |
| args_deps = [ "shell_args" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//src/developer/ffx/config:lib", |
| "//src/developer/ffx/lib/errors:lib", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer_rust", |
| "//src/sys/fuzzing/fuzzctl:lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:rustyline", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:termion", |
| "//third_party/rust_crates:url", |
| "//third_party/rust_crates:walkdir", |
| ] |
| args_with_unit_tests = true |
| args_test_deps = [ "//src/lib/fuchsia" ] |
| with_unit_tests = true |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//src/sys/fuzzing/fuzzctl/testing", |
| "//third_party/rust_crates:hex", |
| ] |
| } |
| |
| ffx_tool("ffx_fuzz_tool") { |
| edition = "2021" |
| output_name = "ffx-fuzz" |
| deps = [ |
| ":ffx_fuzz", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/lib/fuchsia-async", |
| ] |
| sources = [ "src/main.rs" ] |
| |
| sdk_target_name = "sdk" |
| sdk_category = "partner" |
| } |
| |
| group("fuzz") { |
| public_deps = [ |
| ":ffx_fuzz_tool", |
| ":ffx_fuzz_tool_host_tool", |
| ] |
| } |
| |
| group("bin") { |
| public_deps = [ ":ffx_fuzz_tool_versioned" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ffx_fuzz_tests($host_toolchain)" ] |
| } |