blob: 309999a23516606e402cdcd02195eb495b3a014f [file] [log] [blame]
# Copyright 2018 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("//testing/test.gni")
import("//third_party/protobuf/proto_library.gni")
assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
component("dbus") {
output_name = "chromeos_dbus" # Avoid conflict with //dbus
defines = [ "IS_CHROMEOS_DBUS_IMPL" ]
public_deps = [
":common",
"//chromeos/dbus/constants",
"//dbus",
]
deps = [
":attestation_proto",
":authpolicy_proto",
":cicerone_proto",
":concierge_proto",
":cryptohome_proto",
":cryptohome_signkey_proto",
":login_manager_proto",
":media_perception_proto",
":metrics_event_proto",
":oobe_config_proto",
":plugin_vm_service_proto",
":power_manager_proto",
":runtime_probe_proto",
":seneschal_proto",
":smbprovider_proto",
":vm_applications_apps_proto",
"//base",
"//components/account_id",
"//components/device_event_log",
"//components/policy:cloud_policy_proto_generated_compile",
"//components/policy/proto",
"//net",
"//url",
]
sources = [
"arc_appfuse_provider_client.cc",
"arc_appfuse_provider_client.h",
"arc_midis_client.cc",
"arc_midis_client.h",
"arc_obb_mounter_client.cc",
"arc_obb_mounter_client.h",
"arc_oemcrypto_client.cc",
"arc_oemcrypto_client.h",
"audio_node.cc",
"audio_node.h",
"auth_policy/auth_policy_client.cc",
"auth_policy/auth_policy_client.h",
"auth_policy/fake_auth_policy_client.cc",
"auth_policy/fake_auth_policy_client.h",
"cec_service_client.cc",
"cec_service_client.h",
"cicerone_client.cc",
"cicerone_client.h",
"concierge_client.cc",
"concierge_client.h",
"cras_audio_client.cc",
"cras_audio_client.h",
"cros_disks_client.cc",
"cros_disks_client.h",
"cryptohome/cryptohome_client.cc",
"cryptohome/cryptohome_client.h",
"cryptohome/fake_cryptohome_client.cc",
"cryptohome/fake_cryptohome_client.h",
"dbus_client.h",
"dbus_client_implementation_type.h",
"dbus_clients_browser.cc",
"dbus_clients_browser.h",
"dbus_clients_common.cc",
"dbus_clients_common.h",
"dbus_thread_manager.cc",
"dbus_thread_manager.h",
"debug_daemon_client.cc",
"debug_daemon_client.h",
"diagnosticsd_client.cc",
"diagnosticsd_client.h",
"easy_unlock_client.cc",
"easy_unlock_client.h",
"fake_arc_appfuse_provider_client.cc",
"fake_arc_appfuse_provider_client.h",
"fake_arc_midis_client.cc",
"fake_arc_midis_client.h",
"fake_arc_obb_mounter_client.cc",
"fake_arc_obb_mounter_client.h",
"fake_arc_oemcrypto_client.cc",
"fake_arc_oemcrypto_client.h",
"fake_cec_service_client.cc",
"fake_cec_service_client.h",
"fake_cicerone_client.cc",
"fake_cicerone_client.h",
"fake_concierge_client.cc",
"fake_concierge_client.h",
"fake_cras_audio_client.cc",
"fake_cras_audio_client.h",
"fake_cros_disks_client.cc",
"fake_cros_disks_client.h",
"fake_debug_daemon_client.cc",
"fake_debug_daemon_client.h",
"fake_diagnosticsd_client.cc",
"fake_diagnosticsd_client.h",
"fake_easy_unlock_client.cc",
"fake_easy_unlock_client.h",
"fake_gsm_sms_client.cc",
"fake_gsm_sms_client.h",
"fake_image_burner_client.cc",
"fake_image_burner_client.h",
"fake_image_loader_client.cc",
"fake_image_loader_client.h",
"fake_lorgnette_manager_client.cc",
"fake_lorgnette_manager_client.h",
"fake_machine_learning_client.cc",
"fake_machine_learning_client.h",
"fake_media_analytics_client.cc",
"fake_media_analytics_client.h",
"fake_modem_messaging_client.cc",
"fake_modem_messaging_client.h",
"fake_oobe_configuration_client.cc",
"fake_oobe_configuration_client.h",
"fake_permission_broker_client.cc",
"fake_permission_broker_client.h",
"fake_runtime_probe_client.cc",
"fake_runtime_probe_client.h",
"fake_seneschal_client.cc",
"fake_seneschal_client.h",
"fake_shill_device_client.cc",
"fake_shill_device_client.h",
"fake_shill_ipconfig_client.cc",
"fake_shill_ipconfig_client.h",
"fake_shill_manager_client.cc",
"fake_shill_manager_client.h",
"fake_shill_profile_client.cc",
"fake_shill_profile_client.h",
"fake_shill_service_client.cc",
"fake_shill_service_client.h",
"fake_shill_third_party_vpn_driver_client.cc",
"fake_shill_third_party_vpn_driver_client.h",
"fake_smb_provider_client.cc",
"fake_smb_provider_client.h",
"fake_sms_client.cc",
"fake_sms_client.h",
"fake_update_engine_client.cc",
"fake_update_engine_client.h",
"fake_virtual_file_provider_client.cc",
"fake_virtual_file_provider_client.h",
"gsm_sms_client.cc",
"gsm_sms_client.h",
"hammerd/fake_hammerd_client.cc",
"hammerd/fake_hammerd_client.h",
"hammerd/hammerd_client.cc",
"hammerd/hammerd_client.h",
"image_burner_client.cc",
"image_burner_client.h",
"image_loader_client.cc",
"image_loader_client.h",
"lorgnette_manager_client.cc",
"lorgnette_manager_client.h",
"machine_learning_client.cc",
"machine_learning_client.h",
"media_analytics_client.cc",
"media_analytics_client.h",
"modem_messaging_client.cc",
"modem_messaging_client.h",
"oobe_configuration_client.cc",
"oobe_configuration_client.h",
"permission_broker_client.cc",
"permission_broker_client.h",
"power/fake_power_manager_client.cc",
"power/fake_power_manager_client.h",
"power/native_timer.cc",
"power/native_timer.h",
"power/power_manager_client.cc",
"power/power_manager_client.h",
"power/power_policy_controller.cc",
"power/power_policy_controller.h",
"runtime_probe_client.cc",
"runtime_probe_client.h",
"seneschal_client.cc",
"seneschal_client.h",
"session_manager/fake_session_manager_client.cc",
"session_manager/fake_session_manager_client.h",
"session_manager/session_manager_client.cc",
"session_manager/session_manager_client.h",
"shill_client_helper.cc",
"shill_client_helper.h",
"shill_device_client.cc",
"shill_device_client.h",
"shill_ipconfig_client.cc",
"shill_ipconfig_client.h",
"shill_manager_client.cc",
"shill_manager_client.h",
"shill_profile_client.cc",
"shill_profile_client.h",
"shill_service_client.cc",
"shill_service_client.h",
"shill_third_party_vpn_driver_client.cc",
"shill_third_party_vpn_driver_client.h",
"smb_provider_client.cc",
"smb_provider_client.h",
"sms_client.cc",
"sms_client.h",
"update_engine_client.cc",
"update_engine_client.h",
"upstart/fake_upstart_client.cc",
"upstart/fake_upstart_client.h",
"upstart/upstart_client.cc",
"upstart/upstart_client.h",
"util/account_identifier_operators.cc",
"util/account_identifier_operators.h",
"util/tpm_util.cc",
"util/tpm_util.h",
"util/version_loader.cc",
"util/version_loader.h",
"virtual_file_provider_client.cc",
"virtual_file_provider_client.h",
"volume_state.cc",
"volume_state.h",
]
}
component("common") {
output_name = "chromeos_dbus_common"
defines = [ "IS_CHROMEOS_DBUS_IMPL" ]
public_deps = [
"//chromeos/dbus/constants",
]
deps = [
"//base",
"//dbus",
"//net",
]
sources = [
"blocking_method_caller.cc",
"blocking_method_caller.h",
"dbus_method_call_status.cc",
"dbus_method_call_status.h",
"pipe_reader.cc",
"pipe_reader.h",
]
}
source_set("test_support") {
testonly = true
configs += [ "//build/config/linux/dbus" ]
public_deps = [
":dbus",
"//chromeos/dbus/constants",
"//dbus",
"//dbus:test_support",
]
deps = [
"//base",
"//testing/gmock",
"//testing/gtest",
]
}
source_set("unit_tests") {
configs += [ "//build/config/linux/dbus" ]
testonly = true
deps = [
":attestation_proto",
":dbus",
":oobe_config_proto",
":power_manager_proto",
":test_support",
"//base",
"//base/test:test_support",
"//chromeos/dbus/biod:test_support",
"//components/account_id",
"//dbus",
"//dbus:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/icu",
]
sources = [
"auth_policy/fake_auth_policy_client_unittest.cc",
"biod/biod_client_unittest.cc",
"biod/fake_biod_client_unittest.cc",
"blocking_method_caller_unittest.cc",
"cec_service_client_unittest.cc",
"cras_audio_client_unittest.cc",
"cros_disks_client_unittest.cc",
"cryptohome/fake_cryptohome_client_unittest.cc",
"dbus_thread_manager_unittest.cc",
"fake_easy_unlock_client_unittest.cc",
"gsm_sms_client_unittest.cc",
"modem_messaging_client_unittest.cc",
"native_timer_unittest.cc",
"oobe_configuration_client_unittest.cc",
"pipe_reader_unittest.cc",
"power/fake_power_manager_client_unittest.cc",
"power/power_manager_client_unittest.cc",
"power/power_policy_controller_unittest.cc",
"shill_client_unittest_base.cc",
"shill_client_unittest_base.h",
"shill_device_client_unittest.cc",
"shill_ipconfig_client_unittest.cc",
"shill_manager_client_unittest.cc",
"shill_profile_client_unittest.cc",
"shill_service_client_unittest.cc",
"shill_third_party_vpn_driver_client_unittest.cc",
"update_engine_client_unittest.cc",
"util/version_loader_unittest.cc",
]
}
proto_library("attestation_proto") {
sources = [
"proto/attestation.proto",
]
proto_out_dir = "chromeos/dbus/attestation"
}
proto_library("authpolicy_proto") {
sources = [
"//third_party/cros_system_api/dbus/authpolicy/active_directory_info.proto",
]
proto_out_dir = "chromeos/dbus/authpolicy"
}
proto_library("cicerone_proto") {
sources = [
"//third_party/cros_system_api/dbus/vm_cicerone/cicerone_service.proto",
]
proto_out_dir = "chromeos/dbus/cicerone"
}
proto_library("concierge_proto") {
sources = [
"//third_party/cros_system_api/dbus/vm_concierge/service.proto",
]
proto_out_dir = "chromeos/dbus/concierge"
}
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/dbus/cryptohome"
}
proto_library("login_manager_proto") {
sources = [
"//third_party/cros_system_api/dbus/login_manager/arc.proto",
"//third_party/cros_system_api/dbus/login_manager/policy_descriptor.proto",
]
proto_out_dir = "chromeos/dbus/login_manager"
}
proto_library("media_perception_proto") {
sources = [
"proto/media_perception.proto",
]
proto_out_dir = "chromeos/dbus/media_perception"
}
proto_library("metrics_event_proto") {
sources = [
"//third_party/cros_system_api/dbus/metrics_event/metrics_event.proto",
]
proto_out_dir = "chromeos/dbus/metrics_event"
}
proto_library("oobe_config_proto") {
sources = [
"//third_party/cros_system_api/dbus/oobe_config/oobe_config.proto",
]
proto_out_dir = "chromeos/dbus/oobe_config"
}
proto_library("plugin_vm_service_proto") {
sources = [
"//third_party/cros_system_api/dbus/plugin_vm_service/plugin_vm_service.proto",
]
proto_out_dir = "chromeos/dbus/plugin_vm_service"
}
proto_library("power_manager_proto") {
sources = [
"//third_party/cros_system_api/dbus/power_manager/backlight.proto",
"//third_party/cros_system_api/dbus/power_manager/idle.proto",
"//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",
"//third_party/cros_system_api/dbus/power_manager/switch_states.proto",
]
proto_out_dir = "chromeos/dbus/power_manager"
}
proto_library("runtime_probe_proto") {
sources = [
"//third_party/cros_system_api/dbus/runtime_probe/runtime_probe.proto",
]
# chromeos side uses full runtime, so we don't specify lite runtime in proto
# file, instead we specify lite runtime here.
cc_generator_options = "lite=true:"
proto_out_dir = "chromeos/dbus/runtime_probe"
}
proto_library("seneschal_proto") {
sources = [
"//third_party/cros_system_api/dbus/seneschal/seneschal_service.proto",
]
proto_out_dir = "chromeos/dbus/seneschal"
}
proto_library("smbprovider_proto") {
sources = [
"//third_party/cros_system_api/dbus/smbprovider/directory_entry.proto",
]
proto_out_dir = "chromeos/dbus/smbprovider"
}
proto_library("vm_applications_apps_proto") {
sources = [
"//third_party/cros_system_api/dbus/vm_applications/apps.proto",
]
proto_out_dir = "chromeos/dbus/vm_applications"
}