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
3 # found in the LICENSE file.
5 # Essential components (and their tests) that are needed to build
6 # Chrome should be here. Other components that are useful only in
7 # Mojo land like mojo_shell should be in mojo.gyp.
11 'mojo_public_tests.gypi',
12 'mojo_variables.gypi',
16 'target_name': 'mojo_base',
20 'mojo_common_unittests',
24 'mojo_message_generator',
25 'mojo_message_pipe_perftests',
26 'mojo_public_application_unittests',
27 'mojo_public_test_utils',
28 'mojo_public_bindings_unittests',
29 'mojo_public_environment_unittests',
30 'mojo_public_system_perftests',
31 'mojo_public_system_unittests',
32 'mojo_public_utility_unittests',
35 'mojo_system_unittests',
44 'libmojo_system_java',
51 'target_name': 'mojo_none',
55 # GN version: //mojo/common/test:run_all_unittests
56 'target_name': 'mojo_run_all_unittests',
57 'type': 'static_library',
59 '../base/base.gyp:base',
60 '../base/base.gyp:test_support_base',
61 '../testing/gtest.gyp:gtest',
64 'mojo_test_support_impl',
67 'common/test/run_all_unittests.cc',
71 'target_name': 'mojo_run_all_perftests',
72 'type': 'static_library',
74 '../base/base.gyp:test_support_base',
77 'mojo_test_support_impl',
80 'common/test/run_all_perftests.cc',
84 # GN version: //mojo/system
85 'target_name': 'mojo_system_impl',
86 'type': '<(component)',
88 '../base/base.gyp:base',
89 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
92 'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
93 'MOJO_SYSTEM_IMPLEMENTATION',
94 'MOJO_USE_SYSTEM_IMPL',
97 'embedder/channel_init.cc',
98 'embedder/channel_init.h',
99 'embedder/embedder.cc',
100 'embedder/embedder.h',
101 'embedder/platform_channel_pair.cc',
102 'embedder/platform_channel_pair.h',
103 'embedder/platform_channel_pair_posix.cc',
104 'embedder/platform_channel_pair_win.cc',
105 'embedder/platform_channel_utils_posix.cc',
106 'embedder/platform_channel_utils_posix.h',
107 'embedder/platform_handle.cc',
108 'embedder/platform_handle.h',
109 'embedder/platform_handle_utils.h',
110 'embedder/platform_handle_utils_posix.cc',
111 'embedder/platform_handle_utils_win.cc',
112 'embedder/platform_handle_vector.h',
113 'embedder/platform_shared_buffer.h',
114 'embedder/platform_support.h',
115 'embedder/scoped_platform_handle.h',
116 'embedder/simple_platform_shared_buffer.cc',
117 'embedder/simple_platform_shared_buffer.h',
118 'embedder/simple_platform_shared_buffer_posix.cc',
119 'embedder/simple_platform_shared_buffer_win.cc',
120 'embedder/simple_platform_support.cc',
121 'embedder/simple_platform_support.h',
124 'system/channel_endpoint.cc',
125 'system/channel_endpoint.h',
126 'system/constants.h',
129 'system/data_pipe.cc',
130 'system/data_pipe.h',
131 'system/data_pipe_consumer_dispatcher.cc',
132 'system/data_pipe_consumer_dispatcher.h',
133 'system/data_pipe_producer_dispatcher.cc',
134 'system/data_pipe_producer_dispatcher.h',
135 'system/dispatcher.cc',
136 'system/dispatcher.h',
137 'system/entrypoints.cc',
138 'system/handle_signals_state.h',
139 'system/handle_table.cc',
140 'system/handle_table.h',
141 'system/local_data_pipe.cc',
142 'system/local_data_pipe.h',
143 'system/local_message_pipe_endpoint.cc',
144 'system/local_message_pipe_endpoint.h',
145 'system/mapping_table.cc',
146 'system/mapping_table.h',
149 'system/message_in_transit.cc',
150 'system/message_in_transit.h',
151 'system/message_in_transit_queue.cc',
152 'system/message_in_transit_queue.h',
153 'system/message_pipe.cc',
154 'system/message_pipe.h',
155 'system/message_pipe_dispatcher.cc',
156 'system/message_pipe_dispatcher.h',
157 'system/message_pipe_endpoint.cc',
158 'system/message_pipe_endpoint.h',
159 'system/options_validation.h',
160 'system/platform_handle_dispatcher.cc',
161 'system/platform_handle_dispatcher.h',
162 'system/proxy_message_pipe_endpoint.cc',
163 'system/proxy_message_pipe_endpoint.h',
164 'system/raw_channel.cc',
165 'system/raw_channel.h',
166 'system/raw_channel_posix.cc',
167 'system/raw_channel_win.cc',
168 'system/shared_buffer_dispatcher.cc',
169 'system/shared_buffer_dispatcher.h',
170 'system/simple_dispatcher.cc',
171 'system/simple_dispatcher.h',
172 'system/transport_data.cc',
173 'system/transport_data.h',
176 'system/waiter_list.cc',
177 'system/waiter_list.h',
179 # TODO(vtl): It's a little unfortunate that these end up in the same
180 # component as non-test-only code. In the static build, this code should
181 # hopefully be dead-stripped.
182 'embedder/test_embedder.cc',
183 'embedder/test_embedder.h',
185 'all_dependent_settings': {
186 # Ensures that dependent projects import the core functions on Windows.
187 'defines': ['MOJO_USE_SYSTEM_IMPL'],
191 # GN version: //mojo/system:mojo_system_unittests
192 'target_name': 'mojo_system_unittests',
193 'type': 'executable',
195 '../base/base.gyp:base',
196 '../testing/gtest.gyp:gtest',
197 'mojo_common_test_support',
201 'embedder/embedder_unittest.cc',
202 'embedder/platform_channel_pair_posix_unittest.cc',
203 'embedder/simple_platform_shared_buffer_unittest.cc',
204 'system/channel_unittest.cc',
205 'system/core_unittest.cc',
206 'system/core_test_base.cc',
207 'system/core_test_base.h',
208 'system/data_pipe_unittest.cc',
209 'system/dispatcher_unittest.cc',
210 'system/local_data_pipe_unittest.cc',
211 'system/memory_unittest.cc',
212 'system/message_pipe_dispatcher_unittest.cc',
213 'system/message_pipe_test_utils.h',
214 'system/message_pipe_test_utils.cc',
215 'system/message_pipe_unittest.cc',
216 'system/multiprocess_message_pipe_unittest.cc',
217 'system/options_validation_unittest.cc',
218 'system/platform_handle_dispatcher_unittest.cc',
219 'system/raw_channel_unittest.cc',
220 'system/remote_message_pipe_unittest.cc',
221 'system/run_all_unittests.cc',
222 'system/shared_buffer_dispatcher_unittest.cc',
223 'system/simple_dispatcher_unittest.cc',
224 'system/test_utils.cc',
225 'system/test_utils.h',
226 'system/waiter_list_unittest.cc',
227 'system/waiter_test_utils.cc',
228 'system/waiter_test_utils.h',
229 'system/waiter_unittest.cc',
233 # GN version: //mojo/system:mojo_message_pipe_perftests
234 'target_name': 'mojo_message_pipe_perftests',
235 'type': 'executable',
237 '../base/base.gyp:base',
238 '../base/base.gyp:test_support_base',
239 '../base/base.gyp:test_support_perf',
240 '../testing/gtest.gyp:gtest',
241 'mojo_common_test_support',
242 'mojo_environment_chromium',
246 'system/message_pipe_perftest.cc',
247 'system/message_pipe_test_utils.h',
248 'system/message_pipe_test_utils.cc',
249 'system/test_utils.cc',
250 'system/test_utils.h',
254 # GN version: //mojo/common/test:test_support_impl
255 'target_name': 'mojo_test_support_impl',
256 'type': 'static_library',
258 '../base/base.gyp:base',
261 'common/test/test_support_impl.cc',
262 'common/test/test_support_impl.h',
266 # GN version: //mojo/common
267 'target_name': 'mojo_common_lib',
268 'type': '<(component)',
270 'MOJO_COMMON_IMPLEMENTATION',
273 '../base/base.gyp:base',
274 '../url/url.gyp:url_lib',
275 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
276 '<(mojo_system_for_component)',
278 'export_dependent_settings': [
279 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
282 'common/common_type_converters.cc',
283 'common/common_type_converters.h',
284 'common/data_pipe_utils.cc',
285 'common/data_pipe_utils.h',
286 'common/handle_watcher.cc',
287 'common/handle_watcher.h',
288 'common/message_pump_mojo.cc',
289 'common/message_pump_mojo.h',
290 'common/message_pump_mojo_handler.h',
291 'common/time_helper.cc',
292 'common/time_helper.h',
296 # GN version: //mojo/common/test:test_support
297 'target_name': 'mojo_common_test_support',
298 'type': 'static_library',
300 '../base/base.gyp:base',
301 '../base/base.gyp:test_support_base',
302 '../testing/gtest.gyp:gtest',
306 'common/test/multiprocess_test_helper.cc',
307 'common/test/multiprocess_test_helper.h',
308 'common/test/test_utils.h',
309 'common/test/test_utils_posix.cc',
310 'common/test/test_utils_win.cc',
314 # GN version: //mojo/common:mojo_common_unittests
315 'target_name': 'mojo_common_unittests',
316 'type': 'executable',
318 '../base/base.gyp:base',
319 '../base/base.gyp:base_message_loop_tests',
320 '../testing/gtest.gyp:gtest',
321 '../url/url.gyp:url_lib',
323 'mojo_environment_chromium',
325 'mojo_common_test_support',
326 'mojo_public_test_utils',
327 'mojo_run_all_unittests',
330 'common/common_type_converters_unittest.cc',
331 'common/handle_watcher_unittest.cc',
332 'common/message_pump_mojo_unittest.cc',
333 'common/test/multiprocess_test_helper_unittest.cc',
337 # GN version: //mojo/environment:chromium
338 'target_name': 'mojo_environment_chromium',
339 'type': 'static_library',
341 'mojo_environment_chromium_impl',
344 'environment/environment.cc',
345 # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
346 "public/cpp/environment/logging.h",
347 "public/cpp/environment/lib/logging.cc",
352 'export_dependent_settings': [
353 'mojo_environment_chromium_impl',
357 # GN version: //mojo/environment:chromium_impl
358 'target_name': 'mojo_environment_chromium_impl',
359 'type': '<(component)',
361 'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
364 '../base/base.gyp:base',
365 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
367 '<(mojo_system_for_component)',
370 'environment/default_async_waiter_impl.cc',
371 'environment/default_async_waiter_impl.h',
372 'environment/default_logger_impl.cc',
373 'environment/default_logger_impl.h',
380 # GN version: //mojo/services/gles2:interfaces (for files generated from
382 # GN version: //mojo/services/gles2:bindings
383 'target_name': 'mojo_gles2_bindings',
384 'type': 'static_library',
386 'services/gles2/command_buffer.mojom',
387 'services/gles2/command_buffer_type_conversions.cc',
388 'services/gles2/command_buffer_type_conversions.h',
389 'services/gles2/mojo_buffer_backing.cc',
390 'services/gles2/mojo_buffer_backing.h',
392 'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
393 'export_dependent_settings': [
398 '../gpu/gpu.gyp:command_buffer_common',
402 # GN version: //mojo/gles2
403 'target_name': 'mojo_gles2_impl',
404 'type': '<(component)',
406 '../base/base.gyp:base',
407 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
408 '../gpu/gpu.gyp:command_buffer_client',
409 '../gpu/gpu.gyp:command_buffer_common',
410 '../gpu/gpu.gyp:gles2_cmd_helper',
411 '../gpu/gpu.gyp:gles2_implementation',
412 'mojo_environment_chromium',
413 'mojo_gles2_bindings',
414 '<(mojo_system_for_component)',
418 'GL_GLEXT_PROTOTYPES',
419 'MOJO_GLES2_IMPLEMENTATION',
420 'MOJO_GLES2_IMPL_IMPLEMENTATION',
421 'MOJO_USE_GLES2_IMPL'
423 'direct_dependent_settings': {
428 'export_dependent_settings': [
429 'mojo_gles2_bindings',
432 'gles2/command_buffer_client_impl.cc',
433 'gles2/command_buffer_client_impl.h',
434 'gles2/gles2_impl_export.h',
435 'gles2/gles2_impl.cc',
436 'gles2/gles2_context.cc',
437 'gles2/gles2_context.h',
439 'all_dependent_settings': {
440 # Ensures that dependent projects import the core functions on Windows.
441 'defines': ['MOJO_USE_GLES2_IMPL'],
445 # GN version: //mojo/public/cpp/application:chromium
446 'target_name': 'mojo_application_chromium',
447 'type': 'static_library',
449 'public/cpp/application/lib/application_runner_chromium.cc',
450 'public/cpp/application/application_runner_chromium.h',
453 'mojo_application_base',
455 'mojo_environment_chromium',
457 'export_dependent_settings': [
458 'mojo_application_base',
462 # GN version: //mojo/bindings/js
463 'target_name': 'mojo_js_bindings_lib',
464 'type': 'static_library',
466 '../base/base.gyp:base',
467 '../gin/gin.gyp:gin',
468 '../v8/tools/gyp/v8.gyp:v8',
471 'export_dependent_settings': [
472 '../base/base.gyp:base',
473 '../gin/gin.gyp:gin',
477 # Sources list duplicated in GN build.
478 'bindings/js/core.cc',
479 'bindings/js/core.h',
480 'bindings/js/handle.cc',
481 'bindings/js/handle.h',
482 'bindings/js/support.cc',
483 'bindings/js/support.h',
484 'bindings/js/waiting_callback.cc',
485 'bindings/js/waiting_callback.h',
489 'target_name': 'mojo_message_generator',
490 'type': 'executable',
492 '../base/base.gyp:base',
493 '../testing/gtest.gyp:gtest',
496 'mojo_environment_chromium',
500 'tools/message_generator.cc',
508 'target_name': 'mojo_jni_headers',
511 'mojo_java_set_jni_headers',
514 'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
515 'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
516 'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
517 'services/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java',
518 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
521 'jni_gen_package': 'mojo',
523 'includes': [ '../build/jni_generator.gypi' ],
526 'target_name': 'mojo_java_set_jni_headers',
529 'jni_gen_package': 'mojo',
530 'input_java_class': 'java/util/HashSet.class',
532 'includes': [ '../build/jar_file_jni_generator.gypi' ],
535 'target_name': 'mojo_system_java',
538 '../base/base.gyp:base_java',
542 'java_in_dir': '<(DEPTH)/mojo/android/system',
544 'includes': [ '../build/java.gypi' ],
547 'target_name': 'libmojo_system_java',
548 'type': 'static_library',
550 '../base/base.gyp:base',
551 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
553 'mojo_environment_chromium',
558 'android/system/core_impl.cc',
559 'android/system/core_impl.h',
563 'target_name': 'libmojo_java_unittest',
564 'type': 'shared_library',
566 '../base/base.gyp:base',
567 '../base/base.gyp:test_support_base',
568 'libmojo_system_java',
570 'mojo_public_bindings_test_utils',
573 'UNIT_TEST' # As exported from testing/gtest.gyp:gtest.
576 'android/javatests/mojo_test_case.cc',
577 'android/javatests/mojo_test_case.h',
578 'android/javatests/init_library.cc',
579 'android/javatests/validation_test_util.cc',
580 'android/javatests/validation_test_util.h',
584 'target_name': 'mojo_test_apk',
587 'mojo_bindings_java',
588 'mojo_public_test_interfaces',
590 '../base/base.gyp:base_java_test_support',
593 'apk_name': 'MojoTest',
594 'java_in_dir': '<(DEPTH)/mojo/android/javatests',
595 'resource_dir': '<(DEPTH)/mojo/android/javatests/apk',
596 'native_lib_target': 'libmojo_java_unittest',
598 # Given that this apk tests itself, it needs to bring emma with it
601 ['emma_coverage != 0', {
602 'emma_instrument': 1,
606 'includes': [ '../build/java_apk.gypi' ],
610 ['test_isolation_mode != "noop"', {
613 'target_name': 'mojo_js_unittests_run',
619 '../build/isolate.gypi',
620 'mojo_js_unittests.isolate',
623 'mojo_js_unittests.isolate',