blob: 1b050f48cf4e7f8ec5b44b6accc8c222681a3027 [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.gni")
import("//build/test.gni")
source_set("common") {
visibility = [ "//src/sys/*" ]
testonly = true
sources = [
"artifact.cc",
"artifact.h",
"async-deque.h",
"async-eventpair.cc",
"async-eventpair.h",
"async-socket.cc",
"async-socket.h",
"component-context.cc",
"component-context.h",
"controller-provider.cc",
"controller-provider.h",
"controller.cc",
"controller.h",
"corpus-reader-client.cc",
"corpus-reader-client.h",
"input.cc",
"input.h",
"module.h",
"monitor-clients.cc",
"monitor-clients.h",
"options.cc",
"options.h",
"options.inc",
"result.h",
"runner.cc",
"runner.h",
"sancov.h",
"shared-memory.cc",
"shared-memory.h",
"status.cc",
"status.h",
]
public_deps = [
"../fidl:fuchsia.fuzzer",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/backtrace-request",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zx",
]
}
source_set("runner-unittests-common") {
visibility = [ ":*" ]
testonly = true
sources = [
"runner-unittest.cc",
"runner-unittest.h",
]
public_deps = [
":common",
"//third_party/googletest:gtest",
]
deps = [ "testing" ]
}
source_set("runner-unittests") {
visibility = [ "../*" ]
testonly = true
sources = [ "runner-unittest.inc" ]
public_deps = [ ":runner-unittests-common" ]
}
source_set("runner-fatal-unittests") {
visibility = [ "../*" ]
testonly = true
sources = [ "runner-fatal-unittest.inc" ]
public_deps = [ ":runner-unittests-common" ]
}
test("unittests_bin") {
output_name = "component_fuzzing_common_unittests"
visibility = [ ":*" ]
testonly = true
sources = [
"async-deque-unittest.cc",
"async-eventpair-unittest.cc",
"async-socket-unittest.cc",
"controller-provider-unittest.cc",
"controller-unittest.cc",
"corpus-reader-client-unittest.cc",
"input-unittest.cc",
"monitor-clients-unittest.cc",
"options-unittest.cc",
"shared-memory-unittest.cc",
]
deps = [
":common",
"testing",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
fuchsia_component("unittests") {
visibility = [ ":*" ]
testonly = true
manifest = "meta/unittests.cml"
deps = [ ":unittests_bin" ]
}
fuchsia_test_package("tests") {
package_name = "component-fuzzing-common-tests"
test_components = [ ":unittests" ]
}