| 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 |
| 21 mojom("master") { |
| 22 sources = [ |
| 23 "master.mojom", |
| 24 ] |
| 25 } |
| 26 |
| 20 component("system") { | 27 component("system") { |
| 21 output_name = "mojo_system_impl" | 28 output_name = "mojo_system_impl" |
| 22 | 29 |
| 23 sources = [ | 30 sources = [ |
| 24 "async_waiter.cc", | 31 "async_waiter.cc", |
| 25 "async_waiter.h", | 32 "async_waiter.h", |
| 26 "awakable.h", | 33 "awakable.h", |
| 27 "awakable_list.cc", | 34 "awakable_list.cc", |
| 28 "awakable_list.h", | 35 "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", | 36 "configuration.cc", |
| 40 "configuration.h", | 37 "configuration.h", |
| 41 "connection_identifier.h", | |
| 42 "connection_manager.cc", | |
| 43 "connection_manager.h", | |
| 44 "connection_manager_messages.h", | |
| 45 "core.cc", | 38 "core.cc", |
| 46 "core.h", | 39 "core.h", |
| 47 "data_pipe.cc", | 40 "data_pipe.cc", |
| 48 "data_pipe.h", | 41 "data_pipe.h", |
| 49 "data_pipe_consumer_dispatcher.cc", | 42 "data_pipe_consumer_dispatcher.cc", |
| 50 "data_pipe_consumer_dispatcher.h", | 43 "data_pipe_consumer_dispatcher.h", |
| 51 "data_pipe_impl.cc", | |
| 52 "data_pipe_impl.h", | |
| 53 "data_pipe_producer_dispatcher.cc", | 44 "data_pipe_producer_dispatcher.cc", |
| 54 "data_pipe_producer_dispatcher.h", | 45 "data_pipe_producer_dispatcher.h", |
| 55 "dispatcher.cc", | 46 "dispatcher.cc", |
| 56 "dispatcher.h", | 47 "dispatcher.h", |
| 57 "endpoint_relayer.cc", | |
| 58 "endpoint_relayer.h", | |
| 59 "handle_signals_state.h", | 48 "handle_signals_state.h", |
| 60 "handle_table.cc", | 49 "handle_table.cc", |
| 61 "handle_table.h", | 50 "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", | 51 "mapping_table.cc", |
| 71 "mapping_table.h", | 52 "mapping_table.h", |
| 72 "master_connection_manager.cc", | 53 "master_impl.cc", |
| 73 "master_connection_manager.h", | 54 "master_impl.h", |
| 74 "memory.cc", | 55 "memory.cc", |
| 75 "memory.h", | 56 "memory.h", |
| 76 "message_in_transit.cc", | 57 "message_in_transit.cc", |
| 77 "message_in_transit.h", | 58 "message_in_transit.h", |
| 78 "message_in_transit_queue.cc", | 59 "message_in_transit_queue.cc", |
| 79 "message_in_transit_queue.h", | 60 "message_in_transit_queue.h", |
| 80 "message_pipe.cc", | |
| 81 "message_pipe.h", | |
| 82 "message_pipe_dispatcher.cc", | 61 "message_pipe_dispatcher.cc", |
| 83 "message_pipe_dispatcher.h", | 62 "message_pipe_dispatcher.h", |
| 84 "message_pipe_endpoint.cc", | |
| 85 "message_pipe_endpoint.h", | |
| 86 "mutex.cc", | |
| 87 "mutex.h", | |
| 88 "options_validation.h", | 63 "options_validation.h", |
| 89 "platform_handle_dispatcher.cc", | 64 "platform_handle_dispatcher.cc", |
| 90 "platform_handle_dispatcher.h", | 65 "platform_handle_dispatcher.h", |
| 91 "process_identifier.h", | 66 "process_identifier.h", |
| 92 "proxy_message_pipe_endpoint.cc", | |
| 93 "proxy_message_pipe_endpoint.h", | |
| 94 "raw_channel.cc", | 67 "raw_channel.cc", |
| 95 "raw_channel.h", | 68 "raw_channel.h", |
| 96 "raw_channel_posix.cc", | 69 "raw_channel_posix.cc", |
| 97 "raw_channel_win.cc", | 70 "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", | 71 "shared_buffer_dispatcher.cc", |
| 104 "shared_buffer_dispatcher.h", | 72 "shared_buffer_dispatcher.h", |
| 105 "simple_dispatcher.cc", | 73 "simple_dispatcher.cc", |
| 106 "simple_dispatcher.h", | 74 "simple_dispatcher.h", |
| 107 "slave_connection_manager.cc", | |
| 108 "slave_connection_manager.h", | |
| 109 "thread_annotations.h", | |
| 110 "transport_data.cc", | 75 "transport_data.cc", |
| 111 "transport_data.h", | 76 "transport_data.h", |
| 112 "unique_identifier.cc", | |
| 113 "unique_identifier.h", | |
| 114 "waiter.cc", | 77 "waiter.cc", |
| 115 "waiter.h", | 78 "waiter.h", |
| 116 ] | 79 ] |
| 117 | 80 |
| 118 defines = [ | 81 defines = [ |
| 119 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", | 82 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", |
| 120 "MOJO_SYSTEM_IMPLEMENTATION", | 83 "MOJO_SYSTEM_IMPLEMENTATION", |
| 121 ] | 84 ] |
| 122 | 85 |
| 123 all_dependent_configs = [ ":system_config" ] | 86 all_dependent_configs = [ ":system_config" ] |
| 124 | 87 |
| 125 public_deps = [ | 88 public_deps = [ |
| 126 "../embedder", | 89 "../embedder", |
| 127 "../embedder:delegates", | 90 "../embedder:delegates", |
| 128 "../embedder:platform", | 91 "../embedder:platform", |
| 129 "../../public/c/system", | 92 "../../../third_party/mojo/src/mojo/public/c/system", |
| 130 "../../public/cpp/system", | 93 "../../../third_party/mojo/src/mojo/public/cpp/system", |
| 131 ] | 94 ] |
| 132 | 95 |
| 133 deps = [ | 96 deps = [ |
| 134 "//base", | 97 "//base", |
| 135 "//base/third_party/dynamic_annotations", | 98 "//base/third_party/dynamic_annotations", |
| 99 ":master", |
| 136 ] | 100 ] |
| 137 | 101 |
| 102 if (is_win) { |
| 103 cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()), |
| 104 # which is uninteresting. |
| 105 } |
| 106 |
| 138 allow_circular_includes_from = [ "../embedder" ] | 107 allow_circular_includes_from = [ "../embedder" ] |
| 139 } | 108 } |
| 140 | 109 |
| 141 group("tests") { | 110 group("tests") { |
| 142 testonly = true | 111 testonly = true |
| 143 deps = [ | 112 deps = [ |
| 144 ":mojo_system_unittests", | 113 ":mojo_system_unittests", |
| 145 ":mojo_message_pipe_perftests", | 114 ":mojo_message_pipe_perftests", |
| 146 ] | 115 ] |
| 147 } | 116 } |
| 148 | 117 |
| 149 mojo_edk_source_set("test_utils") { | 118 mojo_edk_source_set("test_utils") { |
| 150 testonly = true | 119 testonly = true |
| 151 | 120 |
| 152 sources = [ | 121 sources = [ |
| 153 "test_utils.cc", | 122 "test_utils.cc", |
| 154 "test_utils.h", | 123 "test_utils.h", |
| 155 ] | 124 ] |
| 156 | 125 |
| 157 mojo_sdk_public_deps = [ | 126 public_deps = [ |
| 158 "mojo/public/c/system", | 127 "//third_party/mojo/src/mojo/public/c/system", |
| 159 "mojo/public/cpp/system", | 128 "//third_party/mojo/src/mojo/public/cpp/system", |
| 160 ] | 129 ] |
| 161 | 130 |
| 162 deps = [ | 131 deps = [ |
| 163 "//base", | 132 "//base", |
| 164 "//base/test:test_support", | 133 "//base/test:test_support", |
| 165 ] | 134 ] |
| 166 } | 135 } |
| 167 | 136 |
| 168 test("mojo_system_unittests") { | 137 test("mojo_system_unittests") { |
| 169 sources = [ | 138 sources = [ |
| 170 "../test/multiprocess_test_helper_unittest.cc", | 139 "../test/multiprocess_test_helper_unittest.cc", |
| 171 "awakable_list_unittest.cc", | 140 "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", | 141 "core_test_base.cc", |
| 180 "core_test_base.h", | 142 "core_test_base.h", |
| 181 "core_unittest.cc", | 143 "core_unittest.cc", |
| 182 "data_pipe_impl_unittest.cc", | |
| 183 "data_pipe_unittest.cc", | 144 "data_pipe_unittest.cc", |
| 184 "dispatcher_unittest.cc", | 145 "dispatcher_unittest.cc", |
| 185 "endpoint_relayer_unittest.cc", | 146 "master_impl_unittest.cc", |
| 186 "ipc_support_unittest.cc", | |
| 187 "memory_unittest.cc", | 147 "memory_unittest.cc", |
| 188 "message_in_transit_queue_unittest.cc", | 148 |
| 189 "message_in_transit_test_utils.cc", | 149 #"message_in_transit_queue_unittest.cc", |
| 190 "message_in_transit_test_utils.h", | 150 #"message_in_transit_test_utils.cc", |
| 191 "message_pipe_dispatcher_unittest.cc", | 151 #"message_in_transit_test_utils.h", |
| 152 #"message_pipe_dispatcher_unittest.cc", |
| 192 "message_pipe_test_utils.cc", | 153 "message_pipe_test_utils.cc", |
| 193 "message_pipe_test_utils.h", | 154 "message_pipe_test_utils.h", |
| 194 "message_pipe_unittest.cc", | 155 "message_pipe_unittest.cc", |
| 195 "multiprocess_message_pipe_unittest.cc", | 156 "multiprocess_message_pipe_unittest.cc", |
| 196 "mutex_unittest.cc", | |
| 197 "options_validation_unittest.cc", | 157 "options_validation_unittest.cc", |
| 198 "platform_handle_dispatcher_unittest.cc", | 158 "platform_handle_dispatcher_unittest.cc", |
| 199 "raw_channel_unittest.cc", | 159 |
| 200 "remote_data_pipe_impl_unittest.cc", | 160 #"raw_channel_unittest.cc", |
| 201 "remote_message_pipe_unittest.cc", | |
| 202 "run_all_unittests.cc", | 161 "run_all_unittests.cc", |
| 203 "shared_buffer_dispatcher_unittest.cc", | 162 "shared_buffer_dispatcher_unittest.cc", |
| 204 "simple_dispatcher_unittest.cc", | 163 "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", | 164 "waiter_test_utils.cc", |
| 210 "waiter_test_utils.h", | 165 "waiter_test_utils.h", |
| 211 "waiter_unittest.cc", | 166 "waiter_unittest.cc", |
| 212 ] | 167 ] |
| 213 | 168 |
| 214 deps = [ | 169 deps = [ |
| 215 ":system", | 170 ":system", |
| 216 ":test_utils", | 171 ":test_utils", |
| 217 "../embedder:embedder_unittests", | 172 "../embedder:embedder_unittests", |
| 173 "../../../third_party/mojo/src/mojo/public/cpp/environment:standalone", |
| 218 "../test:test_support", | 174 "../test:test_support", |
| 219 "//base", | 175 "//base", |
| 220 "//base/test:test_support", | 176 "//base/test:test_support", |
| 221 "//testing/gtest", | 177 "//testing/gtest", |
| 222 ] | 178 ] |
| 223 | 179 |
| 224 allow_circular_includes_from = [ "../embedder:embedder_unittests" ] | 180 allow_circular_includes_from = [ "../embedder:embedder_unittests" ] |
| 225 } | 181 } |
| 226 | 182 |
| 227 test("mojo_message_pipe_perftests") { | 183 test("mojo_message_pipe_perftests") { |
| 228 sources = [ | 184 sources = [ |
| 229 "message_pipe_perftest.cc", | 185 "message_pipe_perftest.cc", |
| 230 "message_pipe_test_utils.cc", | 186 "message_pipe_test_utils.cc", |
| 231 "message_pipe_test_utils.h", | 187 "message_pipe_test_utils.h", |
| 232 ] | 188 ] |
| 233 | 189 |
| 234 deps = [ | 190 deps = [ |
| 235 ":system", | 191 ":system", |
| 236 ":test_utils", | 192 ":test_utils", |
| 237 "../test:test_support", | 193 "../test:test_support", |
| 194 "../test:run_all_perftests", |
| 195 "../../../third_party/mojo/src/mojo/public/cpp/environment:standalone", |
| 238 "//base", | 196 "//base", |
| 239 "//base/test:test_support", | 197 "//base/test:test_support", |
| 240 "//base/test:test_support_perf", | 198 |
| 199 #"//base/test:test_support_perf", |
| 241 "//testing/gtest", | 200 "//testing/gtest", |
| 242 ] | 201 ] |
| 243 } | 202 } |
| OLD | NEW |