aboutsummaryrefslogtreecommitdiff
path: root/bazel
diff options
context:
space:
mode:
authorFabian Meumertzheim <fabian@meumertzhe.im>2022-08-26 23:35:51 +0200
committerFabian Meumertzheim <fabian@meumertzhe.im>2022-08-29 11:20:51 +0200
commit01d548ea147c88dba34d54583ff6713f3ca865d7 (patch)
tree517de9d6e936e597754163e1f139ca534e4b1ff6 /bazel
parentf3f692af776927dfa5f67678c8773843d5e0bd1b (diff)
downloadjazzer-api-01d548ea147c88dba34d54583ff6713f3ca865d7.tar.gz
driver: Add support for multiple @FuzzTests per class
Gets rid of a somewhat artifical limitation that would have been difficult (and pointless) to enforce in JUnit at the minor cost of introducing one more flag.
Diffstat (limited to 'bazel')
-rw-r--r--bazel/fuzz_target.bzl3
1 files changed, 3 insertions, 0 deletions
diff --git a/bazel/fuzz_target.bzl b/bazel/fuzz_target.bzl
index b37ff72d..0bc8e57d 100644
--- a/bazel/fuzz_target.bzl
+++ b/bazel/fuzz_target.bzl
@@ -15,6 +15,7 @@
def java_fuzz_target_test(
name,
target_class = None,
+ target_method = None,
deps = [],
hook_jar = None,
data = [],
@@ -36,6 +37,8 @@ def java_fuzz_target_test(
deploy_manifest_lines = []
if target_class:
deploy_manifest_lines.append("Jazzer-Fuzz-Target-Class: %s" % target_class)
+ if target_method:
+ fuzzer_args = list(fuzzer_args) + ["--target_method=" + target_method]
# Deps can only be specified on java_binary targets with sources, which
# excludes e.g. Kotlin libraries wrapped into java_binary via runtime_deps.