OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("../mojo_edk.gni") | 5 import("../mojo_edk.gni") |
6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
| 7 import("../../../third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") |
7 | 8 |
8 if (is_android) { | 9 if (is_android) { |
9 import("//build/config/android/config.gni") | 10 import("//build/config/android/config.gni") |
10 import("//build/config/android/rules.gni") | 11 import("//build/config/android/rules.gni") |
11 } | 12 } |
12 | 13 |
13 config("system_config") { | 14 config("system_config") { |
14 defines = [ | 15 defines = [ |
15 # Ensures that dependent projects import the core functions on Windows. | 16 # Ensures that dependent projects import the core functions on Windows. |
16 "MOJO_USE_SYSTEM_IMPL", | 17 "MOJO_USE_SYSTEM_IMPL", |
17 ] | 18 ] |
18 } | 19 } |
19 | 20 |
20 component("system") { | 21 mojom("master") { |
21 output_name = "mojo_system_impl" | 22 sources = [ |
| 23 "master.mojom", |
| 24 ] |
| 25 } |
| 26 |
| 27 static_library("system") { |
| 28 # TODO(use_chrome_edk): this should be a component to match third_party, |
| 29 # but since third_party includes it, we either make it a static library |
| 30 # or we have to change the export macros to be different than third_party. |
| 31 #component("system") { |
| 32 # TODO(use_chrome_edk): remove "2" |
| 33 output_name = "mojo_system_impl2" |
22 | 34 |
23 sources = [ | 35 sources = [ |
24 "async_waiter.cc", | 36 "async_waiter.cc", |
25 "async_waiter.h", | 37 "async_waiter.h", |
26 "awakable.h", | 38 "awakable.h", |
27 "awakable_list.cc", | 39 "awakable_list.cc", |
28 "awakable_list.h", | 40 "awakable_list.h", |
29 "channel.cc", | |
30 "channel.h", | |
31 "channel_endpoint.cc", | |
32 "channel_endpoint.h", | |
33 "channel_endpoint_client.h", | |
34 "channel_endpoint_id.cc", | |
35 "channel_endpoint_id.h", | |
36 "channel_id.h", | |
37 "channel_manager.cc", | |
38 "channel_manager.h", | |
39 "configuration.cc", | 41 "configuration.cc", |
40 "configuration.h", | 42 "configuration.h", |
41 "connection_identifier.h", | |
42 "connection_manager.cc", | |
43 "connection_manager.h", | |
44 "connection_manager_messages.h", | |
45 "core.cc", | 43 "core.cc", |
46 "core.h", | 44 "core.h", |
47 "data_pipe.cc", | 45 "data_pipe.cc", |
48 "data_pipe.h", | 46 "data_pipe.h", |
49 "data_pipe_consumer_dispatcher.cc", | 47 "data_pipe_consumer_dispatcher.cc", |
50 "data_pipe_consumer_dispatcher.h", | 48 "data_pipe_consumer_dispatcher.h", |
51 "data_pipe_impl.cc", | |
52 "data_pipe_impl.h", | |
53 "data_pipe_producer_dispatcher.cc", | 49 "data_pipe_producer_dispatcher.cc", |
54 "data_pipe_producer_dispatcher.h", | 50 "data_pipe_producer_dispatcher.h", |
55 "dispatcher.cc", | 51 "dispatcher.cc", |
56 "dispatcher.h", | 52 "dispatcher.h", |
57 "endpoint_relayer.cc", | |
58 "endpoint_relayer.h", | |
59 "handle_signals_state.h", | 53 "handle_signals_state.h", |
60 "handle_table.cc", | 54 "handle_table.cc", |
61 "handle_table.h", | 55 "handle_table.h", |
62 "incoming_endpoint.cc", | |
63 "incoming_endpoint.h", | |
64 "ipc_support.cc", | |
65 "ipc_support.h", | |
66 "local_data_pipe_impl.cc", | |
67 "local_data_pipe_impl.h", | |
68 "local_message_pipe_endpoint.cc", | |
69 "local_message_pipe_endpoint.h", | |
70 "mapping_table.cc", | 56 "mapping_table.cc", |
71 "mapping_table.h", | 57 "mapping_table.h", |
72 "master_connection_manager.cc", | 58 "master_impl.cc", |
73 "master_connection_manager.h", | 59 "master_impl.h", |
74 "memory.cc", | |
75 "memory.h", | |
76 "message_in_transit.cc", | 60 "message_in_transit.cc", |
77 "message_in_transit.h", | 61 "message_in_transit.h", |
78 "message_in_transit_queue.cc", | 62 "message_in_transit_queue.cc", |
79 "message_in_transit_queue.h", | 63 "message_in_transit_queue.h", |
80 "message_pipe.cc", | |
81 "message_pipe.h", | |
82 "message_pipe_dispatcher.cc", | 64 "message_pipe_dispatcher.cc", |
83 "message_pipe_dispatcher.h", | 65 "message_pipe_dispatcher.h", |
84 "message_pipe_endpoint.cc", | |
85 "message_pipe_endpoint.h", | |
86 "mutex.cc", | |
87 "mutex.h", | |
88 "options_validation.h", | 66 "options_validation.h", |
89 "platform_handle_dispatcher.cc", | 67 "platform_handle_dispatcher.cc", |
90 "platform_handle_dispatcher.h", | 68 "platform_handle_dispatcher.h", |
91 "process_identifier.h", | |
92 "proxy_message_pipe_endpoint.cc", | |
93 "proxy_message_pipe_endpoint.h", | |
94 "raw_channel.cc", | 69 "raw_channel.cc", |
95 "raw_channel.h", | 70 "raw_channel.h", |
96 "raw_channel_posix.cc", | 71 "raw_channel_posix.cc", |
97 "raw_channel_win.cc", | 72 "raw_channel_win.cc", |
98 "remote_consumer_data_pipe_impl.cc", | |
99 "remote_consumer_data_pipe_impl.h", | |
100 "remote_data_pipe_ack.h", | |
101 "remote_producer_data_pipe_impl.cc", | |
102 "remote_producer_data_pipe_impl.h", | |
103 "shared_buffer_dispatcher.cc", | 73 "shared_buffer_dispatcher.cc", |
104 "shared_buffer_dispatcher.h", | 74 "shared_buffer_dispatcher.h", |
105 "simple_dispatcher.cc", | 75 "simple_dispatcher.cc", |
106 "simple_dispatcher.h", | 76 "simple_dispatcher.h", |
107 "slave_connection_manager.cc", | |
108 "slave_connection_manager.h", | |
109 "thread_annotations.h", | |
110 "transport_data.cc", | 77 "transport_data.cc", |
111 "transport_data.h", | 78 "transport_data.h", |
112 "unique_identifier.cc", | |
113 "unique_identifier.h", | |
114 "waiter.cc", | 79 "waiter.cc", |
115 "waiter.h", | 80 "waiter.h", |
116 ] | 81 ] |
117 | 82 |
118 defines = [ | 83 defines = [ |
119 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", | 84 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", |
120 "MOJO_SYSTEM_IMPLEMENTATION", | 85 "MOJO_SYSTEM_IMPLEMENTATION", |
121 ] | 86 ] |
122 | 87 |
123 all_dependent_configs = [ ":system_config" ] | 88 all_dependent_configs = [ ":system_config" ] |
124 | 89 |
125 public_deps = [ | 90 public_deps = [ |
126 "../embedder", | 91 "../embedder", |
127 "../embedder:delegates", | 92 "../embedder:delegates", |
128 "../embedder:platform", | 93 "../embedder:platform", |
129 "../../public/c/system", | 94 "../../../third_party/mojo/src/mojo/public/c/system", |
130 "../../public/cpp/system", | 95 "../../../third_party/mojo/src/mojo/public/cpp/system", |
131 ] | 96 ] |
132 | 97 |
133 deps = [ | 98 deps = [ |
134 "//base", | 99 "//base", |
135 "//base/third_party/dynamic_annotations", | 100 "//base/third_party/dynamic_annotations", |
| 101 ":master", |
136 ] | 102 ] |
137 | 103 |
| 104 if (is_win) { |
| 105 cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()), |
| 106 # which is uninteresting. |
| 107 } |
| 108 |
138 allow_circular_includes_from = [ "../embedder" ] | 109 allow_circular_includes_from = [ "../embedder" ] |
139 } | 110 } |
140 | 111 |
141 group("tests") { | 112 group("tests") { |
142 testonly = true | 113 testonly = true |
143 deps = [ | 114 deps = [ |
144 ":mojo_system_unittests", | 115 # TODO(use_chrome_edk): remove "2" |
145 ":mojo_message_pipe_perftests", | 116 ":mojo_system_unittests2", |
| 117 ":mojo_message_pipe_perftests2", |
146 ] | 118 ] |
147 } | 119 } |
148 | 120 |
149 mojo_edk_source_set("test_utils") { | 121 mojo_edk_source_set("test_utils") { |
150 testonly = true | 122 testonly = true |
151 | 123 |
152 sources = [ | 124 sources = [ |
153 "test_utils.cc", | 125 "test_utils.cc", |
154 "test_utils.h", | 126 "test_utils.h", |
155 ] | 127 ] |
156 | 128 |
157 mojo_sdk_public_deps = [ | 129 public_deps = [ |
158 "mojo/public/c/system", | 130 "//third_party/mojo/src/mojo/public/c/system", |
159 "mojo/public/cpp/system", | 131 "//third_party/mojo/src/mojo/public/cpp/system", |
160 ] | 132 ] |
161 | 133 |
162 deps = [ | 134 deps = [ |
163 "//base", | 135 "//base", |
164 "//base/test:test_support", | 136 "//base/test:test_support", |
| 137 "//mojo/edk/test:test_support", |
| 138 "//testing/gtest:gtest", |
165 ] | 139 ] |
166 } | 140 } |
167 | 141 |
168 test("mojo_system_unittests") { | 142 # TODO(use_chrome_edk): remove "2" |
| 143 test("mojo_system_unittests2") { |
169 sources = [ | 144 sources = [ |
170 "../test/multiprocess_test_helper_unittest.cc", | 145 "../test/multiprocess_test_helper_unittest.cc", |
171 "awakable_list_unittest.cc", | 146 "awakable_list_unittest.cc", |
172 "channel_endpoint_id_unittest.cc", | |
173 "channel_endpoint_unittest.cc", | |
174 "channel_manager_unittest.cc", | |
175 "channel_test_base.cc", | |
176 "channel_test_base.h", | |
177 "channel_unittest.cc", | |
178 "connection_manager_unittest.cc", | |
179 "core_test_base.cc", | 147 "core_test_base.cc", |
180 "core_test_base.h", | 148 "core_test_base.h", |
181 "core_unittest.cc", | 149 "core_unittest.cc", |
182 "data_pipe_impl_unittest.cc", | |
183 "data_pipe_unittest.cc", | 150 "data_pipe_unittest.cc", |
184 "dispatcher_unittest.cc", | 151 "dispatcher_unittest.cc", |
185 "endpoint_relayer_unittest.cc", | 152 "master_impl_unittest.cc", |
186 "ipc_support_unittest.cc", | 153 |
187 "memory_unittest.cc", | |
188 "message_in_transit_queue_unittest.cc", | 154 "message_in_transit_queue_unittest.cc", |
189 "message_in_transit_test_utils.cc", | 155 "message_in_transit_test_utils.cc", |
190 "message_in_transit_test_utils.h", | 156 "message_in_transit_test_utils.h", |
191 "message_pipe_dispatcher_unittest.cc", | |
192 "message_pipe_test_utils.cc", | 157 "message_pipe_test_utils.cc", |
193 "message_pipe_test_utils.h", | 158 "message_pipe_test_utils.h", |
194 "message_pipe_unittest.cc", | 159 "message_pipe_unittest.cc", |
195 "multiprocess_message_pipe_unittest.cc", | 160 "multiprocess_message_pipe_unittest.cc", |
196 "mutex_unittest.cc", | |
197 "options_validation_unittest.cc", | 161 "options_validation_unittest.cc", |
198 "platform_handle_dispatcher_unittest.cc", | 162 "platform_handle_dispatcher_unittest.cc", |
| 163 |
199 "raw_channel_unittest.cc", | 164 "raw_channel_unittest.cc", |
200 "remote_data_pipe_impl_unittest.cc", | |
201 "remote_message_pipe_unittest.cc", | |
202 "run_all_unittests.cc", | 165 "run_all_unittests.cc", |
203 "shared_buffer_dispatcher_unittest.cc", | 166 "shared_buffer_dispatcher_unittest.cc", |
204 "simple_dispatcher_unittest.cc", | 167 "simple_dispatcher_unittest.cc", |
205 "test_channel_endpoint_client.cc", | |
206 "test_channel_endpoint_client.h", | |
207 "thread_annotations_unittest.cc", | |
208 "unique_identifier_unittest.cc", | |
209 "waiter_test_utils.cc", | 168 "waiter_test_utils.cc", |
210 "waiter_test_utils.h", | 169 "waiter_test_utils.h", |
211 "waiter_unittest.cc", | 170 "waiter_unittest.cc", |
212 ] | 171 ] |
213 | 172 |
214 deps = [ | 173 deps = [ |
215 ":system", | 174 ":system", |
216 ":test_utils", | 175 ":test_utils", |
217 "../embedder:embedder_unittests", | 176 |
| 177 # TODO(use_chrome_edk): remove "2" |
| 178 "../embedder:embedder_unittests2", |
| 179 "../../../third_party/mojo/src/mojo/public/cpp/environment:standalone", |
218 "../test:test_support", | 180 "../test:test_support", |
219 "//base", | 181 "//base", |
220 "//base/test:test_support", | 182 "//base/test:test_support", |
221 "//testing/gtest", | 183 "//testing/gtest", |
222 ] | 184 ] |
223 | 185 |
224 allow_circular_includes_from = [ "../embedder:embedder_unittests" ] | 186 # TODO(use_chrome_edk): remove "2" |
| 187 allow_circular_includes_from = [ "../embedder:embedder_unittests2" ] |
225 } | 188 } |
226 | 189 |
227 test("mojo_message_pipe_perftests") { | 190 # TODO(use_chrome_edk): remove "2" |
| 191 test("mojo_message_pipe_perftests2") { |
228 sources = [ | 192 sources = [ |
229 "message_pipe_perftest.cc", | 193 "message_pipe_perftest.cc", |
230 "message_pipe_test_utils.cc", | 194 "message_pipe_test_utils.cc", |
231 "message_pipe_test_utils.h", | 195 "message_pipe_test_utils.h", |
232 ] | 196 ] |
233 | 197 |
234 deps = [ | 198 deps = [ |
235 ":system", | 199 ":system", |
236 ":test_utils", | 200 ":test_utils", |
237 "../test:test_support", | 201 "../test:test_support", |
| 202 "../test:run_all_perftests", |
| 203 "../../../third_party/mojo/src/mojo/public/cpp/environment:standalone", |
238 "//base", | 204 "//base", |
239 "//base/test:test_support", | 205 "//base/test:test_support", |
240 "//base/test:test_support_perf", | |
241 "//testing/gtest", | 206 "//testing/gtest", |
242 ] | 207 ] |
243 } | 208 } |
OLD | NEW |