| # 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/rust/rustc_library.gni") |
| import("//src/developer/ffx/build/ffx_tool.gni") |
| |
| assert(is_host, "ffx fuzz is intended for use with the host toolchain only") |
| |
| rustc_library("ffx_fuzz_args") { |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| sources = [ "src/args.rs" ] |
| source_root = "src/args.rs" |
| |
| deps = [ |
| "shell_args", |
| "//third_party/rust_crates:argh", |
| ] |
| |
| test_deps = [ "//src/lib/fuchsia" ] |
| } |
| |
| rustc_library("ffx_fuzz") { |
| version = "0.1.0" |
| edition = "2021" |
| |
| sources = [ |
| "src/autocomplete.rs", |
| "src/fuzzer.rs", |
| "src/lib.rs", |
| "src/options.rs", |
| "src/reader.rs", |
| "src/shell.rs", |
| ] |
| |
| deps = [ |
| ":ffx_fuzz_args", |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_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/developer/ffx/lib/target/holders:lib", |
| "//src/developer/ffx/lib/writer: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: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", |
| ] |
| |
| with_unit_tests = true |
| test_deps = [ |
| "//sdk/rust/zx-status", |
| "//src/lib/fuchsia", |
| "//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_args_test", |
| ":ffx_fuzz_test", |
| ] |
| } |