| # 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. |
| |
| # Linking this library into a target automatically connects to the engine. |
| # See `target_no_hooks` for a library more suitable for testing. |
| source_set("target") { |
| testonly = true |
| sources = [ "instrumented-process.cc" ] |
| public_deps = [ ":no_hooks" ] |
| deps = [ |
| "//sdk/lib/sys/cpp", |
| "//zircon/system/ulib/sync", |
| ] |
| } |
| |
| # Version of the `target` library that does not install hooks, and can be used for testing. |
| source_set("no_hooks") { |
| visibility = [ "../*" ] |
| testonly = true |
| sources = [ |
| "module.cc", |
| "module.h", |
| "process.cc", |
| "process.h", |
| "weak-symbols.h", |
| ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.debugdata", |
| "//src/lib/fxl", |
| "//src/sys/fuzzing/common", |
| "//src/sys/fuzzing/fidl:fuchsia.fuzzer", |
| ] |
| deps = [ |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//third_party/modp_b64", |
| "//zircon/system/ulib/backtrace-request", |
| ] |
| } |
| |
| source_set("main-wrapper") { |
| testonly = true |
| sources = [ "main-wrapper.cc" ] |
| } |
| |
| source_set("unittests") { |
| visibility = [ "../*" ] |
| testonly = true |
| sources = [ |
| "module-unittest.cc", |
| "process-unittest.cc", |
| ] |
| deps = [ |
| ":no_hooks", |
| "../engine:engine-lib", |
| "../testing", |
| "//src/sys/fuzzing/common/testing", |
| "//third_party/googletest:gtest", |
| ] |
| } |