| # Copyright 2014 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. |
| |
| import("//build/config/allocator.gni") |
| import("//build/config/ui.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| assert(is_chromeos, "Non-ChromeOS builds must not depend on //chromeos") |
| |
| gypi_values = exec_script("//build/gypi_to_gn.py", |
| [ rebase_path("chromeos.gyp") ], |
| "scope", |
| [ "chromeos.gyp" ]) |
| |
| component("chromeos") { |
| configs += [ "//net/third_party/nss/ssl:ssl_config" ] |
| public_deps = [ |
| "//dbus", |
| ] |
| deps = [ |
| "//base", |
| "//base:prefs", |
| "//base/third_party/dynamic_annotations", |
| "//chromeos/ime:gencode", |
| "//components/policy/proto", |
| "//components/onc", |
| "//crypto", |
| "//google_apis", |
| "//net/third_party/nss/ssl:libssl", |
| "//third_party/icu", |
| "//third_party/libxml", |
| "//third_party/protobuf:protobuf_lite", |
| "//ui/accelerometer", |
| "//url", |
| ":cryptohome_proto", |
| ":power_manager_proto", |
| ] |
| sources = gypi_values.chromeos_sources |
| defines = [ "CHROMEOS_IMPLEMENTATION" ] |
| } |
| |
| static_library("test_support") { |
| testonly = true |
| configs += [ "//build/config/linux:dbus" ] |
| deps = [ |
| "//testing/gmock", |
| ":chromeos", |
| ":cryptohome_proto", |
| ":power_manager_proto", |
| ":test_support_without_gmock", |
| ] |
| sources = [ |
| "attestation/mock_attestation_flow.cc", |
| "attestation/mock_attestation_flow.h", |
| "chromeos_test_utils.cc", |
| "chromeos_test_utils.h", |
| "cryptohome/mock_async_method_caller.cc", |
| "cryptohome/mock_async_method_caller.h", |
| "cryptohome/mock_homedir_methods.cc", |
| "cryptohome/mock_homedir_methods.h", |
| "dbus/mock_cryptohome_client.cc", |
| "dbus/mock_cryptohome_client.h", |
| "dbus/mock_lorgnette_manager_client.cc", |
| "dbus/mock_lorgnette_manager_client.h", |
| "dbus/mock_session_manager_client.cc", |
| "dbus/mock_session_manager_client.h", |
| "dbus/mock_shill_manager_client.cc", |
| "dbus/mock_shill_manager_client.h", |
| "dbus/mock_shill_profile_client.cc", |
| "dbus/mock_shill_profile_client.h", |
| "dbus/mock_shill_service_client.cc", |
| "dbus/mock_shill_service_client.h", |
| "dbus/services/service_provider_test_helper.cc", |
| "dbus/services/service_provider_test_helper.h", |
| "disks/mock_disk_mount_manager.cc", |
| "disks/mock_disk_mount_manager.h", |
| "login/auth/mock_auth_attempt_state_resolver.cc", |
| "login/auth/mock_auth_attempt_state_resolver.h", |
| "login/auth/mock_auth_status_consumer.cc", |
| "login/auth/mock_auth_status_consumer.h", |
| "login/auth/mock_authenticator.cc", |
| "login/auth/mock_authenticator.h", |
| "login/auth/mock_url_fetchers.cc", |
| "login/auth/mock_url_fetchers.h", |
| "network/fake_network_device_handler.cc", |
| "network/fake_network_device_handler.h", |
| "network/mock_managed_network_configuration_handler.cc", |
| "network/mock_managed_network_configuration_handler.h", |
| "network/onc/onc_test_utils.cc", |
| "network/onc/onc_test_utils.h", |
| "system/fake_statistics_provider.cc", |
| "system/fake_statistics_provider.h", |
| ] |
| } |
| |
| static_library("test_support_without_gmock") { |
| testonly = true |
| configs += [ "//build/config/linux:dbus" ] |
| deps = [ |
| "//crypto", |
| ":chromeos", |
| ":cryptohome_proto", |
| ":power_manager_proto", |
| ] |
| sources = [ |
| "dbus/fake_cros_disks_client.cc", |
| "dbus/fake_cros_disks_client.h", |
| "dbus/fake_power_manager_client.cc", |
| "dbus/fake_power_manager_client.h", |
| "dbus/fake_session_manager_client.cc", |
| "dbus/fake_session_manager_client.h", |
| "dbus/fake_shill_manager_client.cc", |
| "dbus/fake_shill_manager_client.h", |
| "dbus/fake_update_engine_client.cc", |
| "dbus/fake_update_engine_client.h", |
| ] |
| } |
| |
| test("chromeos_unittests") { |
| configs += [ |
| "//build/config/linux:dbus", |
| "//net/third_party/nss/ssl:ssl_config", |
| ] |
| deps = [ |
| "//base:prefs_test_support", |
| "//base/test:run_all_unittests", |
| "//base/test:test_support", |
| "//components/onc", |
| "//content/test:test_support", |
| "//crypto", |
| "//crypto:test_support", |
| "//dbus:test_support", |
| "//google_apis", |
| "//net", |
| "//net:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//url", |
| ":cryptohome_proto", |
| ":power_manager_proto", |
| ":test_support", |
| ] |
| sources = gypi_values.chromeos_test_sources |
| if (use_allocator != "none") { |
| deps += [ "//base/allocator" ] |
| } |
| if (use_x11) { |
| deps += [ "//ui/gfx/x" ] |
| } |
| } |
| |
| proto_library("power_manager_proto") { |
| sources = [ |
| "//third_party/cros_system_api/dbus/power_manager/input_event.proto", |
| "//third_party/cros_system_api/dbus/power_manager/peripheral_battery_status.proto", |
| "//third_party/cros_system_api/dbus/power_manager/policy.proto", |
| "//third_party/cros_system_api/dbus/power_manager/power_supply_properties.proto", |
| "//third_party/cros_system_api/dbus/power_manager/suspend.proto", |
| ] |
| |
| proto_out_dir = "chromeos/dbus/power_manager" |
| } |
| |
| proto_library("cryptohome_proto") { |
| sources = [ |
| "//third_party/cros_system_api/dbus/cryptohome/key.proto", |
| "//third_party/cros_system_api/dbus/cryptohome/rpc.proto", |
| ] |
| |
| proto_out_dir = "chromeos/dbus/cryptohome" |
| } |
| |
| proto_library("cryptohome_signkey_proto") { |
| sources = [ |
| "//third_party/cros_system_api/dbus/cryptohome/signed_secret.proto", |
| ] |
| |
| proto_out_dir = "chromeos/cryptohome" |
| } |