blob: 7da2f4a087de389cf5e0e3d6e26cbc2d9951ede9 [file] [log] [blame]
[email protected]743530f2014-06-12 19:38:501# 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
mukai6ba73552014-10-09 19:05:175import("//build/config/allocator.gni")
6import("//build/config/ui.gni")
[email protected]743530f2014-06-12 19:38:507import("//third_party/protobuf/proto_library.gni")
8
mukai327e5f52014-10-16 19:10:529assert(is_chromeos, "Non-ChromeOS builds must not depend on //chromeos")
10
scottmg34fb7e52014-12-03 23:27:2411gypi_values = exec_script("//build/gypi_to_gn.py",
12 [ rebase_path("chromeos.gyp") ],
13 "scope",
14 [ "chromeos.gyp" ])
mukai6ba73552014-10-09 19:05:1715
16component("chromeos") {
scottmg34fb7e52014-12-03 23:27:2417 configs += [ "//net/third_party/nss/ssl:ssl_config" ]
18 public_deps = [
19 "//dbus",
mukai6ba73552014-10-09 19:05:1720 ]
21 deps = [
22 "//base",
Nico Webera3d0a422015-01-20 21:46:2123 "//base:i18n",
mukai6ba73552014-10-09 19:05:1724 "//base:prefs",
25 "//base/third_party/dynamic_annotations",
26 "//chromeos/ime:gencode",
27 "//components/policy/proto",
28 "//components/onc",
29 "//crypto",
mukai6ba73552014-10-09 19:05:1730 "//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 Webera3d0a422015-01-20 21:46:2136 "//ui/gfx/geometry",
mukai6ba73552014-10-09 19:05:1737 "//url",
38 ":cryptohome_proto",
scottmg34fb7e52014-12-03 23:27:2439 ":power_manager_proto",
mukai6ba73552014-10-09 19:05:1740 ]
41 sources = gypi_values.chromeos_sources
42 defines = [ "CHROMEOS_IMPLEMENTATION" ]
mukai6ba73552014-10-09 19:05:1743}
44
45static_library("test_support") {
46 testonly = true
scottmg34fb7e52014-12-03 23:27:2447 configs += [ "//build/config/linux:dbus" ]
mukai6ba73552014-10-09 19:05:1748 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",
pstew9d392082014-11-05 14:45:2066 "dbus/mock_lorgnette_manager_client.cc",
67 "dbus/mock_lorgnette_manager_client.h",
mukai6ba73552014-10-09 19:05:1768 "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",
hashimoto1472afe2014-11-18 06:18:4076 "dbus/services/service_provider_test_helper.cc",
77 "dbus/services/service_provider_test_helper.h",
mukai6ba73552014-10-09 19:05:1778 "disks/mock_disk_mount_manager.cc",
79 "disks/mock_disk_mount_manager.h",
brettw6c1a7722015-01-06 08:34:2480 "login/auth/fake_extended_authenticator.cc",
81 "login/auth/fake_extended_authenticator.h",
mukai6ba73552014-10-09 19:05:1782 "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",
jamesr29ea2d122014-10-23 10:30:2796 "system/fake_statistics_provider.cc",
97 "system/fake_statistics_provider.h",
mukai6ba73552014-10-09 19:05:1798 ]
99}
100
101static_library("test_support_without_gmock") {
102 testonly = true
scottmg34fb7e52014-12-03 23:27:24103 configs += [ "//build/config/linux:dbus" ]
mukai6ba73552014-10-09 19:05:17104 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",
mukai6ba73552014-10-09 19:05:17121 ]
122}
123
124test("chromeos_unittests") {
125 configs += [
126 "//build/config/linux:dbus",
127 "//net/third_party/nss/ssl:ssl_config",
128 ]
129 deps = [
jamescook9439c7392014-12-18 01:47:25130 "//base:prefs_test_support",
mukai6ba73552014-10-09 19:05:17131 "//base/test:run_all_unittests",
132 "//base/test:test_support",
133 "//components/onc",
mukai6ba73552014-10-09 19:05:17134 "//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 }
mukai6ba73552014-10-09 19:05:17151}
152
[email protected]743530f2014-06-12 19:38:50153proto_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 ]
mukai6ba73552014-10-09 19:05:17161
162 proto_out_dir = "chromeos/dbus/power_manager"
163}
164
165proto_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
174proto_library("cryptohome_signkey_proto") {
175 sources = [
176 "//third_party/cros_system_api/dbus/cryptohome/signed_secret.proto",
177 ]
178
mukai4e5b67db2014-10-10 21:08:23179 proto_out_dir = "chromeos/cryptohome"
[email protected]743530f2014-06-12 19:38:50180}