disable ImageBackgroundFilter.BackgroundFilterRotated_GL cc_unittests on Dr.Memory...
[chromium-blink-merge.git] / ipc / BUILD.gn
blob82b468852e224ea8b250dcc190b9de3278231ca7
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 component("ipc") {
8   sources = [
9     "attachment_broker.cc",
10     "attachment_broker.h",
11     "attachment_broker_messages.h",
12     "attachment_broker_privileged.cc",
13     "attachment_broker_privileged.h",
14     "attachment_broker_privileged_win.cc",
15     "attachment_broker_privileged_win.h",
16     "attachment_broker_unprivileged.cc",
17     "attachment_broker_unprivileged.h",
18     "attachment_broker_unprivileged_win.cc",
19     "attachment_broker_unprivileged_win.h",
20     "brokerable_attachment.cc",
21     "brokerable_attachment.h",
22     "handle_attachment_win.cc",
23     "handle_attachment_win.h",
24     "handle_win.cc",
25     "handle_win.h",
26     "ipc_channel.cc",
27     "ipc_channel.h",
28     "ipc_channel_common.cc",
29     "ipc_channel_factory.cc",
30     "ipc_channel_factory.h",
31     "ipc_channel_handle.h",
32     "ipc_channel_nacl.cc",
33     "ipc_channel_nacl.h",
34     "ipc_channel_posix.cc",
35     "ipc_channel_posix.h",
36     "ipc_channel_proxy.cc",
37     "ipc_channel_proxy.h",
38     "ipc_channel_reader.cc",
39     "ipc_channel_reader.h",
40     "ipc_channel_win.cc",
41     "ipc_channel_win.h",
42     "ipc_descriptors.h",
43     "ipc_endpoint.cc",
44     "ipc_endpoint.h",
45     "ipc_export.h",
46     "ipc_handle_win.cc",
47     "ipc_handle_win.h",
48     "ipc_listener.h",
49     "ipc_logging.cc",
50     "ipc_logging.h",
51     "ipc_message.cc",
52     "ipc_message.h",
53     "ipc_message_attachment.cc",
54     "ipc_message_attachment.h",
55     "ipc_message_attachment_set.cc",
56     "ipc_message_attachment_set.h",
57     "ipc_message_generator.cc",
58     "ipc_message_generator.h",
59     "ipc_message_macros.h",
60     "ipc_message_start.h",
61     "ipc_message_utils.cc",
62     "ipc_message_utils.h",
63     "ipc_param_traits.h",
64     "ipc_platform_file.cc",
65     "ipc_platform_file.h",
66     "ipc_platform_file_attachment_posix.cc",
67     "ipc_platform_file_attachment_posix.h",
68     "ipc_sender.h",
69     "ipc_switches.cc",
70     "ipc_switches.h",
71     "ipc_sync_channel.cc",
72     "ipc_sync_channel.h",
73     "ipc_sync_message.cc",
74     "ipc_sync_message.h",
75     "ipc_sync_message_filter.cc",
76     "ipc_sync_message_filter.h",
77     "message_filter.cc",
78     "message_filter.h",
79     "message_filter_router.cc",
80     "message_filter_router.h",
81     "param_traits_log_macros.h",
82     "param_traits_macros.h",
83     "param_traits_read_macros.h",
84     "param_traits_write_macros.h",
85     "placeholder_brokerable_attachment.cc",
86     "placeholder_brokerable_attachment.h",
87     "struct_constructor_macros.h",
88     "struct_destructor_macros.h",
89     "unix_domain_socket_util.cc",
90     "unix_domain_socket_util.h",
91   ]
93   if (is_nacl) {
94     sources -= [
95       "ipc_channel.cc",
96       "ipc_channel_posix.cc",
97       "unix_domain_socket_util.cc",
98     ]
99   } else {
100     sources -= [
101       "ipc_channel_nacl.cc",
102       "ipc_channel_nacl.h",
103     ]
104   }
106   if (is_win || is_ios) {
107     sources -= [ "unix_domain_socket_util.cc" ]
108   }
110   defines = [ "IPC_IMPLEMENTATION" ]
112   deps = [
113     "//base",
115     # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect.
116     "//base/third_party/dynamic_annotations",
117     "//crypto:crypto",
118   ]
121 # TODO(GYP): crbug.com/360936. Get this to build and run on Android.
122 if (!is_android) {
123   group("ipc_tests_run") {
124     testonly = true
125     deps = [
126       ":ipc_tests",
127     ]
128   }
130   test("ipc_tests") {
131     sources = [
132       "attachment_broker_privileged_win_unittest.cc",
133       "attachment_broker_unprivileged_win_unittest.cc",
134       "ipc_channel_posix_unittest.cc",
135       "ipc_channel_reader_unittest.cc",
136       "ipc_channel_unittest.cc",
137       "ipc_fuzzing_tests.cc",
138       "ipc_message_attachment_set_posix_unittest.cc",
139       "ipc_message_unittest.cc",
140       "ipc_message_utils_unittest.cc",
141       "ipc_send_fds_test.cc",
142       "ipc_sync_channel_unittest.cc",
143       "ipc_sync_message_unittest.cc",
144       "ipc_sync_message_unittest.h",
145       "ipc_test_message_generator.cc",
146       "ipc_test_message_generator.h",
147       "ipc_test_messages.h",
148       "sync_socket_unittest.cc",
149       "unix_domain_socket_util_unittest.cc",
150     ]
152     if (is_win || is_ios) {
153       sources -= [ "unix_domain_socket_util_unittest.cc" ]
154     }
156     # TODO(brettw) hook up Android testing.
157     #if (is_android && gtest_target_type == "shared_library") {
158     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
159     #}
161     # TODO(brettw) hook up tcmalloc to this target.
162     #if (is_posix && !is_mac && !is_android) {
163     #  if (use_allocator!="none") {
164     #    deps += "/base/allocator"
165     #  }
166     #}
168     deps = [
169       ":ipc",
170       ":test_support",
171       "//base",
172       "//base:i18n",
173       "//base/test:run_all_unittests",
174       "//base/test:test_support",
175       "//testing/gtest",
176     ]
177   }
179   test("ipc_perftests") {
180     sources = [
181       "ipc_perftests.cc",
182     ]
184     # TODO(brettw) hook up Android testing.
185     #if (is_android && gtest_target_type == "shared_library") {
186     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
187     #}
189     # TODO(brettw) hook up tcmalloc to this target.
190     #if (is_posix && !is_mac && !is_android) {
191     #  if (use_allocator!="none") {
192     #    deps += "//base/allocator"
193     #  }
194     #}
195     deps = [
196       ":ipc",
197       ":test_support",
198       "//base",
199       "//base:i18n",
200       "//base/test:test_support",
201       "//base/test:test_support_perf",
202       "//testing/gtest",
203     ]
204   }
207 static_library("test_support") {
208   testonly = true
209   sources = [
210     "ipc_multiprocess_test.cc",
211     "ipc_multiprocess_test.h",
212     "ipc_perftest_support.cc",
213     "ipc_perftest_support.h",
214     "ipc_security_test_util.cc",
215     "ipc_security_test_util.h",
216     "ipc_test_base.cc",
217     "ipc_test_base.h",
218     "ipc_test_channel_listener.cc",
219     "ipc_test_channel_listener.h",
220     "ipc_test_sink.cc",
221     "ipc_test_sink.h",
222   ]
223   deps = [
224     ":ipc",
225     "//base",
226     "//base/test:test_support",
227     "//testing/gtest",
228   ]