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") |
| 6 |
5 if (is_android) { | 7 if (is_android) { |
6 import("//build/config/android/config.gni") | 8 import("//build/config/android/config.gni") |
7 import("//build/config/android/rules.gni") | 9 import("//build/config/android/rules.gni") |
8 } | 10 } |
9 | 11 |
10 config("system_config") { | 12 config("system_config") { |
11 defines = [ | 13 defines = [ |
12 # Ensures that dependent projects import the core functions on Windows. | 14 # Ensures that dependent projects import the core functions on Windows. |
13 "MOJO_USE_SYSTEM_IMPL", | 15 "MOJO_USE_SYSTEM_IMPL", |
14 ] | 16 ] |
15 } | 17 } |
16 | 18 |
17 component("system") { | 19 component("system") { |
18 output_name = "mojo_system_impl" | 20 output_name = "mojo_system_impl" |
19 | 21 |
20 sources = [ | 22 sources = [ |
| 23 "awakable.h", |
| 24 "awakable_list.cc", |
| 25 "awakable_list.h", |
21 "channel.cc", | 26 "channel.cc", |
22 "channel.h", | 27 "channel.h", |
23 "channel_endpoint.cc", | 28 "channel_endpoint.cc", |
24 "channel_endpoint.h", | 29 "channel_endpoint.h", |
25 "channel_endpoint_client.h", | 30 "channel_endpoint_client.h", |
26 "channel_endpoint_id.cc", | 31 "channel_endpoint_id.cc", |
27 "channel_endpoint_id.h", | 32 "channel_endpoint_id.h", |
28 "channel_info.cc", | 33 "channel_info.cc", |
29 "channel_info.h", | 34 "channel_info.h", |
30 "channel_manager.cc", | 35 "channel_manager.cc", |
31 "channel_manager.h", | 36 "channel_manager.h", |
32 "configuration.cc", | 37 "configuration.cc", |
33 "configuration.h", | 38 "configuration.h", |
34 "core.cc", | 39 "core.cc", |
35 "core.h", | 40 "core.h", |
36 "data_pipe.cc", | 41 "data_pipe.cc", |
37 "data_pipe.h", | 42 "data_pipe.h", |
38 "data_pipe_consumer_dispatcher.cc", | 43 "data_pipe_consumer_dispatcher.cc", |
39 "data_pipe_consumer_dispatcher.h", | 44 "data_pipe_consumer_dispatcher.h", |
40 "data_pipe_producer_dispatcher.cc", | 45 "data_pipe_producer_dispatcher.cc", |
41 "data_pipe_producer_dispatcher.h", | 46 "data_pipe_producer_dispatcher.h", |
42 "dispatcher.cc", | 47 "dispatcher.cc", |
43 "dispatcher.h", | 48 "dispatcher.h", |
| 49 "endpoint_relayer.cc", |
| 50 "endpoint_relayer.h", |
44 "handle_signals_state.h", | 51 "handle_signals_state.h", |
45 "handle_table.cc", | 52 "handle_table.cc", |
46 "handle_table.h", | 53 "handle_table.h", |
47 "local_data_pipe.cc", | 54 "local_data_pipe.cc", |
48 "local_data_pipe.h", | 55 "local_data_pipe.h", |
49 "local_message_pipe_endpoint.cc", | 56 "local_message_pipe_endpoint.cc", |
50 "local_message_pipe_endpoint.h", | 57 "local_message_pipe_endpoint.h", |
51 "mapping_table.cc", | 58 "mapping_table.cc", |
52 "mapping_table.h", | 59 "mapping_table.h", |
53 "memory.cc", | 60 "memory.cc", |
(...skipping 18 matching lines...) Expand all Loading... |
72 "raw_channel_posix.cc", | 79 "raw_channel_posix.cc", |
73 "raw_channel_win.cc", | 80 "raw_channel_win.cc", |
74 "shared_buffer_dispatcher.cc", | 81 "shared_buffer_dispatcher.cc", |
75 "shared_buffer_dispatcher.h", | 82 "shared_buffer_dispatcher.h", |
76 "simple_dispatcher.cc", | 83 "simple_dispatcher.cc", |
77 "simple_dispatcher.h", | 84 "simple_dispatcher.h", |
78 "transport_data.cc", | 85 "transport_data.cc", |
79 "transport_data.h", | 86 "transport_data.h", |
80 "waiter.cc", | 87 "waiter.cc", |
81 "waiter.h", | 88 "waiter.h", |
82 "waiter_list.cc", | |
83 "waiter_list.h", | |
84 ] | 89 ] |
85 | 90 |
86 defines = [ | 91 defines = [ |
87 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", | 92 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", |
88 "MOJO_SYSTEM_IMPLEMENTATION", | 93 "MOJO_SYSTEM_IMPLEMENTATION", |
89 ] | 94 ] |
90 | 95 |
91 all_dependent_configs = [ ":system_config" ] | 96 all_dependent_configs = [ ":system_config" ] |
92 | 97 |
93 public_deps = [ | 98 public_deps = [ |
94 "//mojo/edk/embedder", | 99 "../embedder", |
95 "//mojo/edk/embedder:platform", | 100 "../embedder:platform", |
96 "//mojo/public/c/system", | 101 "../../public/c/system", |
97 ] | 102 ] |
98 | 103 |
99 deps = [ | 104 deps = [ |
100 "//base", | 105 "//base", |
101 "//base/third_party/dynamic_annotations", | 106 "//base/third_party/dynamic_annotations", |
102 ] | 107 ] |
103 | 108 |
104 allow_circular_includes_from = [ "//mojo/edk/embedder" ] | 109 allow_circular_includes_from = [ "../embedder" ] |
| 110 } |
| 111 |
| 112 mojo_edk_source_set("test_utils") { |
| 113 testonly = true |
| 114 |
| 115 sources = [ |
| 116 "test_utils.cc", |
| 117 "test_utils.h", |
| 118 ] |
| 119 |
| 120 deps = [ |
| 121 "//base", |
| 122 "//base/test:test_support", |
| 123 ] |
105 } | 124 } |
106 | 125 |
107 # GYP version: mojo/edk/mojo_edk.gyp:mojo_system_unittests | 126 # GYP version: mojo/edk/mojo_edk.gyp:mojo_system_unittests |
108 test("mojo_system_unittests") { | 127 test("mojo_system_unittests") { |
109 sources = [ | 128 sources = [ |
110 "../test/multiprocess_test_helper_unittest.cc", | 129 "../test/multiprocess_test_helper_unittest.cc", |
| 130 "awakable_list_unittest.cc", |
111 "channel_endpoint_id_unittest.cc", | 131 "channel_endpoint_id_unittest.cc", |
112 "channel_manager_unittest.cc", | 132 "channel_manager_unittest.cc", |
113 "channel_unittest.cc", | 133 "channel_unittest.cc", |
114 "core_test_base.cc", | 134 "core_test_base.cc", |
115 "core_test_base.h", | 135 "core_test_base.h", |
116 "core_unittest.cc", | 136 "core_unittest.cc", |
117 "data_pipe_unittest.cc", | 137 "data_pipe_unittest.cc", |
118 "dispatcher_unittest.cc", | 138 "dispatcher_unittest.cc", |
119 "local_data_pipe_unittest.cc", | 139 "local_data_pipe_unittest.cc", |
120 "memory_unittest.cc", | 140 "memory_unittest.cc", |
121 "message_pipe_dispatcher_unittest.cc", | 141 "message_pipe_dispatcher_unittest.cc", |
122 "message_pipe_test_utils.cc", | 142 "message_pipe_test_utils.cc", |
123 "message_pipe_test_utils.h", | 143 "message_pipe_test_utils.h", |
124 "message_pipe_unittest.cc", | 144 "message_pipe_unittest.cc", |
125 "multiprocess_message_pipe_unittest.cc", | 145 "multiprocess_message_pipe_unittest.cc", |
126 "options_validation_unittest.cc", | 146 "options_validation_unittest.cc", |
127 "platform_handle_dispatcher_unittest.cc", | 147 "platform_handle_dispatcher_unittest.cc", |
128 "raw_channel_unittest.cc", | 148 "raw_channel_unittest.cc", |
129 "remote_message_pipe_unittest.cc", | 149 "remote_message_pipe_unittest.cc", |
130 "run_all_unittests.cc", | 150 "run_all_unittests.cc", |
131 "shared_buffer_dispatcher_unittest.cc", | 151 "shared_buffer_dispatcher_unittest.cc", |
132 "simple_dispatcher_unittest.cc", | 152 "simple_dispatcher_unittest.cc", |
133 | |
134 # TODO(vtl): Factor test_utils.* into their own source set. | |
135 "test_utils.cc", | |
136 "test_utils.h", | |
137 "waiter_list_unittest.cc", | |
138 "waiter_test_utils.cc", | 153 "waiter_test_utils.cc", |
139 "waiter_test_utils.h", | 154 "waiter_test_utils.h", |
140 "waiter_unittest.cc", | 155 "waiter_unittest.cc", |
141 ] | 156 ] |
142 | 157 |
143 deps = [ | 158 deps = [ |
144 ":system", | 159 ":system", |
| 160 ":test_utils", |
| 161 "../embedder:embedder_unittests", |
| 162 "../test:test_support", |
145 "//base", | 163 "//base", |
146 "//base/test:test_support", | 164 "//base/test:test_support", |
147 "//mojo/edk/embedder:embedder_unittests", | |
148 "//mojo/edk/test:test_support", | |
149 "//testing/gtest", | 165 "//testing/gtest", |
150 ] | 166 ] |
151 | 167 |
152 if (is_android) { | 168 if (is_android) { |
153 deps += [ "//testing/android:native_test_native_code" ] | 169 deps += [ "//testing/android:native_test_native_code" ] |
154 } | 170 } |
155 | 171 |
156 allow_circular_includes_from = [ "//mojo/edk/embedder:embedder_unittests" ] | 172 allow_circular_includes_from = [ "../embedder:embedder_unittests" ] |
157 } | 173 } |
158 | 174 |
159 # GYP version: mojo/edk/mojo_edk.gyp:mojo_message_pipe_perftests | 175 # GYP version: mojo/edk/mojo_edk.gyp:mojo_message_pipe_perftests |
160 test("mojo_message_pipe_perftests") { | 176 test("mojo_message_pipe_perftests") { |
161 sources = [ | 177 sources = [ |
162 "message_pipe_perftest.cc", | 178 "message_pipe_perftest.cc", |
163 "message_pipe_test_utils.h", | 179 "message_pipe_test_utils.h", |
164 "message_pipe_test_utils.cc", | 180 "message_pipe_test_utils.cc", |
165 "test_utils.cc", | |
166 "test_utils.h", | |
167 ] | 181 ] |
168 | 182 |
169 deps = [ | 183 deps = [ |
170 ":system", | 184 ":system", |
| 185 ":test_utils", |
| 186 "../test:test_support", |
171 "//base", | 187 "//base", |
172 "//base/test:test_support", | 188 "//base/test:test_support", |
173 "//base/test:test_support_perf", | 189 "//base/test:test_support_perf", |
174 "//mojo/edk/test:test_support", | |
175 "//testing/gtest", | 190 "//testing/gtest", |
176 ] | 191 ] |
177 } | 192 } |
178 | 193 |
179 if (is_android) { | 194 if (is_android) { |
180 unittest_apk("mojo_system_unittests_apk") { | 195 unittest_apk("mojo_system_unittests_apk") { |
181 deps = [ | 196 deps = [ |
182 ":mojo_system_unittests", | 197 ":mojo_system_unittests", |
183 ] | 198 ] |
184 unittests_dep = ":mojo_system_unittests" | 199 unittests_dep = ":mojo_system_unittests" |
185 } | 200 } |
186 } | 201 } |
OLD | NEW |