summaryrefslogtreecommitdiffstats
path: root/BUILD.gn
blob: a68ca2c9c141fc32d51ae5ac6fe53a2dfaba54a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This is the root build file for GN. GN will start processing by loading this
# file, and recursively load all dependencies until all dependencies are either
# resolved or known not to exist (which will cause the build to fail). So if
# you add a new build file, there must be some path of dependencies from this
# file to your new one or GN won't know about it.

import("//build/config/features.gni")
import("//build/config/ui.gni")

if (is_android) {
  import("//build/config/android/config.gni")
}

declare_args() {
  # A list of extra dependencies to add to the root target. This allows a
  # checkout to add additional targets without explicitly changing any checked-
  # in files.
  root_extra_deps = []
}

group("gyp_all") {
  testonly = true

  # TODO(GYP): This target should describe everything that is built by a GYP
  # build but not yet by a GN build, i.e., these are the targets that still
  # need to be ported to GN. Eventually this target should be identical to
  # gn_all.

  deps = [
    ":gn_all",
    # "//components:components_browsertests", # TODO(GYP)
    # "//components/nacl:nacl_loader_unittests", # TODO(GYP)
    # "//google_apis:google_apis_unittests", # TODO(GYP)
    # "//ui/compositor:compositor_unittests", # TODO(GYP)
    # "//device:device_unittests", # TODO(GYP)
    # "//ppapi:ppapi_unittests", # TODO(GYP)
    # "//remoting:remoting_unittests",  # TODO(GYP)
  ]
}

# The "gn_all" target matches the "gn_all" target in build/all.gyp.
# It is not (yet!) the same as building "all".
# TODO(GYP): Make it be basically the same as building all, or at least
# be sure that we don't want any of the stuff listed in gn_all to
# be built by default.

