[email protected] | 743530f | 2014-06-12 19:38:50 | [diff] [blame] | 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. |
| 4 | |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 5 | import("//build/config/allocator.gni") |
| 6 | import("//build/config/ui.gni") |
[email protected] | 743530f | 2014-06-12 19:38:50 | [diff] [blame] | 7 | import("//third_party/protobuf/proto_library.gni") |
| 8 | |
mukai | 327e5f5 | 2014-10-16 19:10:52 | [diff] [blame] | 9 | assert(is_chromeos, "Non-ChromeOS builds must not depend on //chromeos") |
| 10 | |
scottmg | 34fb7e5 | 2014-12-03 23:27:24 | [diff] [blame] | 11 | gypi_values = exec_script("//build/gypi_to_gn.py", |
| 12 | [ rebase_path("chromeos.gyp") ], |
| 13 | "scope", |
| 14 | [ "chromeos.gyp" ]) |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 15 | |
| 16 | component("chromeos") { |
scottmg | 34fb7e5 | 2014-12-03 23:27:24 | [diff] [blame] | 17 | configs += [ "//net/third_party/nss/ssl:ssl_config" ] |
| 18 | public_deps = [ |
| 19 | "//dbus", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 20 | ] |
| 21 | deps = [ |
| 22 | "//base", |
Nico Weber | a3d0a42 | 2015-01-20 21:46:21 | [diff] [blame^] | 23 | "//base:i18n", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 24 | "//base:prefs", |
| 25 | "//base/third_party/dynamic_annotations", |
| 26 | "//chromeos/ime:gencode", |
| 27 | "//components/policy/proto", |
| 28 | "//components/onc", |
| 29 | "//crypto", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 30 | "//google_apis", |
| 31 | "//net/third_party/nss/ssl:libssl", |
| 32 | "//third_party/icu", |
| 33 | "//third_party/libxml", |
| 34 | "//third_party/protobuf:protobuf_lite", |
| 35 | "//ui/accelerometer", |
Nico Weber | a3d0a42 | 2015-01-20 21:46:21 | [diff] [blame^] | 36 | "//ui/gfx/geometry", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 37 | "//url", |
| 38 | ":cryptohome_proto", |
scottmg | 34fb7e5 | 2014-12-03 23:27:24 | [diff] [blame] | 39 | ":power_manager_proto", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 40 | ] |
| 41 | sources = gypi_values.chromeos_sources |
| 42 | defines = [ "CHROMEOS_IMPLEMENTATION" ] |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | static_library("test_support") { |
| 46 | testonly = true |
scottmg | 34fb7e5 | 2014-12-03 23:27:24 | [diff] [blame] | 47 | configs += [ "//build/config/linux:dbus" ] |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 48 | deps = [ |
| 49 | "//testing/gmock", |
| 50 | ":chromeos", |
| 51 | ":cryptohome_proto", |
| 52 | ":power_manager_proto", |
| 53 | ":test_support_without_gmock", |
| 54 | ] |
| 55 | sources = [ |
| 56 | "attestation/mock_attestation_flow.cc", |
| 57 | "attestation/mock_attestation_flow.h", |
| 58 | "chromeos_test_utils.cc", |
| 59 | "chromeos_test_utils.h", |
| 60 | "cryptohome/mock_async_method_caller.cc", |
| 61 | "cryptohome/mock_async_method_caller.h", |
| 62 | "cryptohome/mock_homedir_methods.cc", |
| 63 | "cryptohome/mock_homedir_methods.h", |
| 64 | "dbus/mock_cryptohome_client.cc", |
| 65 | "dbus/mock_cryptohome_client.h", |
pstew | 9d39208 | 2014-11-05 14:45:20 | [diff] [blame] | 66 | "dbus/mock_lorgnette_manager_client.cc", |
| 67 | "dbus/mock_lorgnette_manager_client.h", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 68 | "dbus/mock_session_manager_client.cc", |
| 69 | "dbus/mock_session_manager_client.h", |
| 70 | "dbus/mock_shill_manager_client.cc", |
| 71 | "dbus/mock_shill_manager_client.h", |
| 72 | "dbus/mock_shill_profile_client.cc", |
| 73 | "dbus/mock_shill_profile_client.h", |
| 74 | "dbus/mock_shill_service_client.cc", |
| 75 | "dbus/mock_shill_service_client.h", |
hashimoto | 1472afe | 2014-11-18 06:18:40 | [diff] [blame] | 76 | "dbus/services/service_provider_test_helper.cc", |
| 77 | "dbus/services/service_provider_test_helper.h", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 78 | "disks/mock_disk_mount_manager.cc", |
| 79 | "disks/mock_disk_mount_manager.h", |
brettw | 6c1a772 | 2015-01-06 08:34:24 | [diff] [blame] | 80 | "login/auth/fake_extended_authenticator.cc", |
| 81 | "login/auth/fake_extended_authenticator.h", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 82 | "login/auth/mock_auth_attempt_state_resolver.cc", |
| 83 | "login/auth/mock_auth_attempt_state_resolver.h", |
| 84 | "login/auth/mock_auth_status_consumer.cc", |
| 85 | "login/auth/mock_auth_status_consumer.h", |
| 86 | "login/auth/mock_authenticator.cc", |
| 87 | "login/auth/mock_authenticator.h", |
| 88 | "login/auth/mock_url_fetchers.cc", |
| 89 | "login/auth/mock_url_fetchers.h", |
| 90 | "network/fake_network_device_handler.cc", |
| 91 | "network/fake_network_device_handler.h", |
| 92 | "network/mock_managed_network_configuration_handler.cc", |
| 93 | "network/mock_managed_network_configuration_handler.h", |
| 94 | "network/onc/onc_test_utils.cc", |
| 95 | "network/onc/onc_test_utils.h", |
jamesr | 29ea2d12 | 2014-10-23 10:30:27 | [diff] [blame] | 96 | "system/fake_statistics_provider.cc", |
| 97 | "system/fake_statistics_provider.h", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 98 | ] |
| 99 | } |
| 100 | |
| 101 | static_library("test_support_without_gmock") { |
| 102 | testonly = true |
scottmg | 34fb7e5 | 2014-12-03 23:27:24 | [diff] [blame] | 103 | configs += [ "//build/config/linux:dbus" ] |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 104 | deps = [ |
| 105 | "//crypto", |
| 106 | ":chromeos", |
| 107 | ":cryptohome_proto", |
| 108 | ":power_manager_proto", |
| 109 | ] |
| 110 | sources = [ |
| 111 | "dbus/fake_cros_disks_client.cc", |
| 112 | "dbus/fake_cros_disks_client.h", |
| 113 | "dbus/fake_power_manager_client.cc", |
| 114 | "dbus/fake_power_manager_client.h", |
| 115 | "dbus/fake_session_manager_client.cc", |
| 116 | "dbus/fake_session_manager_client.h", |
| 117 | "dbus/fake_shill_manager_client.cc", |
| 118 | "dbus/fake_shill_manager_client.h", |
| 119 | "dbus/fake_update_engine_client.cc", |
| 120 | "dbus/fake_update_engine_client.h", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 121 | ] |
| 122 | } |
| 123 | |
| 124 | test("chromeos_unittests") { |
| 125 | configs += [ |
| 126 | "//build/config/linux:dbus", |
| 127 | "//net/third_party/nss/ssl:ssl_config", |
| 128 | ] |
| 129 | deps = [ |
jamescook | 9439c739 | 2014-12-18 01:47:25 | [diff] [blame] | 130 | "//base:prefs_test_support", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 131 | "//base/test:run_all_unittests", |
| 132 | "//base/test:test_support", |
| 133 | "//components/onc", |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 134 | "//crypto", |
| 135 | "//crypto:test_support", |
| 136 | "//dbus:test_support", |
| 137 | "//google_apis", |
| 138 | "//net", |
| 139 | "//net:test_support", |
| 140 | "//testing/gmock", |
| 141 | "//testing/gtest", |
| 142 | "//url", |
| 143 | ":cryptohome_proto", |
| 144 | ":power_manager_proto", |
| 145 | ":test_support", |
| 146 | ] |
| 147 | sources = gypi_values.chromeos_test_sources |
| 148 | if (use_allocator != "none") { |
| 149 | deps += [ "//base/allocator" ] |
| 150 | } |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 151 | } |
| 152 | |
[email protected] | 743530f | 2014-06-12 19:38:50 | [diff] [blame] | 153 | proto_library("power_manager_proto") { |
| 154 | sources = [ |
| 155 | "//third_party/cros_system_api/dbus/power_manager/input_event.proto", |
| 156 | "//third_party/cros_system_api/dbus/power_manager/peripheral_battery_status.proto", |
| 157 | "//third_party/cros_system_api/dbus/power_manager/policy.proto", |
| 158 | "//third_party/cros_system_api/dbus/power_manager/power_supply_properties.proto", |
| 159 | "//third_party/cros_system_api/dbus/power_manager/suspend.proto", |
| 160 | ] |
mukai | 6ba7355 | 2014-10-09 19:05:17 | [diff] [blame] | 161 | |
| 162 | proto_out_dir = "chromeos/dbus/power_manager" |
| 163 | } |
| 164 | |
| 165 | proto_library("cryptohome_proto") { |
| 166 | sources = [ |
| 167 | "//third_party/cros_system_api/dbus/cryptohome/key.proto", |
| 168 | "//third_party/cros_system_api/dbus/cryptohome/rpc.proto", |
| 169 | ] |
| 170 | |
| 171 | proto_out_dir = "chromeos/dbus/cryptohome" |
| 172 | } |
| 173 | |
| 174 | proto_library("cryptohome_signkey_proto") { |
| 175 | sources = [ |
| 176 | "//third_party/cros_system_api/dbus/cryptohome/signed_secret.proto", |
| 177 | ] |
| 178 | |
mukai | 4e5b67db | 2014-10-10 21:08:23 | [diff] [blame] | 179 | proto_out_dir = "chromeos/cryptohome" |
[email protected] | 743530f | 2014-06-12 19:38:50 | [diff] [blame] | 180 | } |