blob: 123932b85d1c55e7165e67e245539a5d82933d46 [file] [log] [blame]
# Copyright 2019 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{
'targets': [
{
'target_name': 'update_client',
'type': 'static_library',
'sources': [
'action_runner.cc',
'action_runner.h',
'activity_data_service.h',
'cobalt_slot_management.cc',
'cobalt_slot_management.h',
'command_line_config_policy.cc',
'command_line_config_policy.h',
'component.cc',
'component.h',
'component_patcher.cc',
'component_patcher.h',
'component_patcher_operation.cc',
'component_patcher_operation.h',
'component_unpacker.cc',
'component_unpacker.h',
'configurator.h',
'crx_downloader.cc',
'crx_downloader.h',
'crx_update_item.h',
'network.cc',
'network.h',
'patcher.h',
'persisted_data.cc',
'persisted_data.h',
'ping_manager.cc',
'ping_manager.h',
'protocol_definition.cc',
'protocol_definition.h',
'protocol_handler.cc',
'protocol_handler.h',
'protocol_parser.cc',
'protocol_parser.h',
'protocol_parser_json.cc',
'protocol_parser_json.h',
'protocol_serializer.cc',
'protocol_serializer.h',
'protocol_serializer_json.cc',
'protocol_serializer_json.h',
'request_sender.cc',
'request_sender.h',
'task.h',
'task_send_uninstall_ping.cc',
'task_send_uninstall_ping.h',
'task_traits.h',
'task_update.cc',
'task_update.h',
'unzipper.h',
'update_checker.cc',
'update_checker.h',
'update_client.cc',
'update_client.h',
'update_client_errors.h',
'update_client_internal.h',
'update_engine.cc',
'update_engine.h',
'update_query_params.cc',
'update_query_params.h',
'update_query_params_delegate.cc',
'update_query_params_delegate.h',
'updater_state.cc',
'updater_state.h',
'url_fetcher_downloader.cc',
'url_fetcher_downloader.h',
'utils.cc',
'utils.h',
],
'dependencies': [
'<(DEPTH)/components/crx_file/crx_file.gyp:crx_file',
'<(DEPTH)/components/client_update_protocol/client_update_protocol.gyp:client_update_protocol',
'<(DEPTH)/components/prefs/prefs.gyp:prefs',
'<(DEPTH)/crypto/crypto.gyp:crypto',
'<(DEPTH)/starboard/loader_app/app_key_files.gyp:app_key_files',
'<(DEPTH)/starboard/loader_app/drain_file.gyp:drain_file',
'<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
'<(DEPTH)/url/url.gyp:url',
],
'defines': [
'LIBXML_READER_ENABLED',
'LIBXML_WRITER_ENABLED',
],
},
{
'target_name': 'test_support',
'type': 'static_library',
'sources': [
'net/network_impl_cobalt.cc',
'net/network_impl_cobalt.h',
'net/network_cobalt.h',
'net/url_request_post_interceptor.cc',
'net/url_request_post_interceptor.h',
'patch/patch_impl_cobalt.cc',
'patch/patch_impl_cobalt.h',
'test_configurator.cc',
'test_configurator.h',
'unzip/unzip_impl_cobalt.cc',
'unzip/unzip_impl_cobalt.h',
],
'dependencies': [
'update_client',
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/cobalt/loader/loader.gyp:loader',
'<(DEPTH)/cobalt/debug/debug.gyp:console_command_manager',
'<(DEPTH)/components/prefs/prefs.gyp:prefs',
'<(DEPTH)/net/net.gyp:net',
'<(DEPTH)/net/net.gyp:test_support',
'<(DEPTH)/cobalt/network/network.gyp:network',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/zlib/zlib.gyp:zip',
'<(DEPTH)/url/url.gyp:url',
],
},
{
'target_name': 'update_client_test_data',
'type': 'none',
'variables': {
'content_test_input_files': [
'<(DEPTH)/components/test/data/update_client',
],
'content_test_output_subdir' : 'components/test/data',
},
'includes': ['<(DEPTH)/starboard/build/copy_test_data.gypi'],
},
{
'target_name': 'update_client_test',
'type': '<(gtest_target_type)',
'sources': [
'component_unpacker_unittest.cc',
# TODO: enable the tests commented out
# 'crx_downloader_unittest.cc',
'persisted_data_unittest.cc',
'ping_manager_unittest.cc',
'protocol_parser_json_unittest.cc',
# 'protocol_serializer_json_unittest.cc',
'protocol_serializer_unittest.cc',
'request_sender_unittest.cc',
# 'update_checker_unittest.cc',
# 'update_client_unittest.cc',
'update_query_params_unittest.cc',
'updater_state_unittest.cc',
'utils_unittest.cc',
],
'dependencies': [
'update_client',
'test_support',
'update_client_test_data',
'<(DEPTH)/cobalt/base/base.gyp:base',
'<(DEPTH)/components/prefs/prefs.gyp:prefs',
'<(DEPTH)/components/prefs/prefs.gyp:test_support',
'<(DEPTH)/components/crx_file/crx_file.gyp:crx_file',
'<(DEPTH)/net/net.gyp:test_support',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
],
'includes': [ '<(DEPTH)/cobalt/test/test.gypi' ],
},
{
'target_name': 'update_client_test_deploy',
'type': 'none',
'dependencies': [
'update_client_test',
],
'variables': {
'executable_name': 'update_client_test',
},
'includes': [ '<(DEPTH)/starboard/build/deploy.gypi' ],
},
{
'target_name': 'cobalt_slot_management_test',
'type': '<(gtest_target_type)',
'sources': [
'cobalt_slot_management_test.cc',
'<(DEPTH)/cobalt/updater/utils.cc',
'<(DEPTH)/starboard/common/test_main.cc',
'<(DEPTH)/starboard/loader_app/system_get_extension_shim.cc',
],
'dependencies': [
':update_client',
'<(DEPTH)/cobalt/base/base.gyp:base',
'<(DEPTH)/components/prefs/prefs.gyp:prefs',
'<(DEPTH)/components/prefs/prefs.gyp:test_support',
'<(DEPTH)/components/crx_file/crx_file.gyp:crx_file',
'<(DEPTH)/net/net.gyp:test_support',
'<(DEPTH)/starboard/loader_app/installation_manager.gyp:installation_manager',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
],
},
{
'target_name': 'cobalt_slot_management_test_deploy',
'type': 'none',
'dependencies': [
'cobalt_slot_management_test',
],
'variables': {
'executable_name': 'cobalt_slot_management_test',
},
'includes': [ '<(DEPTH)/starboard/build/deploy.gypi' ],
},
]
}