blob: 2fca1b6e4f30bd7a9cc552b5636c84d0f8423632 [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.
import("//build/components/fuchsia_component.gni")
source_set("adapter-client") {
visibility = [ "../*" ]
testonly = true
sources = [
"adapter-client.cc",
"adapter-client.h",
"corpus.cc",
"corpus.h",
]
public_deps = [
"//sdk/lib/fidl/cpp",
"//src/lib/fxl",
"//src/sys/fuzzing/common",
"//src/sys/fuzzing/fidl:fuchsia.fuzzer",
"//zircon/system/ulib/sync",
]
deps = [
"//sdk/lib/syslog/cpp",
"//src/lib/files",
]
}
source_set("engine-lib") {
visibility = [ "../*" ]
testonly = true
sources = [
"coverage-client.cc",
"coverage-client.h",
"dictionary.cc",
"dictionary.h",
"module-pool.cc",
"module-pool.h",
"module-proxy.cc",
"module-proxy.h",
"mutagen.cc",
"mutagen.h",
"process-proxy.cc",
"process-proxy.h",
"runner.cc",
"runner.h",
]
public_deps = [
":adapter-client",
"//sdk/lib/fidl/cpp",
"//sdk/lib/fit",
"//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/syslog/cpp",
"//third_party/re2",
"//zircon/system/ulib/inspector",
]
}
executable("engine-bin") {
output_name = "component_fuzzing_engine"
testonly = true
sources = [ "engine-main.cc" ]
deps = [ ":engine-lib" ]
}
fuchsia_component("engine") {
testonly = true
manifest = "../meta/engine.cml"
deps = [ ":engine-bin" ]
}
# Tests and test support.
source_set("testing") {
visibility = [ ":*" ]
testonly = true
sources = [
"process-proxy-test.cc",
"process-proxy-test.h",
"runner-test.cc",
"runner-test.h",
]
public_deps = [
":engine-lib",
"../target:no_hooks",
"../testing",
"//src/sys/fuzzing/common:runner-unittests",
"//src/sys/fuzzing/common/testing",
"//src/sys/fuzzing/fidl:fuchsia.fuzzer",
"//third_party/googletest:gtest",
]
}
source_set("unittests") {
visibility = [ "../*" ]
testonly = true
sources = [
"adapter-client-unittest.cc",
"corpus-unittest.cc",
"coverage-client-unittest.cc",
"dictionary-unittest.cc",
"module-pool-unittest.cc",
"module-proxy-unittest.cc",
"mutagen-unittest.cc",
"process-proxy-unittest.cc",
"runner-unittest.cc",
]
deps = [
":testing",
"../testing:test-target",
"//src/lib/files",
"//src/sys/fuzzing/common:runner-unittests",
]
}
# These unit tests emit fatal logs.
source_set("fatal-unittests") {
visibility = [ "../*" ]
testonly = true
sources = [
"process-proxy-fatal-unittest.cc",
"runner-fatal-unittest.cc",
]
deps = [
":testing",
"../testing:test-target",
"//src/sys/fuzzing/common:runner-fatal-unittests",
]
}