Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: net/BUILD.gn

Issue 1423633002: GN: Fix up net_unittests to match GYP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/android/rules.gni ('k') | net/android/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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("//build/config/chromecast_build.gni") 5 import("//build/config/chromecast_build.gni")
6 import("//build/config/compiler/compiler.gni") 6 import("//build/config/compiler/compiler.gni")
7 import("//build/config/crypto.gni") 7 import("//build/config/crypto.gni")
8 import("//build/config/features.gni") 8 import("//build/config/features.gni")
9 import("//build/config/ui.gni") 9 import("//build/config/ui.gni")
10 import("//build_overrides/v8.gni") 10 import("//build_overrides/v8.gni")
11 import("//testing/test.gni") 11 import("//testing/test.gni")
12 import("//third_party/icu/config.gni") 12 import("//third_party/icu/config.gni")
13 import("//third_party/protobuf/proto_library.gni") 13 import("//third_party/protobuf/proto_library.gni")
14 import("//tools/grit/grit_rule.gni") 14 import("//tools/grit/grit_rule.gni")
15 15
16 if (is_android) { 16 if (is_android) {
17 import("//build/config/android/config.gni") 17 import("//build/config/android/config.gni")
18 import("//build/config/android/rules.gni") 18 import("//build/config/android/rules.gni")
19 } else if (is_mac) { 19 } else if (is_mac) {
20 import("//build/config/mac/mac_sdk.gni") 20 import("//build/config/mac/mac_sdk.gni")
21 } 21 }
22 22
23 # The list of net files is kept in net.gypi. Read it. 23 # The list of net files is kept in net.gypi. Read it.
24 gypi_values = exec_script("//build/gypi_to_gn.py", 24 gypi_values = exec_script("//build/gypi_to_gn.py",
25 [ rebase_path("net.gypi") ], 25 [ rebase_path("net.gypi") ],
26 "scope", 26 "scope",
27 [ "net.gypi" ]) 27 [ "net.gypi" ])
28 28
29 # Disable Kerberos on ChromeOS, Android, iOS, and Chromecast, at least for now. 29 # Disable Kerberos on ChromeOS, iOS, and Chromecast, at least for now.
30 # It needs configuration (krb5.conf and so on). 30 # It needs configuration (krb5.conf and so on).
31 use_kerberos = !is_chromeos && !is_android && !is_ios && !is_chromecast 31 use_kerberos = !is_chromeos && !is_ios && !is_chromecast
32 32
33 # The way the cache uses mmap() is inefficient on some Android devices. If 33 # The way the cache uses mmap() is inefficient on some Android devices. If
34 # this flag is set, we hackily avoid using mmap() in the disk cache. We are 34 # this flag is set, we hackily avoid using mmap() in the disk cache. We are
35 # pretty confident that mmap-ing the index would not hurt any existing x86 35 # pretty confident that mmap-ing the index would not hurt any existing x86
36 # android devices, but we cannot be so sure about the variety of ARM devices. 36 # android devices, but we cannot be so sure about the variety of ARM devices.
37 # So enable it for x86 only for now. 37 # So enable it for x86 only for now.
38 posix_avoid_mmap = is_android && current_cpu != "x86" 38 posix_avoid_mmap = is_android && current_cpu != "x86"
39 39
40 # WebSockets and socket stream code are used everywhere except iOS. 40 # WebSockets and socket stream code are used everywhere except iOS.
41 enable_websockets = !is_ios 41 enable_websockets = !is_ios
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ] 229 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ]
230 } 230 }
231 } else { 231 } else {
232 if (is_android) { 232 if (is_android) {
233 # Android doesn't use these even when using OpenSSL. 233 # Android doesn't use these even when using OpenSSL.
234 net_shared_sources -= [ 234 net_shared_sources -= [
235 "base/openssl_private_key_store_memory.cc", 235 "base/openssl_private_key_store_memory.cc",
236 "cert/cert_database_openssl.cc", 236 "cert/cert_database_openssl.cc",
237 "cert/cert_verify_proc_openssl.cc", 237 "cert/cert_verify_proc_openssl.cc",
238 "cert/test_root_certs_openssl.cc", 238 "cert/test_root_certs_openssl.cc",
239 "http/http_auth_gssapi_posix.cc",
240 "http/http_auth_gssapi_posix.h",
239 ] 241 ]
240 } 242 }
241 } 243 }
242 244
243 if (use_glib && use_gconf && !is_chromeos) { 245 if (use_glib && use_gconf && !is_chromeos) {
244 net_shared_configs += [ "//build/config/linux:gconf" ] 246 net_shared_configs += [ "//build/config/linux:gconf" ]
245 net_shared_deps += [ "//build/linux:gio" ] 247 net_shared_deps += [ "//build/linux:gio" ]
246 } 248 }
247 249
248 if (is_linux) { 250 if (is_linux) {
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 "android/java/src/org/chromium/net/NetworkChangeNotifier.java", 1191 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1190 "android/java/src/org/chromium/net/ProxyChangeListener.java", 1192 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1191 "android/java/src/org/chromium/net/X509Util.java", 1193 "android/java/src/org/chromium/net/X509Util.java",
1192 ] 1194 ]
1193 jni_package = "net" 1195 jni_package = "net"
1194 } 1196 }
1195 generate_jni("net_test_jni_headers") { 1197 generate_jni("net_test_jni_headers") {
1196 sources = [ 1198 sources = [
1197 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java", 1199 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1198 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator .java", 1200 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator .java",
1201 "test/android/javatests/src/org/chromium/net/test/EmbeddedTestServer.java" ,
1199 ] 1202 ]
1200 jni_package = "net/test" 1203 jni_package = "net/test"
1201 } 1204 }
1205
1206 _net_unittests_apk_assets_dir = "$root_out_dir/net_unittests_apk/assets"
brettw 2015/10/22 23:57:19 Why bother with this intermediate variable? I'd ju
agrieve 2015/10/23 02:24:16 Because it's used again below: apk_asset_locatio
1207
1208 copy_ex("copy_net_unittests_apk_assets") {
1209 clear_dir = true
1210 dest = _net_unittests_apk_assets_dir
1211
1212 if (v8_use_external_startup_data) {
1213 sources = [
1214 "$root_out_dir/natives_blob.bin",
1215 "$root_out_dir/snapshot_blob.bin",
1216 ]
1217 deps = [
1218 "//v8",
1219 ]
1220 }
1221 }
1202 } 1222 }
1203 1223
1204 if (is_android || is_linux) { 1224 if (is_android || is_linux) {
1205 executable("disk_cache_memory_test") { 1225 executable("disk_cache_memory_test") {
1206 testonly = true 1226 testonly = true
1207 sources = [ 1227 sources = [
1208 "tools/disk_cache_memory_test/disk_cache_memory_test.cc", 1228 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1209 ] 1229 ]
1210 deps = [ 1230 deps = [
1211 ":net", 1231 ":net",
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 # OS is not "linux" or "freebsd" or "openbsd". 1595 # OS is not "linux" or "freebsd" or "openbsd".
1576 "socket/unix_domain_client_socket_posix_unittest.cc", 1596 "socket/unix_domain_client_socket_posix_unittest.cc",
1577 "socket/unix_domain_server_socket_posix_unittest.cc", 1597 "socket/unix_domain_server_socket_posix_unittest.cc",
1578 1598
1579 # See bug http://crbug.com/344533. 1599 # See bug http://crbug.com/344533.
1580 "disk_cache/blockfile/index_table_v3_unittest.cc", 1600 "disk_cache/blockfile/index_table_v3_unittest.cc",
1581 ] 1601 ]
1582 } 1602 }
1583 1603
1584 if (is_android) { 1604 if (is_android) {
1605 apk_deps = [
1606 "//base:base_java_unittest_support",
1607 "//net/android:net_java",
1608 "//net/android:net_javatests",
1609 "//net/android:net_java_test_support",
1610 "//net/android:net_unittests_apk_resources",
1611 ":copy_net_unittests_apk_assets",
1612 ]
1613 android_manifest = "//net/android/unittest_support/AndroidManifest.xml"
1585 sources -= [ 1614 sources -= [
1586 # See bug http://crbug.com/344533. 1615 # See bug http://crbug.com/344533.
1587 "disk_cache/blockfile/index_table_v3_unittest.cc", 1616 "disk_cache/blockfile/index_table_v3_unittest.cc",
1588 "dns/dns_config_service_posix_unittest.cc",
1589 ] 1617 ]
1590 deps += [ 1618 deps += [
1591 ":net_test_jni_headers", 1619 ":net_test_jni_headers",
1592 1620
1593 # TODO(mmenke): This depends on test_support_base, which depends on 1621 # TODO(mmenke): This depends on test_support_base, which depends on
1594 # icu. Figure out a way to remove that dependency. 1622 # icu. Figure out a way to remove that dependency.
1595 "//testing/android/native_test:native_test_native_code", 1623 "//testing/android/native_test:native_test_native_code",
1596 ] 1624 ]
1597 set_sources_assignment_filter([]) 1625 set_sources_assignment_filter([])
1598 sources += [ "base/address_tracker_linux_unittest.cc" ] 1626 sources += [ "base/address_tracker_linux_unittest.cc" ]
1599 set_sources_assignment_filter(sources_assignment_filter) 1627 set_sources_assignment_filter(sources_assignment_filter)
1628 apk_asset_location = _net_unittests_apk_assets_dir
1600 isolate_file = "net_unittests.isolate" 1629 isolate_file = "net_unittests.isolate"
1601 } 1630 }
1602 1631
1603 # Symbols for crashes when running tests on swarming. 1632 # Symbols for crashes when running tests on swarming.
1604 if (symbol_level > 0) { 1633 if (symbol_level > 0) {
1605 if (is_win) { 1634 if (is_win) {
1606 data += [ "$root_out_dir/net_unittests.exe.pdb" ] 1635 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1607 } else if (is_mac) { 1636 } else if (is_mac) {
1608 data += [ "$root_out_dir/net_unittests.dSYM/" ] 1637 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1609 } 1638 }
(...skipping 30 matching lines...) Expand all
1640 if (enable_websockets) { 1669 if (enable_websockets) {
1641 sources += [ "websockets/websocket_frame_perftest.cc" ] 1670 sources += [ "websockets/websocket_frame_perftest.cc" ]
1642 } 1671 }
1643 1672
1644 if (use_v8_in_net) { 1673 if (use_v8_in_net) {
1645 deps += [ ":net_with_v8" ] 1674 deps += [ ":net_with_v8" ]
1646 } else { 1675 } else {
1647 sources -= [ "proxy/proxy_resolver_perftest.cc" ] 1676 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1648 } 1677 }
1649 } 1678 }
OLDNEW
« no previous file with comments | « build/config/android/rules.gni ('k') | net/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698