blob: b8f29845d73d8da3d16475831a24061d956240d2 [file] [log] [blame]
# 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.
group("target") {
if (is_fuzzer) {
deps = [ ":instrumented" ]
}
}
# Linking this source set into a target automatically connects to the engine.
# See `:no_hooks` for a source set more suitable for testing.
source_set("instrumented") {
sources = [ "instrumented-process.cc" ]
public_deps = [ ":no_hooks" ]
deps = [
"//build/validate:non_production_tag",
"//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 = [ "../*" ]
sources = [
"module.cc",
"module.h",
"process.cc",
"process.h",
"weak-symbols.h",
]
public_deps = [
"//sdk/fidl/fuchsia.debugdata:fuchsia.debugdata_hlcpp",
"//src/lib/fxl",
"//src/sys/fuzzing/common",
"//src/sys/fuzzing/fidl:fuchsia.fuzzer_hlcpp",
]
deps = [
"//build/validate:non_production_tag",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/debug:backtrace-request",
"//third_party/modp_b64",
]
}
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",
]
}