Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No public description #1568

Closed
wants to merge 1 commit into from
Closed
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
17 changes: 16 additions & 1 deletion fuzztest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# FuzzTest: a coverage-guided fuzzing / property-based testing framework.

load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag")
load("@rules_proto//proto:defs.bzl", "proto_library")

package(default_visibility = ["//visibility:public"])
Expand Down Expand Up @@ -51,6 +51,21 @@ config_setting(
)
################################################################################

################################################################################
# Flag and setting to set FuzzTest version.
################################################################################
string_flag(
name = "version",
build_setting_default = "prod",
)

config_setting(
name = "for_canary",
flag_values = {":version": "canary"},
visibility = ["//visibility:public"],
)
################################################################################

cc_library(
name = "fuzztest",
hdrs = ["fuzztest.h"],
Expand Down
3 changes: 3 additions & 0 deletions fuzztest/init_fuzztest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ void RunSpecifiedFuzzTest(std::string_view name, std::string_view binary_id) {
}

void InitFuzzTest(int* argc, char*** argv, std::string_view binary_id) {
#ifdef FUZZTEST_CANARY
std::cout << "[*] FuzzTest is running in canary mode.\n";
#endif
auto& runtime = internal::Runtime::instance();
const bool is_listing = absl::GetFlag(FUZZTEST_FLAG(list_fuzz_tests));
if (is_listing) {
Expand Down