| # 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") | |
| fuchsia_package("fuzzctl") { | |
| testonly = true | |
| deps = [ | |
| ":bin", | |
| ":lib_fdomain", | |
| ] | |
| } | |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## | |
| # | |
| # ________ _________ ________ ________ | |
| # |\ ____\|\___ ___\\ __ \|\ __ \ | |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ | |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ | |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| | |
| # ____\_\ \ \ \__\ \ \_______\ \__\ | |
| # |\_________\ \|__| \|_______|\|__| | |
| # \|_________| | |
| # | |
| # | |
| # AUTO-GENERATED - DO NOT EDIT | |
| # | |
| # The targets below are auto-generated based on the targets defined in the | |
| # BUILD.bazel file from the same directory. If you made changes to targets in | |
| # Bazel, instead of editing this file manually, run: | |
| # | |
| # > fx bazel2gn | |
| # | |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and | |
| # rerun bazel2gn. | |
| import("//build/tools/bazel2gn/bazel_migration.gni") | |
| _LIB_SRCS = [ | |
| "src/artifact.rs", | |
| "src/constants.rs", | |
| "src/controller.rs", | |
| "src/corpus.rs", | |
| "src/diagnostics.rs", | |
| "src/duration.rs", | |
| "src/input.rs", | |
| "src/lib.rs", | |
| "src/manager.rs", | |
| "src/util.rs", | |
| "src/writer.rs", | |
| ] | |
| # To avoid "Assignment had no effect" from GN. | |
| # It's possible this variable is only used in if conditions (e.g. is_host). | |
| not_needed([ "_LIB_SRCS" ]) | |
| _LIB_DEPS = [ | |
| "//sdk/rust/zx-status", | |
| "//src/lib/diagnostics/data", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:hex", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:sha2", | |
| "//third_party/rust_crates:termion", | |
| "//third_party/rust_crates:url", | |
| ] | |
| # To avoid "Assignment had no effect" from GN. | |
| # It's possible this variable is only used in if conditions (e.g. is_host). | |
| not_needed([ "_LIB_DEPS" ]) | |
| rustc_library("lib") { | |
| sources = _LIB_SRCS | |
| crate_name = "fuchsia_fuzzctl" | |
| edition = "2024" | |
| visibility = [ | |
| ":*", | |
| "//src/sys/fuzzing/fuzzctl/testing:*", | |
| ] | |
| deps = [ | |
| "//src/lib/fdomain/client:flex_fidl", | |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer_rust_flex", | |
| ] + _LIB_DEPS | |
| } | |
| rustc_library("lib_fdomain") { | |
| sources = _LIB_SRCS | |
| features = [ "fdomain" ] | |
| crate_name = "fuchsia_fuzzctl_fdomain" | |
| edition = "2024" | |
| visibility = [ | |
| ":*", | |
| "//src/developer/ffx/plugins/fuzz:*", | |
| "//src/sys/fuzzing/fuzzctl/testing:*", | |
| ] | |
| deps = [ | |
| "//src/lib/fdomain/client:flex_fdomain", | |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer_rust_fdomain_flex", | |
| ] + _LIB_DEPS | |
| } | |
| rustc_binary("bin") { | |
| testonly = true | |
| sources = [ | |
| "src/args.rs", | |
| "src/fuzzctl.rs", | |
| "src/main.rs", | |
| ] | |
| output_name = "fuzz_ctl" | |
| edition = "2024" | |
| deps = [ | |
| ":lib", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-component", | |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer_rust", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:argh", | |
| "//third_party/rust_crates:regex", | |
| "//third_party/rust_crates:url", | |
| "//third_party/rust_crates:walkdir", | |
| ] | |
| } | |
| rustc_test("fuchsia_fuzzctl_lib_test") { | |
| sources = _LIB_SRCS | |
| edition = "2024" | |
| deps = [ | |
| "//src/lib/fdomain/client:flex_fidl", | |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer_rust_flex", | |
| ] + _LIB_DEPS + | |
| [ | |
| ":lib", | |
| "//src/lib/fuchsia", | |
| "//src/sys/fuzzing/fuzzctl/testing", | |
| ] | |
| } | |
| rustc_test("fuchsia_fuzzctl_fdomain_lib_test") { | |
| sources = _LIB_SRCS | |
| edition = "2024" | |
| deps = [ | |
| "//src/lib/fdomain/client:flex_fdomain", | |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer_rust_fdomain_flex", | |
| ] + _LIB_DEPS + | |
| [ | |
| ":lib_fdomain", | |
| "//src/lib/fuchsia", | |
| "//src/sys/fuzzing/fuzzctl/testing:testing_fdomain", | |
| ] | |
| features = [ "fdomain" ] | |
| } | |
| rustc_test("fuzz_ctl_bin_test") { | |
| sources = [ | |
| "src/args.rs", | |
| "src/fuzzctl.rs", | |
| "src/main.rs", | |
| ] | |
| edition = "2024" | |
| deps = [ | |
| ":lib", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-component", | |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer_rust", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:argh", | |
| "//third_party/rust_crates:regex", | |
| "//third_party/rust_crates:url", | |
| "//third_party/rust_crates:walkdir", | |
| ] + | |
| [ | |
| "//sdk/rust/zx", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//src/sys/fuzzing/fuzzctl/testing", | |
| ] | |
| source_root = "src/main.rs" | |
| } | |
| fuchsia_component_manifest("bin-unittests-manifest") { | |
| testonly = true | |
| component_name = "bin-unittests" | |
| manifest = "meta/bin-unittests.cml" | |
| } | |
| fuchsia_test_component("bin-unittests") { | |
| cm_label = ":bin-unittests-manifest" | |
| deps = [ ":fuzz_ctl_bin_test" ] | |
| } | |
| fuchsia_component_manifest("lib-unittests-manifest") { | |
| testonly = true | |
| component_name = "lib-unittests" | |
| manifest = "meta/lib-unittests.cml" | |
| } | |
| fuchsia_test_component("lib-unittests") { | |
| cm_label = ":lib-unittests-manifest" | |
| deps = [ ":fuchsia_fuzzctl_lib_test" ] | |
| } | |
| fuchsia_component_manifest("lib-fdomain-unittests-manifest") { | |
| testonly = true | |
| component_name = "lib-fdomain-unittests" | |
| manifest = "meta/lib-fdomain-unittests.cml" | |
| } | |
| fuchsia_test_component("lib-fdomain-unittests") { | |
| cm_label = ":lib-fdomain-unittests-manifest" | |
| deps = [ ":fuchsia_fuzzctl_fdomain_lib_test" ] | |
| } | |
| fuchsia_test_package("tests") { | |
| package_name = "fuzzctl-tests-gn" | |
| test_components = [ | |
| ":bin-unittests", | |
| ":lib-unittests", | |
| ":lib-fdomain-unittests", | |
| ] | |
| } |