From 76833a60164e77bd54c6f4d1cc62a79ded8edb90 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 12 Oct 2018 18:53:17 +0000 Subject: Split constants and testing build rules into their own BUILD.gn files. Change-Id: I3a100e1f009f18ee06959edf47d189d1bfdcb25a Reviewed-on: https://pdfium-review.googlesource.com/c/43944 Commit-Queue: Lei Zhang Reviewed-by: Henrique Nakashima --- testing/BUILD.gn | 41 +++++++++++++++++++++++++++++++++++++++++ testing/fuzzers/BUILD.gn | 12 ++++++------ testing/image_diff/BUILD.gn | 18 ++++++++++++++++++ 3 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 testing/BUILD.gn create mode 100644 testing/image_diff/BUILD.gn (limited to 'testing') diff --git a/testing/BUILD.gn b/testing/BUILD.gn new file mode 100644 index 0000000000..286921db2d --- /dev/null +++ b/testing/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright 2018 The PDFium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/jumbo.gni") +import("../pdfium.gni") + +jumbo_source_set("test_support") { + testonly = true + sources = [ + "fx_string_testhelpers.cpp", + "fx_string_testhelpers.h", + "string_write_stream.cpp", + "string_write_stream.h", + "test_support.cpp", + "test_support.h", + "utils/bitmap_saver.cpp", + "utils/bitmap_saver.h", + "utils/path_service.cpp", + "utils/path_service.h", + ] + data = [ + "resources/", + ] + deps = [ + "../:pdfium", + "image_diff", + "//testing/gmock", + "//testing/gtest", + ] + configs += [ "../:pdfium_core_config" ] + visibility = [ "../*" ] + + if (pdf_enable_v8) { + deps += [ + "//v8", + "//v8:v8_libplatform", + ] + configs += [ "//v8:external_startup_data" ] + } +} diff --git a/testing/fuzzers/BUILD.gn b/testing/fuzzers/BUILD.gn index 94f501ad65..c4c62f73cc 100644 --- a/testing/fuzzers/BUILD.gn +++ b/testing/fuzzers/BUILD.gn @@ -73,8 +73,8 @@ template("pdfium_public_fuzzer") { "pdfium_fuzzer_helper.h", ] deps = [ + "../:test_support", "../../:pdfium", - "../../:test_support", ] if (defined(invoker.deps)) { deps += invoker.deps @@ -136,7 +136,7 @@ if (pdf_enable_xfa) { "xfa_codec_fuzzer.h", ] deps = [ - "../../:test_support", + "../:test_support", ] } } @@ -148,7 +148,7 @@ if (pdf_enable_xfa) { "xfa_codec_fuzzer.h", ] deps = [ - "../../:test_support", + "../:test_support", ] } @@ -165,7 +165,7 @@ if (pdf_enable_xfa) { "xfa_codec_fuzzer.h", ] deps = [ - "../../:test_support", + "../:test_support", ] } @@ -176,7 +176,7 @@ if (pdf_enable_xfa) { "xfa_codec_fuzzer.h", ] deps = [ - "../../:test_support", + "../:test_support", ] } } @@ -188,7 +188,7 @@ if (pdf_enable_xfa) { "xfa_codec_fuzzer.h", ] deps = [ - "../../:test_support", + "../:test_support", ] } } diff --git a/testing/image_diff/BUILD.gn b/testing/image_diff/BUILD.gn new file mode 100644 index 0000000000..39261bac44 --- /dev/null +++ b/testing/image_diff/BUILD.gn @@ -0,0 +1,18 @@ +# Copyright 2018 The PDFium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/jumbo.gni") +import("../../pdfium.gni") + +jumbo_source_set("image_diff") { + testonly = true + sources = [ + "image_diff_png.cpp", + "image_diff_png.h", + ] + configs += [ "../../:pdfium_core_config" ] + deps = [ + "../../third_party:png", + ] +} -- cgit v1.2.3