# In GN, a "group" is a dummy target that just lists other targets.
group("gn_all") {
  testonly = true

  deps = [
    "//base:base_unittests",
    "//cc:cc_unittests",
    "//chrome",
    "//chrome/test:browser_tests",
    "//chrome/test:interactive_ui_tests",
    "//chrome/test:sync_integration_tests",
    "//chrome/test:unit_tests",
    "//chrome/test/chromedriver:chromedriver_unittests",
    "//components:components_unittests",
    "//content/shell:content_shell",
    "//content/test:content_browsertests",
    "//content/test:content_perftests",
    "//content/test:content_unittests",
    "//crypto:crypto_unittests",
    "//extensions:extensions_browsertests",
    "//extensions:extensions_unittests",
    "//google_apis/gcm:gcm_unit_tests",
    "//gpu:gpu_unittests",
    "//ipc:ipc_tests",
    "//ipc/mojo:ipc_mojo_unittests",
    "//jingle:jingle_unittests",
    "//media:media_unittests",
    "//media/mojo",  # only builds in mojo
    "//media/cast:cast_unittests",
    "//mojo",
    "//mojo/common:mojo_common_unittests",

    # "//mojo/services/html_viewer:tests",  # TODO(GYP): Do we need this?
    "//net:net_unittests",
    "//ppapi/examples",  # TODO(GYP): What's the GYP equivalent?
    "//printing:printing_unittests",
    "//skia:skia_unittests",
    "//sql:sql_unittests",
    "//sync:sync_unit_tests",

    # TODO(GYP): the Blink test targets should be public, but
    # currently aren't. all_blink pulls them in, though.
    # "//third_party/WebKit/Source/platform:heap_unittests",
    # "//third_party/WebKit/Source/platform:platform_unittests",
    # "//third_party/WebKit/Source/wtf:wtf_unittests",
    "//third_party/WebKit/public:all_blink",
    "//third_party/cacheinvalidation:cacheinvalidation_unittests",

    # TODO(GYP): This is needed only w/ cld_version==1. What configs set that?
    "//third_party/cld",
    "//third_party/codesighs",

    # TODO(GYP): This is needed only w/ use_system_fontconfig==0.
    # What configs set that?
    # "//third_party/fontconfig",

    # TODO(GYP): This will be pulled in automatically when enable_webrtc==true.
    # For now pull it in manually so that it doesn't regress.
    "//third_party/libsrtp",
    "//third_party/mojo/src/mojo/edk/system:mojo_system_unittests",
    "//third_party/mojo/src/mojo/edk/test:mojo_public_bindings_unittests",
    "//third_party/mojo/src/mojo/edk/test:mojo_public_environment_unittests",
    "//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests",
    "//third_party/mojo/src/mojo/edk/test:mojo_public_utility_unittests",
    "//third_party/pdfium/samples:pdfium_test",

    # TODO(GYP): Verify that this is no longer needed.
    "//third_party/smhasher:pmurhash",

    # TODO(GYP): This will be pulled in automatically when enable_webrtc==true.
    # For now pull it in manually so that it doesn't regress.
    "//third_party/usrsctp",
    "//tools/imagediff($host_toolchain)",
    "//tools/gn",
    "//tools/gn:gn_unittests",
    "//tools/telemetry:bitmaptools($host_toolchain)",
    "//ui/accessibility:accessibility_unittests",
    "//ui/app_list:app_list_unittests",
    "//ui/base:ui_base_unittests",
    "//ui/display:display_unittests",
    "//ui/events:events_unittests",
    "//ui/gfx:gfx_unittests",
    "//ui/touch_selection:ui_touch_selection_unittests",
    "//url:url_unittests",
  ]

  deps += root_extra_deps

  # TODO(GYP): Get this working on the mac?
  if (enable_extensions && !is_mac) {
    deps += [ "//extensions/shell:app_shell_unittests" ]
  }

  if (!is_win) {
    deps += [ "//breakpad:symupload" ]
  }

  if (use_x11) {
    deps += [ "//tools/xdisplaycheck" ]
  }

  if (toolkit_views) {
    deps += [ "//ui/views:views_unittests" ]
  }

  if (use_aura) {
    deps += [ "//ui/wm:wm_unittests" ]
  }

  if (use_ozone) {
    deps += [
      "//ui/ozone",
      "//ui/ozone/demo",  # GN only
    ]
  }

  if (is_win || is_mac || is_chromeos) {
    # RLZ works on these platforms.
    # TODO(GYP): Is this target needed, or pulled in automatically?
    deps += [ "//rlz:rlz_lib" ]
  }

  if (is_android) {
    deps += [
      "//base/android/linker:chromium_android_linker",
      "//build/android/gyp/test:hello_world",
      "//build/android/rezip",
      "//chrome/android:chrome_shell_apk",
      "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk",
      "//tools/imagediff($host_toolchain)",

      # TODO(GYP): Remove these when the components_unittests work.
      "//components/history/core/test:test",
      "//components/policy:policy_component_test_support",
      "//components/policy:test_support",
      "//components/rappor:test_support",
      "//components/signin/core/browser:test_support",
      "//components/sync_driver:test_support",
      "//components/user_manager",
      "//components/wallpaper",
      "//content/shell/android:content_shell_apk",

      # TODO(GYP): Are these needed, or will they be pulled in automatically?
      "//third_party/android_tools:android_gcm_java",
      "//third_party/android_tools:uiautomator_java",
      "//third_party/android_tools:android_support_v13_java",
      "//third_party/android_tools:android_support_v7_appcompat_java",
      "//third_party/android_tools:android_support_v7_mediarouter_java",
      "//third_party/mesa",
      "//third_party/mockito:mockito_java",
      "//third_party/openmax_dl/dl",
      "//third_party/speex",
      "//ui/android:ui_java",

      # TODO(GYP): Are these needed?
      "//chrome/test:test_support_unit",
      "//third_party/smhasher:murmurhash3",
      "//ui/message_center:test_support",
    ]
    deps -= [
      "//breakpad:symupload",  # TODO(GYP) ??
      "//chrome",  # TODO(GYP) ??
      "//chrome/test:browser_tests",  # TODO(GYP) ??
      "//chrome/test:interactive_ui_tests",  # TODO(GYP) ??
      "//chrome/test:sync_integration_tests",  # TODO(GYP) ??
      "//chrome/test:unit_tests",  # TODO(GYP)

      # Chromedriver shouldn't be compiled on Android.
      "//chrome/test/chromedriver:chromedriver_unittests",
      "//extensions:extensions_browsertests",
      "//extensions:extensions_unittests",
      "//google_apis/gcm:gcm_unit_tests",
      "//ipc:ipc_tests",  # TODO(GYP) ??
      "//jingle:jingle_unittests",  # TODO(GYP) ??
      "//net:net_unittests",
      "//ppapi/examples",
      "//third_party/pdfium/samples:pdfium_test",
      "//tools/gn",
      "//tools/gn:gn_unittests",
      "//ui/app_list:app_list_unittests",
      "//url:url_unittests",
    ]

    if (has_chrome_android_internal) {
      deps += [ "//clank" ]  # TODO(GYP) ??
    }
  } else if (is_linux) {
    deps += [
      "//dbus:dbus_unittests",
      "//sandbox/linux:sandbox_linux_unittests",
    ]
  } else if (is_mac) {
    deps += [
      "//third_party/apple_sample_code",
      "//third_party/molokocacao",
    ]

    # TODO(GYP): Remove these when the targets below work and these
    # are pulled in automatically.
    deps += [
      "//cc/blink",
      "//components/ui/zoom:ui_zoom",
      "//content",
      "//content/test:test_support",
      "//device/battery",
      "//device/bluetooth",
      "//device/nfc",
      "//device/usb",
      "//device/vibration",
      "//media/blink",
      "//pdf",
      "//storage/browser",
      "//third_party/brotli",
      "//third_party/flac",
      "//third_party/hunspell",
      "//third_party/iccjpeg",
      "//third_party/libphonenumber",
      "//third_party/ots",
      "//third_party/qcms",
      "//third_party/smhasher:murmurhash3",
      "//third_party/speex",
      "//third_party/webrtc/system_wrappers",
      "//ui/native_theme",
      "//ui/snapshot",
      "//ui/surface",
    ]

    # TODO(dpranke): These are as-yet untriaged but need at least the above.
    deps -= [
      "//chrome",  # TODO(GYP)
      "//chrome/test:browser_tests",  # TODO(GYP)
      "//chrome/test:interactive_ui_tests",  # TODO(GYP)
      "//chrome/test:sync_integration_tests",  # TODO(GYP)
      "//chrome/test:unit_tests",  # TODO(GYP)
      "//components:components_unittests",  # TODO(GYP)
      "//content/test:content_browsertests",  # TODO(GYP)
      "//content/test:content_perftests",  # TODO(GYP)
      "//content/test:content_unittests",  # TODO(GYP)
      "//extensions:extensions_browsertests",  # TODO(GYP)
      "//extensions:extensions_unittests",  # TODO(GYP)
      "//net:net_unittests",  # TODO(GYP)
      "//third_party/usrsctp",  # TODO(GYP)
      "//ui/app_list:app_list_unittests",  # TODO(GYP)
      "//ui/gfx:gfx_unittests",  # TODO(GYP)
    ]
  } else if (is_win) {
    deps += [ "//ui/metro_viewer" ]
    deps -= [
      "//crypto:crypto_unittests",  # TODO(GYP)
      "//net:net_unittests",  # TODO(GYP)
    ]
  }
}

