Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 7 additions & 32 deletions centipede/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,19 @@ package(default_visibility = DEFAULT_VISIBILITY)

licenses(["notice"])

exports_files([
"centipede_main.cc",
"seed_corpus_maker.cc",
])

################################################################################
# Binaries
################################################################################

cc_binary(
name = "centipede",
srcs = ["centipede_main.cc"],
compatible_with = [],
deps = [
":centipede_callbacks",
":centipede_default_callbacks",
Expand All @@ -52,41 +58,10 @@ cc_binary(
cc_uninstrumented_binary(
name = "centipede_uninstrumented",
binary = ":centipede",
compatible_with = [],
)

# A standalone seed corpus generator.
cc_binary(
name = "seed_corpus_maker",
srcs = ["seed_corpus_maker.cc"],
deps = [
":config_init",
":seed_corpus_maker_flags",
":seed_corpus_maker_proto_lib",
":util",
"@abseil-cpp//absl/base:nullability",
"@abseil-cpp//absl/flags:flag",
"@com_google_fuzztest//common:logging",
"@com_google_fuzztest//common:remote_file",
],
)

cc_binary(
name = "blob_file_converter",
srcs = ["blob_file_converter.cc"],
deps = [
":config_init",
":rusage_profiler",
"@abseil-cpp//absl/base:nullability",
"@abseil-cpp//absl/flags:flag",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/strings:str_format",
"@abseil-cpp//absl/time",
"@com_google_fuzztest//common:blob_file",
"@com_google_fuzztest//common:defs",
"@com_google_fuzztest//common:logging",
"@com_google_fuzztest//common:remote_file",
],
)

###############################################################################
# Proto libraries
Expand Down
54 changes: 19 additions & 35 deletions common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

# The package contains libraries that are common to both FuzzTest and Centipede.

load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:cc_test.bzl", "cc_test")

DEFAULT_VISIBILITY = ["//visibility:public"]
Expand Down Expand Up @@ -126,23 +125,21 @@ cc_library(
"//conditions:default": [],
}),
deps = [
":defs",
":logging",
":status_macros",
"@abseil-cpp//absl/base:nullability",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings",
] + select({
"//conditions:default": [":remote_file_oss"],
}) +
select({
"@com_google_fuzztest//fuzztest:disable_riegeli": [],
"//conditions:default": [
"@com_google_riegeli//riegeli/bytes:reader",
"@com_google_riegeli//riegeli/bytes:writer",
],
}),
":defs",
":logging",
":remote_file_oss",
":status_macros",
"@abseil-cpp//absl/base:nullability",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings",
] + select({
"@com_google_fuzztest//fuzztest:disable_riegeli": [],
"//conditions:default": [
"@com_google_riegeli//riegeli/bytes:reader",
"@com_google_riegeli//riegeli/bytes:writer",
],
}),
)

cc_library(
Expand All @@ -155,7 +152,6 @@ cc_library(
"@com_google_fuzztest//fuzztest:disable_riegeli": ["CENTIPEDE_DISABLE_RIEGELI"],
"//conditions:default": [],
}),
visibility = ["//visibility:private"],
deps = [
":defs",
":logging",
Expand Down Expand Up @@ -253,30 +249,18 @@ cc_test(
)

# TODO(b/324462306): Merge this with remote_file_test once the bug is fixed.
cc_library(
name = "remote_file_test_lib",
testonly = True,
exports_files(["remote_file_test.cc"])

cc_test(
name = "remote_file_test",
srcs = ["remote_file_test.cc"],
defines = select({
"//conditions:default": [],
}),
deps = [
":logging",
":remote_file",
":test_util",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/time",
"@googletest//:gtest",
] + select({
"//conditions:default": [],
}),
alwayslink = True,
)

cc_test(
name = "remote_file_test",
deps = [
":remote_file_test_lib",
"@googletest//:gtest_main",
],
)
73 changes: 70 additions & 3 deletions fuzztest/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,55 @@ cc_library(
],
)

cc_library(
name = "centipede_adaptor_hermetic",
srcs = ["centipede_adaptor.cc"],
hdrs = ["centipede_adaptor.h"],
defines = ["FUZZTEST_USE_CENTIPEDE"],
deps = [
":any",
":configuration",
":escaping",
":fixture_driver",
":flag_name",
":io_hermetic",
":logging",
":runtime",
":serialization",
":subprocess",
":table_of_recent_compares",
"@abseil-cpp//absl/algorithm:container",
"@abseil-cpp//absl/base:no_destructor",
"@abseil-cpp//absl/cleanup",
"@abseil-cpp//absl/functional:any_invocable",
"@abseil-cpp//absl/memory",
"@abseil-cpp//absl/random",
"@abseil-cpp//absl/random:distributions",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings",
"@abseil-cpp//absl/strings:str_format",
"@abseil-cpp//absl/strings:string_view",
"@abseil-cpp//absl/time",
"@abseil-cpp//absl/types:span",
"@com_google_fuzztest//centipede:centipede_callbacks",
"@com_google_fuzztest//centipede:centipede_default_callbacks",
"@com_google_fuzztest//centipede:centipede_interface",
"@com_google_fuzztest//centipede:centipede_runner_no_main",
"@com_google_fuzztest//centipede:environment",
"@com_google_fuzztest//centipede:fuzztest_mutator",
"@com_google_fuzztest//centipede:mutation_data",
"@com_google_fuzztest//centipede:runner_result",
"@com_google_fuzztest//centipede:stop",
"@com_google_fuzztest//centipede:workdir",
"@com_google_fuzztest//common:defs",
"@com_google_fuzztest//common:logging",
"@com_google_fuzztest//common:remote_file_oss",
"@com_google_fuzztest//common:temp_dir",
"@com_google_fuzztest//fuzztest/internal/domains:core_domains_impl",
],
)

cc_library(
name = "compatibility_mode",
srcs = ["compatibility_mode.cc"],
Expand Down Expand Up @@ -272,9 +321,27 @@ cc_library(
"@com_google_fuzztest//common:defs",
"@com_google_fuzztest//common:logging",
"@com_google_fuzztest//common:remote_file",
] + select({
"//conditions:default": [],
}),
],
)

cc_library(
name = "io_hermetic",
srcs = ["io.cc"],
hdrs = ["io.h"],
deps = [
":logging",
"@abseil-cpp//absl/functional:function_ref",
"@abseil-cpp//absl/hash",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/strings:str_format",
"@abseil-cpp//absl/strings:string_view",
"@abseil-cpp//absl/time",
"@abseil-cpp//absl/types:span",
"@com_google_fuzztest//common:blob_file",
"@com_google_fuzztest//common:defs",
"@com_google_fuzztest//common:logging",
"@com_google_fuzztest//common:remote_file_oss",
],
)

cc_test(
Expand Down
Loading