• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 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.
4
5{
6  'variables': {
7    'chromium_code': 1,
8  },
9  'targets': [
10    {
11      'target_name': 'mojo_edk_tests',
12      'type': 'none',
13      'dependencies': [
14        # NOTE: If adding a new dependency here, please consider whether it
15        # should also be added to the list of Mojo-related dependencies of
16        # build/all.gyp:All on iOS, as All cannot depend on the mojo_base
17        # target on iOS due to the presence of the js targets, which cause v8
18        # to be built.
19        'mojo_message_pipe_perftests',
20        'mojo_public_bindings_perftests',
21        'mojo_public_bindings_unittests',
22        'mojo_public_system_perftests',
23        'mojo_public_system_unittests',
24        'mojo_system_unittests',
25        'mojo_js_unittests',
26        'mojo_js_integration_tests',
27      ],
28    },
29    {
30      # GN version: //mojo/edk/test:mojo_public_bindings_unittests
31      'target_name': 'mojo_public_bindings_unittests',
32      'type': 'executable',
33      'dependencies': [
34        '../testing/gtest.gyp:gtest',
35        'mojo_edk.gyp:mojo_run_all_unittests',
36        'mojo_public.gyp:mojo_cpp_bindings',
37        'mojo_public.gyp:mojo_public_bindings_test_utils',
38        'mojo_public.gyp:mojo_public_test_utils',
39        'mojo_public_tests.gyp:mojo_public_test_associated_interfaces',
40        'mojo_public_tests.gyp:mojo_public_test_interfaces',
41        'mojo_public_tests.gyp:mojo_public_test_interfaces_blink',
42        'mojo_public_tests.gyp:mojo_public_test_interfaces_struct_traits',
43      ],
44      'variables': {
45        'clang_warning_flags_unset': [ '-Wglobal-constructors' ],
46      },
47      'sources': [
48        'public/cpp/bindings/tests/array_common_test.h',
49        'public/cpp/bindings/tests/array_unittest.cc',
50        'public/cpp/bindings/tests/associated_interface_unittest.cc',
51        'public/cpp/bindings/tests/bind_task_runner_unittest.cc',
52        'public/cpp/bindings/tests/binding_callback_unittest.cc',
53        'public/cpp/bindings/tests/binding_unittest.cc',
54        'public/cpp/bindings/tests/buffer_unittest.cc',
55        'public/cpp/bindings/tests/connector_unittest.cc',
56        'public/cpp/bindings/tests/constant_unittest.cc',
57        'public/cpp/bindings/tests/container_test_util.cc',
58        'public/cpp/bindings/tests/container_test_util.h',
59        'public/cpp/bindings/tests/equals_unittest.cc',
60        'public/cpp/bindings/tests/handle_passing_unittest.cc',
61        'public/cpp/bindings/tests/interface_ptr_unittest.cc',
62        'public/cpp/bindings/tests/map_common_test.h',
63        'public/cpp/bindings/tests/map_unittest.cc',
64        'public/cpp/bindings/tests/message_queue.cc',
65        'public/cpp/bindings/tests/message_queue.h',
66        'public/cpp/bindings/tests/multiplex_router_unittest.cc',
67        'public/cpp/bindings/tests/pickle_unittest.cc',
68        'public/cpp/bindings/tests/pickled_types_blink.cc',
69        'public/cpp/bindings/tests/pickled_types_blink.h',
70        'public/cpp/bindings/tests/pickled_types_chromium.cc',
71        'public/cpp/bindings/tests/pickled_types_chromium.h',
72        'public/cpp/bindings/tests/rect_blink.h',
73        'public/cpp/bindings/tests/rect_blink_traits.h',
74        'public/cpp/bindings/tests/rect_chromium.h',
75        'public/cpp/bindings/tests/rect_chromium_traits.h',
76        'public/cpp/bindings/tests/request_response_unittest.cc',
77        'public/cpp/bindings/tests/router_test_util.cc',
78        'public/cpp/bindings/tests/router_test_util.h',
79        'public/cpp/bindings/tests/router_unittest.cc',
80        'public/cpp/bindings/tests/sample_service_unittest.cc',
81        'public/cpp/bindings/tests/serialization_warning_unittest.cc',
82        'public/cpp/bindings/tests/stl_converters_unittest.cc',
83        'public/cpp/bindings/tests/string_unittest.cc',
84        'public/cpp/bindings/tests/struct_traits_unittest.cc',
85        'public/cpp/bindings/tests/struct_unittest.cc',
86        'public/cpp/bindings/tests/struct_with_traits_impl.cc',
87        'public/cpp/bindings/tests/struct_with_traits_impl.h',
88        'public/cpp/bindings/tests/struct_with_traits_impl_traits.cc',
89        'public/cpp/bindings/tests/struct_with_traits_impl_traits.h',
90        'public/cpp/bindings/tests/sync_method_unittest.cc',
91        'public/cpp/bindings/tests/type_conversion_unittest.cc',
92        'public/cpp/bindings/tests/union_unittest.cc',
93        'public/cpp/bindings/tests/validation_context_unittest.cc',
94        'public/cpp/bindings/tests/validation_unittest.cc',
95        'public/cpp/bindings/tests/variant_test_util.h',
96      ],
97      'conditions': [
98        # TODO(yzshen): Blink-flavor bindings tests should be moved into
99        # mojo_public_bindings_for_blink_tests (which should eventually be moved
100        # into blink).
101        ['OS=="ios"', {
102          'dependencies!': [
103            'mojo_public.gyp:mojo_public_test_interfaces_blink',
104          ],
105          'sources!': [
106            'public/cpp/bindings/tests/pickle_unittest.cc',
107            'public/cpp/bindings/tests/pickled_types_blink.cc',
108            'public/cpp/bindings/tests/pickled_types_blink.h',
109            'public/cpp/bindings/tests/pickled_types_chromium.cc',
110            'public/cpp/bindings/tests/pickled_types_chromium.h',
111            'public/cpp/bindings/tests/rect_blink.h',
112            'public/cpp/bindings/tests/rect_blink_traits.h',
113            'public/cpp/bindings/tests/struct_traits_unittest.cc',
114          ],
115        }],
116      ],
117    },
118    {
119      # GN version: //mojo/public/cpp/bindings/tests:for_blink_tests
120      'target_name': 'mojo_public_bindings_for_blink_tests',
121      'type': 'static_library',
122      'dependencies': [
123        '../testing/gtest.gyp:gtest',
124        'mojo_public.gyp:mojo_cpp_bindings',
125        'mojo_public_tests.gyp:mojo_public_test_interfaces',
126        'mojo_public_tests.gyp:mojo_public_test_wtf_types',
127        'mojo_public_tests.gyp:mojo_public_test_wtf_types_blink',
128      ],
129      'variables': {
130         'clang_warning_flags_unset': [ '-Wglobal-constructors' ],
131      },
132      'sources': [
133        'public/cpp/bindings/tests/array_common_test.h',
134        'public/cpp/bindings/tests/container_test_util.cc',
135        'public/cpp/bindings/tests/container_test_util.h',
136        'public/cpp/bindings/tests/map_common_test.h',
137        'public/cpp/bindings/tests/variant_test_util.h',
138        'public/cpp/bindings/tests/wtf_array_unittest.cc',
139        'public/cpp/bindings/tests/wtf_map_unittest.cc',
140        'public/cpp/bindings/tests/wtf_types_unittest.cc',
141      ],
142    },
143    {
144      # GN version: //mojo/edk/test:mojo_public_bindings_perftests
145      'target_name': 'mojo_public_bindings_perftests',
146      'type': 'executable',
147      'dependencies': [
148        '../base/base.gyp:test_support_base',
149        '../testing/gtest.gyp:gtest',
150        'mojo_base.gyp:mojo_common_lib',
151        'mojo_edk.gyp:mojo_run_all_perftests',
152        'mojo_public.gyp:mojo_cpp_bindings',
153        'mojo_public.gyp:mojo_public_bindings_test_utils',
154        'mojo_public.gyp:mojo_public_test_utils',
155        'mojo_public_tests.gyp:mojo_public_test_interfaces',
156      ],
157      'sources': [
158        'public/cpp/bindings/tests/bindings_perftest.cc',
159        'public/cpp/bindings/tests/e2e_perftest.cc',
160      ],
161    },
162    {
163      # GN version: //mojo/public/cpp/system/tests:mojo_public_system_unittests
164      # and         //mojo/public/c/system/tests
165      'target_name': 'mojo_public_system_unittests',
166      'type': 'executable',
167      'dependencies': [
168        '../testing/gtest.gyp:gtest',
169        'mojo_edk.gyp:mojo_run_all_unittests',
170        'mojo_public.gyp:mojo_cpp_system',
171        'mojo_public.gyp:mojo_public_test_utils',
172      ],
173      'sources': [
174        '<(DEPTH)/mojo/public/c/system/tests/core_unittest.cc',
175        '<(DEPTH)/mojo/public/c/system/tests/core_unittest_pure_c.c',
176        '<(DEPTH)/mojo/public/c/system/tests/macros_unittest.cc',
177        '<(DEPTH)/mojo/public/cpp/system/tests/core_unittest.cc',
178        '<(DEPTH)/mojo/public/cpp/system/tests/watcher_unittest.cc',
179      ],
180    },
181    {
182      # GN version: //mojo/edk/test:mojo_public_system_perftests
183      'target_name': 'mojo_public_system_perftests',
184      'type': 'executable',
185      'dependencies': [
186        '../base/base.gyp:base',
187        '../testing/gtest.gyp:gtest',
188        'mojo_edk.gyp:mojo_run_all_perftests',
189        'mojo_public.gyp:mojo_public_system',
190        'mojo_public.gyp:mojo_public_test_utils',
191      ],
192      'sources': [
193        'public/c/system/tests/core_perftest.cc',
194      ],
195    },
196    {
197      # GN version: //mojo/edk/system:mojo_system_unittests
198      'target_name': 'mojo_system_unittests',
199      'type': '<(gtest_target_type)',
200      'dependencies': [
201        '../base/base.gyp:base',
202        '../testing/gtest.gyp:gtest',
203        'mojo_edk.gyp:mojo_common_test_support',
204        'mojo_edk.gyp:mojo_run_all_unittests',
205        'mojo_edk.gyp:mojo_system_impl',
206        'mojo_edk.gyp:mojo_system_ports',
207        'mojo_public.gyp:mojo_public_system',
208      ],
209      'sources': [
210        'edk/embedder/embedder_unittest.cc',
211        'edk/embedder/platform_channel_pair_posix_unittest.cc',
212        'edk/embedder/platform_shared_buffer_unittest.cc',
213        'edk/system/awakable_list_unittest.cc',
214        'edk/system/core_test_base.cc',
215        'edk/system/core_test_base.h',
216        'edk/system/core_unittest.cc',
217        'edk/system/message_pipe_unittest.cc',
218        'edk/system/multiprocess_message_pipe_unittest.cc',
219        'edk/system/options_validation_unittest.cc',
220        'edk/system/platform_handle_dispatcher_unittest.cc',
221        'edk/system/platform_wrapper_unittest.cc',
222        'edk/system/ports/ports_unittest.cc',
223        'edk/system/shared_buffer_dispatcher_unittest.cc',
224        'edk/system/shared_buffer_unittest.cc',
225        'edk/system/test_utils.cc',
226        'edk/system/test_utils.h',
227        'edk/system/wait_set_dispatcher_unittest.cc',
228        'edk/system/waiter_test_utils.cc',
229        'edk/system/waiter_test_utils.h',
230        'edk/system/waiter_unittest.cc',
231        'edk/system/watch_unittest.cc',
232      ],
233      'conditions': [
234        ['OS=="ios"', {
235          'sources!': [
236            'edk/system/multiprocess_message_pipe_unittest.cc',
237          ],
238        }],
239        ['OS == "android"', {
240          'dependencies': [
241            '../testing/android/native_test.gyp:native_test_native_code',
242          ],
243        }],
244      ],
245    },
246    {
247      # GN version: //mojo/edk/system:mojo_message_pipe_perftests
248      'target_name': 'mojo_message_pipe_perftests',
249      'type': 'executable',
250      'dependencies': [
251        '../base/base.gyp:base',
252        '../base/base.gyp:test_support_base',
253        '../testing/gtest.gyp:gtest',
254        'mojo_edk.gyp:mojo_common_test_support',
255        'mojo_edk.gyp:mojo_run_all_perftests',
256        'mojo_edk.gyp:mojo_system_impl',
257        'mojo_public.gyp:mojo_public_system',
258      ],
259      'sources': [
260        'edk/system/message_pipe_perftest.cc',
261        'edk/system/test_utils.cc',
262        'edk/system/test_utils.h',
263      ],
264    },
265    # TODO(yzshen): fix the following two targets.
266    {
267      # GN version: //mojo/edk/js/test:js_unittests
268      'target_name': 'mojo_js_unittests',
269      'type': 'executable',
270      'dependencies': [
271        '../gin/gin.gyp:gin_test',
272        'mojo_edk.gyp:mojo_common_test_support',
273        'mojo_edk.gyp:mojo_run_all_unittests',
274        'mojo_edk.gyp:mojo_js_lib',
275        'mojo_public_tests.gyp:mojo_public_test_interfaces',
276      ],
277      'sources': [
278        'edk/js/handle_unittest.cc',
279        'edk/js/test/run_js_tests.cc',
280      ],
281    },
282    {
283      # GN version: //mojo/edk/js/test:js_integration_tests
284      'target_name': 'mojo_js_integration_tests',
285      'type': 'executable',
286      'dependencies': [
287        '../base/base.gyp:base',
288        '../gin/gin.gyp:gin_test',
289        'mojo_base.gyp:mojo_common_lib',
290        'mojo_edk.gyp:mojo_js_lib',
291        'mojo_edk.gyp:mojo_run_all_unittests',
292        'mojo_js_to_cpp_bindings',
293        'mojo_public_tests.gyp:mojo_public_test_interfaces',
294      ],
295      'sources': [
296        'edk/js/test/run_js_integration_tests.cc',
297        'edk/js/tests/js_to_cpp_tests.cc',
298      ],
299    },
300    {
301      'target_name': 'mojo_js_to_cpp_bindings',
302      'type': 'none',
303      'variables': {
304        'mojom_files': [
305          'edk/js/tests/js_to_cpp.mojom',
306        ],
307      },
308      'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
309    },
310  ],
311  'conditions': [
312    ['test_isolation_mode != "noop"', {
313      'targets': [
314        {
315          'target_name': 'mojo_public_bindings_unittests_run',
316          'type': 'none',
317          'dependencies': [
318            'mojo_public_bindings_unittests',
319          ],
320          'includes': [
321            '../build/isolate.gypi',
322          ],
323          'sources': [
324            'mojo_public_bindings_unittests.isolate',
325          ],
326        },
327        {
328          'target_name': 'mojo_public_system_unittests_run',
329          'type': 'none',
330          'dependencies': [
331            'mojo_public_system_unittests',
332          ],
333          'includes': [
334            '../build/isolate.gypi',
335          ],
336          'sources': [
337            'mojo_public_system_unittests.isolate',
338          ],
339        },
340        {
341          'target_name': 'mojo_js_unittests_run',
342          'type': 'none',
343          'dependencies': [
344            'mojo_js_unittests',
345          ],
346          'includes': [
347            '../build/isolate.gypi',
348          ],
349          'sources': [
350            'mojo_js_unittests.isolate',
351          ],
352        },
353        {
354          'target_name': 'mojo_js_integration_tests_run',
355          'type': 'none',
356          'dependencies': [
357            'mojo_js_integration_tests',
358          ],
359          'includes': [
360            '../build/isolate.gypi',
361          ],
362          'sources': [
363            'mojo_js_integration_tests.isolate',
364          ],
365        },
366        {
367          'target_name': 'mojo_system_unittests_run',
368          'type': 'none',
369          'dependencies': [
370            'mojo_system_unittests',
371          ],
372          'includes': [
373            '../build/isolate.gypi',
374          ],
375          'sources': [
376            'mojo_system_unittests.isolate',
377          ],
378        },
379      ],
380    }],
381    ['OS == "android"', {
382      'targets': [
383        {
384          'target_name': 'mojo_system_unittests_apk',
385          'type': 'none',
386          'dependencies': [
387            'mojo_system_unittests',
388          ],
389          'variables': {
390            'test_suite_name': 'mojo_system_unittests',
391          },
392          'includes': [ '../build/apk_test.gypi' ],
393        },
394      ],
395    }],
396  ],
397}
398