if (is_linux) {
  # This group corresponds to the list of tests run on the waterfall for
  # desktop Linux GYP builds from testing/buildbot/chromium.linux.json. It's
  # here to help track GYP -> GN conversion progress.
  group("linux_default_tests") {
    testonly = true
    deps = [
      # components_browsertests  TODO(GYP)
      # device_unittests  TODO(GYP)
      # nacl_loader_unittests  TODO(GYP)
      # ppapi_unittests  TODO(GYP)
      # remoting_unittests  TODO(GYP)

      "//base:base_unittests",  # PASSES (*) 2/25/2015
      "//cc:cc_unittests",  # PASSES 2/25/2015
      "//chrome/test:browser_tests",
      "//chrome/test:interactive_ui_tests",
      "//chrome/test:sync_integration_tests",  # Crashes for brettw in GN and GYP.
      "//chrome/test:unit_tests",  # PASSES 2/25/2015
      "//chrome/test/chromedriver:chromedriver_unittests",  # PASSES 2/25/2015
      "//components:components_unittests",  # PASSES 2/27/2015
      "//content/test:content_browsertests",
      "//content/test:content_unittests",  # PASSES 2/25/2015
      "//crypto:crypto_unittests",  # PASSES 2/25/2015
      "//dbus:dbus_unittests",  # PASSES 2/25/2015
      "//extensions:extensions_browsertests",  # PASSES 2/25/2015
      "//extensions:extensions_unittests",  # PASSES 2/25/2015
      "//extensions/shell:app_shell_unittests",  # PASSES 2/25/2015
      "//google_apis/gcm:gcm_unit_tests",  # PASSES 2/25/2015
      "//google_apis:google_apis_unittests",  # PASSES 2/25/2015
      "//gpu:gpu_unittests",  # PASSES 2/25/2015
      "//ipc:ipc_tests",  # PASSES 2/25/2015
      "//ipc/mojo:ipc_mojo_unittests",  # PASSES 2/25/2015
      "//jingle:jingle_unittests",  # PASSES 2/25/2015
      "//media/cast:cast_unittests",  # PASSES 2/25/2015
      "//media:media_unittests",  # TODO(GYP) MidiManagerTest fails.
      "//mojo/common:mojo_common_unittests",  # PASSES 2/25/2015
      "//net:net_unittests",  # PASSES 2/25/2015
      "//printing:printing_unittests",  # PASSES 2/25/2015
      "//sandbox/linux:sandbox_linux_unittests",  # PASSES 2/25/2015
      "//skia:skia_unittests",  # PASSES 2/25/2015
      "//sql:sql_unittests",  # PASSES 2/25/2015
      "//sync:sync_unit_tests",  # PASSES 2/25/2015
      "//third_party/cacheinvalidation:cacheinvalidation_unittests",  # PASSES 2/25/2015
      "//third_party/mojo/src/mojo/edk/system:mojo_system_unittests",  # PASSES 2/25/2015
      "//third_party/mojo/src/mojo/edk/test:mojo_public_bindings_unittests",  # PASSES 2/25/2015
      "//third_party/mojo/src/mojo/edk/test:mojo_public_environment_unittests",  # PASSES 2/25/2015
      "//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests",  # PASSES 2/25/2015
      "//ui/accessibility:accessibility_unittests",  # PASSES 2/25/2015
      "//ui/app_list:app_list_unittests",  # PASSES 2/25/2015
      "//ui/aura:aura_unittests",  # PASSES 2/25/2015
      "//ui/base:ui_base_unittests",  # TODO(GYP) ResourceBundleTest.* fails.
      "//ui/compositor:compositor_unittests",  # PASSES 2/25/2015
      "//ui/display:display_unittests",  # PASSES 2/25/2015
      "//ui/events:events_unittests",  # PASSES 2/25/2015
      "//ui/gfx:gfx_unittests",  # PASSES 2/25/2015
      "//ui/touch_selection:ui_touch_selection_unittests",  # PASSES 2/25/2015
      "//ui/views:views_unittests",  # PASSES (*) 2/25/2015
      "//ui/wm:wm_unittests",  # PASSES 2/25/2015
      "//url:url_unittests",  # PASSES 2/25/2015

      # Note:
      # (*) Fails but failures match GYP build at time of testing.
    ]
  }
}