diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-15 23:48:29 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-15 23:48:29 +0000 |
commit | f03f7810c30cb3d01517c0efc189d68e440c9162 (patch) | |
tree | f33e92d77b99b55bb2ae8dba6ba374cf3c6cb5f3 /testing | |
parent | 1987bbfdbcc15e6954aa1340d1a55fda4a532914 (diff) | |
download | pdfium-f03f7810c30cb3d01517c0efc189d68e440c9162.tar.xz |
Split pdfium_unittests sources.
Move foo_unittest.cpp to the same BUILD.gn file as foo.cpp.
Set up dependencies to make pdfium_unittests pass gn check.
Change-Id: Id9f649d5d0c76fe4254f3887778516abb75fcbce
Reviewed-on: https://pdfium-review.googlesource.com/c/43995
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/BUILD.gn | 1 | ||||
-rw-r--r-- | testing/test.gni | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 0dd6a82071..c231e2207f 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -10,6 +10,7 @@ jumbo_source_set("test_support") { sources = [ "fx_string_testhelpers.cpp", "fx_string_testhelpers.h", + "pseudo_retainable.h", "string_write_stream.cpp", "string_write_stream.h", "test_support.cpp", diff --git a/testing/test.gni b/testing/test.gni index b69a0706ec..0bfac4666c 100644 --- a/testing/test.gni +++ b/testing/test.gni @@ -263,3 +263,24 @@ set_defaults("test") { configs = default_executable_configs } } + +template("pdfium_unittest_source_set") { + source_set(target_name) { + _pdfium_root_dir = rebase_path(invoker.pdfium_root_dir, ".") + + testonly = true + sources = invoker.sources + configs += [ _pdfium_root_dir + ":pdfium_core_config" ] + if (defined(invoker.configs)) { + configs += invoker.configs + } + deps = [ + _pdfium_root_dir + ":pdfium_unittest_deps", + ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + visibility = [ _pdfium_root_dir + ":*" ] + forward_variables_from(invoker, [ "cflags" ]) + } +} |