OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2012 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 |
| 5 { |
| 6 'variables': { |
| 7 'chromium_code': 1, |
| 8 }, |
| 9 'targets': [ |
| 10 # The core sync library. |
| 11 # |
| 12 # TODO(akalin): Rename this to something like 'sync_core' and |
| 13 # reserve the 'sync' name for the overarching library that clients |
| 14 # should depend on. |
| 15 { |
| 16 'target_name': 'sync', |
| 17 'type': 'static_library', |
| 18 'variables': { 'enable_wexit_time_destructors': 1, }, |
| 19 'include_dirs': [ |
| 20 '..', |
| 21 ], |
| 22 'dependencies': [ |
| 23 '../base/base.gyp:base', |
| 24 '../build/temp_gyp/googleurl.gyp:googleurl', |
| 25 '../crypto/crypto.gyp:crypto', |
| 26 '../net/net.gyp:net', |
| 27 '../sql/sql.gyp:sql', |
| 28 'protocol/sync_proto.gyp:sync_proto', |
| 29 ], |
| 30 'export_dependent_settings': [ |
| 31 '../base/base.gyp:base', |
| 32 '../build/temp_gyp/googleurl.gyp:googleurl', |
| 33 '../crypto/crypto.gyp:crypto', |
| 34 '../net/net.gyp:net', |
| 35 '../sql/sql.gyp:sql', |
| 36 'protocol/sync_proto.gyp:sync_proto', |
| 37 ], |
| 38 'sources': [ |
| 39 'engine/apply_updates_command.cc', |
| 40 'engine/apply_updates_command.h', |
| 41 'engine/build_commit_command.cc', |
| 42 'engine/build_commit_command.h', |
| 43 'engine/cleanup_disabled_types_command.cc', |
| 44 'engine/cleanup_disabled_types_command.h', |
| 45 'engine/clear_data_command.cc', |
| 46 'engine/clear_data_command.h', |
| 47 'engine/conflict_resolver.cc', |
| 48 'engine/conflict_resolver.h', |
| 49 'engine/download_updates_command.cc', |
| 50 'engine/download_updates_command.h', |
| 51 'engine/get_commit_ids_command.cc', |
| 52 'engine/get_commit_ids_command.h', |
| 53 'engine/model_changing_syncer_command.cc', |
| 54 'engine/model_changing_syncer_command.h', |
| 55 'engine/model_safe_worker.cc', |
| 56 'engine/model_safe_worker.h', |
| 57 'engine/passive_model_worker.cc', |
| 58 'engine/passive_model_worker.h', |
| 59 'engine/net/server_connection_manager.cc', |
| 60 'engine/net/server_connection_manager.h', |
| 61 'engine/net/url_translator.cc', |
| 62 'engine/net/url_translator.h', |
| 63 'engine/nigori_util.cc', |
| 64 'engine/nigori_util.h', |
| 65 'engine/nudge_source.cc', |
| 66 'engine/nudge_source.h', |
| 67 'engine/polling_constants.cc', |
| 68 'engine/polling_constants.h', |
| 69 'engine/post_commit_message_command.cc', |
| 70 'engine/post_commit_message_command.h', |
| 71 'engine/process_commit_response_command.cc', |
| 72 'engine/process_commit_response_command.h', |
| 73 'engine/process_updates_command.cc', |
| 74 'engine/process_updates_command.h', |
| 75 'engine/resolve_conflicts_command.cc', |
| 76 'engine/resolve_conflicts_command.h', |
| 77 'engine/store_timestamps_command.cc', |
| 78 'engine/store_timestamps_command.h', |
| 79 'engine/syncer.cc', |
| 80 'engine/syncer.h', |
| 81 'engine/syncer_command.cc', |
| 82 'engine/syncer_command.h', |
| 83 'engine/syncer_proto_util.cc', |
| 84 'engine/syncer_proto_util.h', |
| 85 'engine/sync_scheduler.cc', |
| 86 'engine/sync_scheduler.h', |
| 87 'engine/syncer_types.cc', |
| 88 'engine/syncer_types.h', |
| 89 'engine/syncer_util.cc', |
| 90 'engine/syncer_util.h', |
| 91 'engine/syncproto.h', |
| 92 'engine/update_applicator.cc', |
| 93 'engine/update_applicator.h', |
| 94 'engine/verify_updates_command.cc', |
| 95 'engine/verify_updates_command.h', |
| 96 'js/js_arg_list.cc', |
| 97 'js/js_arg_list.h', |
| 98 'js/js_backend.h', |
| 99 'js/js_controller.h', |
| 100 'js/js_event_details.cc', |
| 101 'js/js_event_details.h', |
| 102 'js/js_event_handler.h', |
| 103 'js/js_reply_handler.h', |
| 104 'js/sync_js_controller.cc', |
| 105 'js/sync_js_controller.h', |
| 106 'protocol/proto_enum_conversions.cc', |
| 107 'protocol/proto_enum_conversions.h', |
| 108 'protocol/proto_value_conversions.cc', |
| 109 'protocol/proto_value_conversions.h', |
| 110 'protocol/service_constants.h', |
| 111 'protocol/sync_protocol_error.cc', |
| 112 'protocol/sync_protocol_error.h', |
| 113 'sessions/debug_info_getter.h', |
| 114 'sessions/ordered_commit_set.cc', |
| 115 'sessions/ordered_commit_set.h', |
| 116 'sessions/session_state.cc', |
| 117 'sessions/session_state.h', |
| 118 'sessions/status_controller.cc', |
| 119 'sessions/status_controller.h', |
| 120 'sessions/sync_session.cc', |
| 121 'sessions/sync_session.h', |
| 122 'sessions/sync_session_context.cc', |
| 123 'sessions/sync_session_context.h', |
| 124 'syncable/blob.h', |
| 125 'syncable/directory_backing_store.cc', |
| 126 'syncable/directory_backing_store.h', |
| 127 'syncable/directory_change_delegate.h', |
| 128 'syncable/dir_open_result.h', |
| 129 'syncable/in_memory_directory_backing_store.cc', |
| 130 'syncable/in_memory_directory_backing_store.h', |
| 131 'syncable/model_type.cc', |
| 132 'syncable/model_type.h', |
| 133 'syncable/model_type_payload_map.cc', |
| 134 'syncable/model_type_payload_map.h', |
| 135 'syncable/on_disk_directory_backing_store.cc', |
| 136 'syncable/on_disk_directory_backing_store.h', |
| 137 'syncable/syncable.cc', |
| 138 'syncable/syncable_changes_version.h', |
| 139 'syncable/syncable_columns.h', |
| 140 'syncable/syncable_enum_conversions.cc', |
| 141 'syncable/syncable_enum_conversions.h', |
| 142 'syncable/syncable.h', |
| 143 'syncable/syncable_id.cc', |
| 144 'syncable/syncable_id.h', |
| 145 'syncable/syncable-inl.h', |
| 146 'syncable/transaction_observer.h', |
| 147 'util/cryptographer.cc', |
| 148 'util/cryptographer.h', |
| 149 |
| 150 # TODO(akalin): Figure out a better place to put |
| 151 # data_encryption_win*; it's also used by autofill. |
| 152 'util/data_encryption_win.cc', |
| 153 'util/data_encryption_win.h', |
| 154 |
| 155 'util/data_type_histogram.h', |
| 156 'util/encryptor.h', |
| 157 'util/enum_set.h', |
| 158 'util/extensions_activity_monitor.cc', |
| 159 'util/extensions_activity_monitor.h', |
| 160 'util/get_session_name.cc', |
| 161 'util/get_session_name.h', |
| 162 'util/get_session_name_mac.mm', |
| 163 'util/get_session_name_mac.h', |
| 164 'util/get_session_name_win.cc', |
| 165 'util/get_session_name_win.h', |
| 166 'util/immutable.h', |
| 167 'util/logging.cc', |
| 168 'util/logging.h', |
| 169 'util/nigori.cc', |
| 170 'util/nigori.h', |
| 171 'util/report_unrecoverable_error_function.h', |
| 172 'util/syncer_error.cc', |
| 173 'util/syncer_error.h', |
| 174 'util/time.cc', |
| 175 'util/time.h', |
| 176 'util/unrecoverable_error_handler.h', |
| 177 'util/unrecoverable_error_info.h', |
| 178 'util/unrecoverable_error_info.cc', |
| 179 'util/weak_handle.cc', |
| 180 'util/weak_handle.h', |
| 181 ], |
| 182 }, |
| 183 |
| 184 # Test support files for the 'sync' target. |
| 185 { |
| 186 'target_name': 'test_support_sync', |
| 187 'type': 'static_library', |
| 188 'variables': { 'enable_wexit_time_destructors': 1, }, |
| 189 'include_dirs': [ |
| 190 '..', |
| 191 ], |
| 192 'dependencies': [ |
| 193 '../base/base.gyp:base', |
| 194 '../testing/gmock.gyp:gmock', |
| 195 '../testing/gtest.gyp:gtest', |
| 196 'sync', |
| 197 ], |
| 198 'export_dependent_settings': [ |
| 199 '../base/base.gyp:base', |
| 200 '../testing/gmock.gyp:gmock', |
| 201 '../testing/gtest.gyp:gtest', |
| 202 'sync', |
| 203 ], |
| 204 'sources': [ |
| 205 'js/js_test_util.cc', |
| 206 'js/js_test_util.h', |
| 207 'sessions/test_util.cc', |
| 208 'sessions/test_util.h', |
| 209 'syncable/model_type_test_util.cc', |
| 210 'syncable/model_type_test_util.h', |
| 211 'syncable/syncable_mock.cc', |
| 212 'syncable/syncable_mock.h', |
| 213 'test/fake_encryptor.cc', |
| 214 'test/fake_encryptor.h', |
| 215 'test/fake_extensions_activity_monitor.cc', |
| 216 'test/fake_extensions_activity_monitor.h', |
| 217 'test/null_directory_change_delegate.cc', |
| 218 'test/null_directory_change_delegate.h', |
| 219 'test/null_transaction_observer.cc', |
| 220 'test/null_transaction_observer.h', |
| 221 'test/engine/test_directory_setter_upper.cc', |
| 222 'test/engine/test_directory_setter_upper.h', |
| 223 'test/engine/fake_model_safe_worker_registrar.cc', |
| 224 'test/engine/fake_model_safe_worker_registrar.h', |
| 225 'test/engine/fake_model_worker.cc', |
| 226 'test/engine/fake_model_worker.h', |
| 227 'test/engine/mock_connection_manager.cc', |
| 228 'test/engine/mock_connection_manager.h', |
| 229 'test/engine/syncer_command_test.cc', |
| 230 'test/engine/syncer_command_test.h', |
| 231 'test/engine/test_id_factory.h', |
| 232 'test/engine/test_syncable_utils.cc', |
| 233 'test/engine/test_syncable_utils.h', |
| 234 'test/sessions/test_scoped_session_event_listener.h', |
| 235 'test/test_directory_backing_store.cc', |
| 236 'test/test_directory_backing_store.h', |
| 237 'util/test_unrecoverable_error_handler.cc', |
| 238 'util/test_unrecoverable_error_handler.h', |
| 239 ], |
| 240 }, |
| 241 |
| 242 # Unit tests for the 'sync' target. This cannot be a static |
| 243 # library because the unit test files have to be compiled directly |
| 244 # into the executable, so we push the target files to the |
| 245 # depending executable target via direct_dependent_settings. |
| 246 { |
| 247 'target_name': 'sync_tests', |
| 248 'type': 'none', |
| 249 'dependencies': [ |
| 250 '../base/base.gyp:base', |
| 251 '../base/base.gyp:test_support_base', |
| 252 '../testing/gmock.gyp:gmock', |
| 253 '../testing/gtest.gyp:gtest', |
| 254 'sync', |
| 255 'test_support_sync', |
| 256 ], |
| 257 'export_dependent_settings': [ |
| 258 '../base/base.gyp:base', |
| 259 '../base/base.gyp:test_support_base', |
| 260 '../testing/gmock.gyp:gmock', |
| 261 '../testing/gtest.gyp:gtest', |
| 262 'sync', |
| 263 'test_support_sync', |
| 264 ], |
| 265 'direct_dependent_settings': { |
| 266 'variables': { 'enable_wexit_time_destructors': 1, }, |
| 267 'include_dirs': [ |
| 268 '..', |
| 269 ], |
| 270 'sources': [ |
| 271 'engine/apply_updates_command_unittest.cc', |
| 272 'engine/build_commit_command_unittest.cc', |
| 273 'engine/clear_data_command_unittest.cc', |
| 274 'engine/cleanup_disabled_types_command_unittest.cc', |
| 275 'engine/download_updates_command_unittest.cc', |
| 276 'engine/model_changing_syncer_command_unittest.cc', |
| 277 'engine/model_safe_worker_unittest.cc', |
| 278 'engine/nigori_util_unittest.cc', |
| 279 'engine/process_commit_response_command_unittest.cc', |
| 280 'engine/process_updates_command_unittest.cc', |
| 281 'engine/resolve_conflicts_command_unittest.cc', |
| 282 'engine/syncer_proto_util_unittest.cc', |
| 283 'engine/sync_scheduler_unittest.cc', |
| 284 'engine/sync_scheduler_whitebox_unittest.cc', |
| 285 'engine/syncer_unittest.cc', |
| 286 'engine/syncproto_unittest.cc', |
| 287 'engine/verify_updates_command_unittest.cc', |
| 288 'js/js_arg_list_unittest.cc', |
| 289 'js/js_event_details_unittest.cc', |
| 290 'js/sync_js_controller_unittest.cc', |
| 291 'protocol/proto_enum_conversions_unittest.cc', |
| 292 'protocol/proto_value_conversions_unittest.cc', |
| 293 'sessions/ordered_commit_set_unittest.cc', |
| 294 'sessions/session_state_unittest.cc', |
| 295 'sessions/status_controller_unittest.cc', |
| 296 'sessions/sync_session_context_unittest.cc', |
| 297 'sessions/sync_session_unittest.cc', |
| 298 'syncable/directory_backing_store_unittest.cc', |
| 299 'syncable/model_type_payload_map_unittest.cc', |
| 300 'syncable/model_type_unittest.cc', |
| 301 'syncable/syncable_enum_conversions_unittest.cc', |
| 302 'syncable/syncable_id_unittest.cc', |
| 303 'syncable/syncable_unittest.cc', |
| 304 'util/cryptographer_unittest.cc', |
| 305 'util/data_encryption_win_unittest.cc', |
| 306 'util/data_type_histogram_unittest.cc', |
| 307 'util/enum_set_unittest.cc', |
| 308 'util/get_session_name_unittest.cc', |
| 309 'util/immutable_unittest.cc', |
| 310 'util/nigori_unittest.cc', |
| 311 'util/protobuf_unittest.cc', |
| 312 'util/weak_handle_unittest.cc', |
| 313 ], |
| 314 }, |
| 315 }, |
| 316 |
| 317 # The unit test executable for sync tests. Currently this isn't |
| 318 # automatically run, as there is already a sync_unit_tests |
| 319 # executable in chrome.gyp; this is just to make sure that all the |
| 320 # link-time dependencies for the files in the targets above |
| 321 # resolve. |
| 322 # |
| 323 # TODO(akalin): Rename this to sync_unit_tests once we've moved |
| 324 # everything from chrome.gyp. |
| 325 # |
| 326 # TODO(akalin): Make base.gyp have a test_main target that |
| 327 # includes run_all_unittests.cc and the possible tcmalloc |
| 328 # dependency and use that everywhere. |
| 329 { |
| 330 'target_name': 'sync_unit_tests_canary', |
| 331 'type': 'executable', |
| 332 'sources': [ |
| 333 '../base/test/run_all_unittests.cc', |
| 334 ], |
| 335 'dependencies': [ |
| 336 'sync_tests', |
| 337 ], |
| 338 |
| 339 # TODO(akalin): This is needed because histogram.cc uses |
| 340 # leak_annotations.h, which pulls this in. Make 'base' |
| 341 # propagate this dependency. |
| 342 'conditions': [ |
| 343 ['OS=="linux" and linux_use_tcmalloc==1', { |
| 344 'dependencies': [ |
| 345 '../base/allocator/allocator.gyp:allocator', |
| 346 ], |
| 347 }], |
| 348 ], |
| 349 }, |
| 350 ], |
| 351 } |
OLD | NEW |