| # Copyright 2021 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/fuchsia_component.gni") |
| |
| source_set("coverage-lib") { |
| visibility = [ "../*" ] |
| testonly = true |
| sources = [ |
| "forwarder.cc", |
| "forwarder.h", |
| "instrumentation.cc", |
| "instrumentation.h", |
| "provider.cc", |
| "provider.h", |
| ] |
| public_deps = [ |
| "//src/lib/fxl", |
| "//src/sys/fuzzing/common", |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer", |
| "//src/sys/fuzzing/framework/target:no_hooks", |
| "//zircon/system/ulib/sync", |
| ] |
| deps = [ |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| ] |
| } |
| |
| executable("coverage-bin") { |
| output_name = "component_fuzzing_coverage" |
| testonly = true |
| sources = [ "coverage-main.cc" ] |
| deps = [ |
| ":coverage-lib", |
| "//sdk/lib/sys/cpp", |
| ] |
| } |
| |
| fuchsia_component("coverage") { |
| testonly = true |
| manifest = "meta/coverage.cml" |
| deps = [ ":coverage-bin" ] |
| } |
| |
| # Tests and test support. |
| |
| source_set("unittests") { |
| visibility = [ "../*" ] |
| testonly = true |
| sources = [ |
| "forwarder-unittest.cc", |
| "instrumentation-unittest.cc", |
| "provider-unittest.cc", |
| ] |
| deps = [ |
| ":coverage-lib", |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer", |
| "//src/sys/fuzzing/framework/testing", |
| "//third_party/googletest:gtest", |
| ] |
| } |