Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: testing/libfuzzer/fuzzer_test.gni

Issue 2610323002: [libfuzzer] support multiple seed_corpus directories. (Closed)
Patch Set: Add missing scripts Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/libfuzzer/efficient_fuzzer.md ('k') | testing/libfuzzer/tests/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/fuzzer_test.gni
diff --git a/testing/libfuzzer/fuzzer_test.gni b/testing/libfuzzer/fuzzer_test.gni
index bfdee49c69a741e7284b5b280d36c0f2f8e45ebb..8f4ef6e296dc72239f421816ac5c54783562a583 100644
--- a/testing/libfuzzer/fuzzer_test.gni
+++ b/testing/libfuzzer/fuzzer_test.gni
@@ -37,21 +37,34 @@ template("fuzzer_test") {
test_deps += invoker.deps
}
- if (defined(invoker.seed_corpus)) {
+ if (defined(invoker.seed_corpus) || defined(invoker.seed_corpuses)) {
+ assert(!(defined(invoker.seed_corpus) && defined(invoker.seed_corpuses)),
+ "Do not use both seed_corpus and seed_corpuses for $target_name.")
+
out = "$root_build_dir/$target_name" + "_seed_corpus.zip"
action(target_name + "_seed_corpus") {
script = "//testing/libfuzzer/archive_corpus.py"
+
args = [
- "--corpus",
- rebase_path(invoker.seed_corpus),
"--output",
rebase_path(out),
]
+ if (defined(invoker.seed_corpus)) {
+ args += [ rebase_path(invoker.seed_corpus) ]
+ }
+
+ if (defined(invoker.seed_corpuses)) {
+ foreach(seed_corpus_path, invoker.seed_corpuses) {
+ args += [ rebase_path(seed_corpus_path) ]
+ }
+ }
+
outputs = [
out,
]
+
deps = [
"//testing/libfuzzer:seed_corpus",
]
« no previous file with comments | « testing/libfuzzer/efficient_fuzzer.md ('k') | testing/libfuzzer/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698