diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-21 08:35:34 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-21 08:37:56 +0000 |
commit | 2216621503e84718d4468504ff7fff333de7233b (patch) | |
tree | 1631ddbc2fa185fdbdbdbae1a34a9bb11584159a /mojo/system | |
parent | 07c70d207c4ed217286cdf84236551fce1d7923f (diff) | |
download | chromium_src-2216621503e84718d4468504ff7fff333de7233b.zip chromium_src-2216621503e84718d4468504ff7fff333de7233b.tar.gz chromium_src-2216621503e84718d4468504ff7fff333de7233b.tar.bz2 |
GN: Build rules and fixes for (almost) all mojo unittest targets
This writes GN rules for all mojo unittests except for the ones that
depend on view_manager which doesn't have GN build rules yet. This also
fixes up a few deps in the gyp rules such as targets unnecessarily
depending on mojo_cpp_bindings or base.
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/494523004
Cr-Commit-Position: refs/heads/master@{#291022}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/system')
-rw-r--r-- | mojo/system/BUILD.gn | 87 |
1 files changed, 47 insertions, 40 deletions
diff --git a/mojo/system/BUILD.gn b/mojo/system/BUILD.gn index c45c4c8..d8dcb75 100644 --- a/mojo/system/BUILD.gn +++ b/mojo/system/BUILD.gn @@ -12,33 +12,20 @@ config("system_config") { component("system") { output_name = "mojo_system_impl" + deps = [ + "//base", + "//base/third_party/dynamic_annotations", + "//mojo/embedder", + ] + + defines = [ + "MOJO_SYSTEM_IMPL_IMPLEMENTATION", + "MOJO_SYSTEM_IMPLEMENTATION", + ] + + all_dependent_configs = [ ":system_config" ] + sources = [ - # Should there be a separate "embedder" target? - "../embedder/channel_init.cc", - "../embedder/channel_init.h", - "../embedder/embedder.cc", - "../embedder/embedder.h", - "../embedder/platform_channel_pair.cc", - "../embedder/platform_channel_pair.h", - "../embedder/platform_channel_pair_posix.cc", - "../embedder/platform_channel_pair_win.cc", - "../embedder/platform_channel_utils_posix.cc", - "../embedder/platform_channel_utils_posix.h", - "../embedder/platform_handle.cc", - "../embedder/platform_handle.h", - "../embedder/platform_handle_utils.h", - "../embedder/platform_handle_utils_posix.cc", - "../embedder/platform_handle_utils_win.cc", - "../embedder/platform_handle_vector.h", - "../embedder/platform_shared_buffer.h", - "../embedder/platform_support.h", - "../embedder/scoped_platform_handle.h", - "../embedder/simple_platform_shared_buffer.cc", - "../embedder/simple_platform_shared_buffer.h", - "../embedder/simple_platform_shared_buffer_posix.cc", - "../embedder/simple_platform_shared_buffer_win.cc", - "../embedder/simple_platform_support.cc", - "../embedder/simple_platform_support.h", "channel.cc", "channel.h", "constants.h", @@ -93,23 +80,43 @@ component("system") { "waiter.h", "waiter_list.cc", "waiter_list.h", - # Test-only code: - # TODO(vtl): It's a little unfortunate that these end up in the same - # component as non-test-only code. In the static build, this code should - # hopefully be dead-stripped. - "../embedder/test_embedder.cc", - "../embedder/test_embedder.h", ] +} - defines = [ - "MOJO_SYSTEM_IMPL_IMPLEMENTATION", - "MOJO_SYSTEM_IMPLEMENTATION", - ] - - all_dependent_configs = [ ":system_config" ] - +# GYP version: mojo/mojo_base.gyp:mojo_system_unittests +test("mojo_system_unittests") { deps = [ + ":system", "//base", - "//base/third_party/dynamic_annotations", + "//mojo/common/test:test_support", + "//mojo/embedder:embedder_unittests", + "//testing/gtest", + ] + + sources = [ + "channel_unittest.cc", + "core_unittest.cc", + "core_test_base.cc", + "core_test_base.h", + "data_pipe_unittest.cc", + "dispatcher_unittest.cc", + "local_data_pipe_unittest.cc", + "memory_unittest.cc", + "message_pipe_dispatcher_unittest.cc", + "message_pipe_unittest.cc", + "multiprocess_message_pipe_unittest.cc", + "options_validation_unittest.cc", + "platform_handle_dispatcher_unittest.cc", + "raw_channel_unittest.cc", + "remote_message_pipe_unittest.cc", + "run_all_unittests.cc", + "shared_buffer_dispatcher_unittest.cc", + "simple_dispatcher_unittest.cc", + "test_utils.cc", + "test_utils.h", + "waiter_list_unittest.cc", + "waiter_test_utils.cc", + "waiter_test_utils.h", + "waiter_unittest.cc", ] } |