Conditionalize PDFium fuzzers on pdf_enable_v8 GN variable
Otherwise setting pdf_enable_v8=false breaks chrome build. Change-Id: I86c3d369b4142ad05a986363839cbc6961772bc9 Reviewed-on: https://chromium-review.googlesource.com/c/1356010 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#612435}
This commit is contained in:
@ -6,8 +6,8 @@
|
||||
# When adding a fuzzer_test target make sure to add it to the group
|
||||
# 'pdf_fuzzers'
|
||||
|
||||
import("//testing/test.gni")
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
import("//third_party/pdfium/pdfium.gni")
|
||||
|
||||
group("fuzzers") {
|
||||
@ -16,7 +16,6 @@ group("fuzzers") {
|
||||
group("pdf_fuzzers") {
|
||||
testonly = true
|
||||
deps = [
|
||||
":pdf_cjs_util_fuzzer",
|
||||
":pdf_cmap_fuzzer",
|
||||
":pdf_codec_a85_fuzzer",
|
||||
":pdf_codec_fax_fuzzer",
|
||||
@ -24,7 +23,6 @@ group("pdf_fuzzers") {
|
||||
":pdf_codec_jbig2_fuzzer",
|
||||
":pdf_codec_rle_fuzzer",
|
||||
":pdf_font_fuzzer",
|
||||
":pdf_fx_date_helpers_fuzzer",
|
||||
":pdf_hint_table_fuzzer",
|
||||
":pdf_jpx_fuzzer",
|
||||
":pdf_psengine_fuzzer",
|
||||
@ -32,30 +30,36 @@ group("pdf_fuzzers") {
|
||||
":pdf_xml_fuzzer",
|
||||
":pdfium_fuzzer",
|
||||
]
|
||||
if (pdf_enable_xfa) {
|
||||
if (pdf_enable_v8) {
|
||||
deps += [
|
||||
":pdf_bidi_fuzzer",
|
||||
":pdf_cfx_barcode_fuzzer",
|
||||
":pdf_codec_jpeg_fuzzer",
|
||||
":pdf_css_fuzzer",
|
||||
":pdf_fm2js_fuzzer",
|
||||
":pdf_formcalc_fuzzer",
|
||||
":pdfium_xfa_fuzzer",
|
||||
":pdf_cjs_util_fuzzer",
|
||||
":pdf_fx_date_helpers_fuzzer",
|
||||
]
|
||||
if (pdf_enable_xfa_bmp) {
|
||||
deps += [ ":pdf_codec_bmp_fuzzer" ]
|
||||
}
|
||||
if (pdf_enable_xfa_gif) {
|
||||
if (pdf_enable_xfa) {
|
||||
deps += [
|
||||
":pdf_codec_gif_fuzzer",
|
||||
":pdf_lzw_fuzzer",
|
||||
":pdf_bidi_fuzzer",
|
||||
":pdf_cfx_barcode_fuzzer",
|
||||
":pdf_codec_jpeg_fuzzer",
|
||||
":pdf_css_fuzzer",
|
||||
":pdf_fm2js_fuzzer",
|
||||
":pdf_formcalc_fuzzer",
|
||||
":pdfium_xfa_fuzzer",
|
||||
]
|
||||
}
|
||||
if (pdf_enable_xfa_png) {
|
||||
deps += [ ":pdf_codec_png_fuzzer" ]
|
||||
}
|
||||
if (pdf_enable_xfa_tiff) {
|
||||
deps += [ ":pdf_codec_tiff_fuzzer" ]
|
||||
if (pdf_enable_xfa_bmp) {
|
||||
deps += [ ":pdf_codec_bmp_fuzzer" ]
|
||||
}
|
||||
if (pdf_enable_xfa_gif) {
|
||||
deps += [
|
||||
":pdf_codec_gif_fuzzer",
|
||||
":pdf_lzw_fuzzer",
|
||||
]
|
||||
}
|
||||
if (pdf_enable_xfa_png) {
|
||||
deps += [ ":pdf_codec_png_fuzzer" ]
|
||||
}
|
||||
if (pdf_enable_xfa_tiff) {
|
||||
deps += [ ":pdf_codec_tiff_fuzzer" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -69,13 +73,6 @@ fuzzer_test("pdfium_fuzzer") {
|
||||
seed_corpus = "//third_party/pdfium/testing/resources"
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_cjs_util_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_cjs_util_fuzzer_src",
|
||||
]
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_cmap_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
@ -119,13 +116,6 @@ fuzzer_test("pdf_codec_jbig2_fuzzer") {
|
||||
]
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_fx_date_helpers_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_fx_date_helpers_fuzzer_src",
|
||||
]
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_font_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
@ -170,117 +160,133 @@ fuzzer_test("pdf_xml_fuzzer") {
|
||||
dict = "dicts/pdf_xml.dict"
|
||||
}
|
||||
|
||||
if (pdf_enable_xfa) {
|
||||
if (pdf_enable_xfa_bmp) {
|
||||
fuzzer_test("pdf_codec_bmp_fuzzer") {
|
||||
if (pdf_enable_v8) {
|
||||
fuzzer_test("pdf_cjs_util_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_cjs_util_fuzzer_src",
|
||||
]
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_fx_date_helpers_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_fx_date_helpers_fuzzer_src",
|
||||
]
|
||||
}
|
||||
|
||||
if (pdf_enable_xfa) {
|
||||
if (pdf_enable_xfa_bmp) {
|
||||
fuzzer_test("pdf_codec_bmp_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_bmp_fuzzer_src",
|
||||
]
|
||||
seed_corpus = "corpora/pdf_codec_bmp"
|
||||
}
|
||||
}
|
||||
|
||||
if (pdf_enable_xfa_gif) {
|
||||
fuzzer_test("pdf_codec_gif_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_gif_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_codec_gif.dict"
|
||||
seed_corpus = "corpora/pdf_codec_gif"
|
||||
}
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_codec_jpeg_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_bmp_fuzzer_src",
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_jpeg_fuzzer_src",
|
||||
]
|
||||
seed_corpus = "corpora/pdf_codec_bmp"
|
||||
dict = "dicts/pdf_codec_jpeg.dict"
|
||||
seed_corpus = "corpora/pdf_codec_jpeg"
|
||||
}
|
||||
}
|
||||
|
||||
if (pdf_enable_xfa_gif) {
|
||||
fuzzer_test("pdf_codec_gif_fuzzer") {
|
||||
if (pdf_enable_xfa_png) {
|
||||
fuzzer_test("pdf_codec_png_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_png_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_codec_png.dict"
|
||||
seed_corpuses = [
|
||||
"corpora/pdf_codec_png",
|
||||
"//components/viz/test/data",
|
||||
"//third_party/blink/web_tests/images/png-suite/samples",
|
||||
"//third_party/blink/web_tests/images/resources/pngfuzz",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (pdf_enable_xfa_tiff) {
|
||||
fuzzer_test("pdf_codec_tiff_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_tiff_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_codec_tiff.dict"
|
||||
seed_corpus = "corpora/pdf_codec_tiff"
|
||||
}
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_css_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_gif_fuzzer_src",
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_css_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_codec_gif.dict"
|
||||
seed_corpus = "corpora/pdf_codec_gif"
|
||||
dict = "dicts/pdf_css.dict"
|
||||
}
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_codec_jpeg_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_jpeg_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_codec_jpeg.dict"
|
||||
seed_corpus = "corpora/pdf_codec_jpeg"
|
||||
}
|
||||
|
||||
if (pdf_enable_xfa_png) {
|
||||
fuzzer_test("pdf_codec_png_fuzzer") {
|
||||
fuzzer_test("pdf_fm2js_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_png_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_codec_png.dict"
|
||||
seed_corpuses = [
|
||||
"corpora/pdf_codec_png",
|
||||
"//components/viz/test/data",
|
||||
"//third_party/blink/web_tests/images/png-suite/samples",
|
||||
"//third_party/blink/web_tests/images/resources/pngfuzz",
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_fm2js_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_formcalc.dict"
|
||||
}
|
||||
}
|
||||
|
||||
if (pdf_enable_xfa_tiff) {
|
||||
fuzzer_test("pdf_codec_tiff_fuzzer") {
|
||||
fuzzer_test("pdf_formcalc_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_codec_tiff_fuzzer_src",
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_formcalc_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_codec_tiff.dict"
|
||||
seed_corpus = "corpora/pdf_codec_tiff"
|
||||
dict = "dicts/pdf_formcalc.dict"
|
||||
}
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_css_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_css_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_css.dict"
|
||||
}
|
||||
if (pdf_enable_xfa_gif) {
|
||||
fuzzer_test("pdf_lzw_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_lzw_fuzzer_src",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_fm2js_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_fm2js_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_formcalc.dict"
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_formcalc_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_formcalc_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf_formcalc.dict"
|
||||
}
|
||||
|
||||
if (pdf_enable_xfa_gif) {
|
||||
fuzzer_test("pdf_lzw_fuzzer") {
|
||||
fuzzer_test("pdf_bidi_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_lzw_fuzzer_src",
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_bidi_fuzzer_src",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_bidi_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_bidi_fuzzer_src",
|
||||
]
|
||||
}
|
||||
fuzzer_test("pdf_cfx_barcode_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_cfx_barcode_fuzzer_src",
|
||||
]
|
||||
}
|
||||
|
||||
fuzzer_test("pdf_cfx_barcode_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdf_cfx_barcode_fuzzer_src",
|
||||
]
|
||||
}
|
||||
|
||||
fuzzer_test("pdfium_xfa_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdfium_xfa_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf.dict"
|
||||
seed_corpus = "//third_party/pdfium/testing/resources"
|
||||
fuzzer_test("pdfium_xfa_fuzzer") {
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/pdfium/testing/fuzzers:pdfium_xfa_fuzzer_src",
|
||||
]
|
||||
dict = "dicts/pdf.dict"
|
||||
seed_corpus = "//third_party/pdfium/testing/resources"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user