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

Unified Diff: components/policy/core/common/BUILD.gn

Issue 2791193005: Add fuzzer test for preg_parser (Closed)
Patch Set: Compile preg parser on Linux Created 3 years, 8 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
Index: components/policy/core/common/BUILD.gn
diff --git a/components/policy/core/common/BUILD.gn b/components/policy/core/common/BUILD.gn
index 17a586048824a59d4f09aaee003e300ed6eeb9d2..17217b1ad8741015d0bc8313ae8ed4612de3b605 100644
--- a/components/policy/core/common/BUILD.gn
+++ b/components/policy/core/common/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/features.gni")
+import("//testing/libfuzzer/fuzzer_test.gni")
group("common") {
if (is_component_build) {
@@ -156,7 +157,8 @@ source_set("internal") {
"ntdsapi.lib",
]
}
- if (is_win || is_chromeos) {
+ # Compile on Linux for fuzzer and since code is reused on Chrome OS.
+ if (is_win || is_linux) {
sources += [
"preg_parser.cc",
"preg_parser.h",
@@ -296,7 +298,7 @@ source_set("unit_tests") {
"schema_registry_unittest.cc",
"schema_unittest.cc",
]
- if (is_win || is_chromeos) {
+ if (is_win || is_linux) {
sources += [
"preg_parser_unittest.cc",
"registry_dict_unittest.cc",
@@ -327,7 +329,7 @@ source_set("unit_tests") {
if (is_mac || is_ios) {
sources += [ "mac_util_unittest.cc" ]
}
- if (is_win || is_chromeos) {
+ if (is_win || is_linux) {
# Needed by policy_loader_win_unittest.cc and preg_parser_unittest.cc
data = [
"//chrome/test/data/policy/",
@@ -347,3 +349,17 @@ source_set("unit_tests") {
"//testing/gtest",
]
}
+
+if (is_win || is_linux) {
+ fuzzer_test("preg_parser_fuzzer") {
+ sources = [
+ "preg_parser_fuzzer.cc",
+ ]
+ seed_corpus = "//chrome/test/data/policy/gpo/fuzzer_corpus"
+ dict = "//chrome/test/data/policy/gpo/fuzzer.dict"
+ deps = [
+ ":internal",
+ "//base",
+ ]
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698