OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Compare the artifacts from two builds.""" | 6 """Compare the artifacts from two builds.""" |
7 | 7 |
8 import difflib | 8 import difflib |
9 import json | 9 import json |
10 import optparse | 10 import optparse |
11 import os | 11 import os |
12 import struct | 12 import struct |
13 import sys | 13 import sys |
14 import time | 14 import time |
15 | 15 |
16 from infra.libs.infra_types import freeze | 16 from infra.libs.infra_types import freeze |
17 | 17 |
18 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | 18 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) |
19 | 19 |
20 | 20 |
21 # List of files that are known to be non deterministic. This is a "temporary" | 21 # List of files that are known to be non deterministic. This is a "temporary" |
22 # workaround to find regression on the deterministic builders. | 22 # workaround to find regression on the deterministic builders. |
23 # | 23 # |
24 # PNaCl general bug: http://crbug.com/429358 | 24 # PNaCl general bug: http://crbug.com/429358 |
25 # | 25 # |
26 # TODO(sebmarchand): Remove this once all the files are deterministic. | 26 # TODO(sebmarchand): Remove this once all the files are deterministic. |
27 WHITELIST = freeze({ | 27 WHITELIST = freeze({ |
28 # http://crbug.com/383340 | 28 # http://crbug.com/383340 |
29 'android': { | 29 'android': { |
30 # Completed. | 30 'd8', |
| 31 'mksnapshot', |
31 }, | 32 }, |
32 | 33 |
33 # http://crbug.com/330263 | 34 # http://crbug.com/330263 |
34 'linux': { | 35 'linux': { |
35 # Completed. | 36 # Completed. |
36 }, | 37 }, |
37 | 38 |
38 # http://crbug.com/330262 | 39 # http://crbug.com/330262 |
39 'mac': { | 40 'mac': { |
| 41 'accessibility_unittests', |
| 42 'accessibility_unittests.isolated', |
| 43 'angle_unittests', |
| 44 'app_list_demo', |
| 45 'app_list_unittests', |
| 46 'app_list_unittests.isolated', |
| 47 'app_shell_unittests', |
| 48 'app_shell_unittests.isolated', |
| 49 'ar_sample_test_driver', |
| 50 'audio_unittests', |
| 51 'audio_unittests.isolated', |
| 52 'base_i18n_perftests', |
| 53 'base_perftests', |
40 'base_unittests', | 54 'base_unittests', |
41 'base_unittests.isolated', | 55 'base_unittests.isolated', |
| 56 'bitmaptools', |
| 57 'blink_heap_unittests', |
| 58 'blink_platform_unittests', |
| 59 'boringssl_aead_test', |
| 60 'boringssl_aes_test', |
| 61 'boringssl_base64_test', |
| 62 'boringssl_bio_test', |
| 63 'boringssl_bn_test', |
| 64 'boringssl_bytestring_test', |
| 65 'boringssl_cipher_test', |
| 66 'boringssl_cmac_test', |
| 67 'boringssl_constant_time_test', |
| 68 'boringssl_dh_test', |
| 69 'boringssl_digest_test', |
| 70 'boringssl_dsa_test', |
| 71 'boringssl_ec_test', |
| 72 'boringssl_ecdsa_test', |
| 73 'boringssl_err_test', |
| 74 'boringssl_evp_extra_test', |
| 75 'boringssl_evp_test', |
| 76 'boringssl_example_mul', |
| 77 'boringssl_gcm_test', |
| 78 'boringssl_hkdf_test', |
| 79 'boringssl_hmac_test', |
| 80 'boringssl_lhash_test', |
| 81 'boringssl_pbkdf_test', |
| 82 'boringssl_pkcs12_test', |
| 83 'boringssl_pkcs7_test', |
| 84 'boringssl_poly1305_test', |
| 85 'boringssl_pqueue_test', |
| 86 'boringssl_refcount_test', |
| 87 'boringssl_rsa_test', |
| 88 'boringssl_ssl_test', |
| 89 'boringssl_tab_test', |
| 90 'boringssl_thread_test', |
| 91 'boringssl_unittests', |
| 92 'boringssl_v3name_test', |
42 'browser_tests', | 93 'browser_tests', |
43 'browser_tests.isolated', | 94 'browser_tests.isolated', |
| 95 'build_utf8_validator_tables', |
| 96 'cacheinvalidation_unittests', |
| 97 'cacheinvalidation_unittests.isolated', |
| 98 'cast_benchmarks', |
| 99 'cast_h264_vt_encoder_unittests', |
| 100 'cast_receiver_app', |
| 101 'cast_sender_app', |
| 102 'cast_simulator', |
| 103 'cast_unittests', |
| 104 'cast_unittests.isolated', |
| 105 'cc_blink_unittests', |
| 106 'cc_perftests', |
| 107 'cc_unittests', |
| 108 'cc_unittests.isolated', |
| 109 'check_example', |
| 110 'chrome_app_unittests', |
| 111 'chrome.isolated', |
| 112 'chromedriver', |
| 113 'chromedriver_tests', |
| 114 'chromedriver_unittests', |
| 115 'chromedriver_unittests.isolated', |
| 116 'chromoting_test_driver', |
| 117 'clear_system_cache', |
| 118 'cloud_print_unittests', |
| 119 'codesighs', |
| 120 'components_browsertests', |
| 121 'components_browsertests.isolated', |
| 122 'components_perftests', |
| 123 'components_unittests', |
| 124 'components_unittests.isolated', |
| 125 'compositor_unittests', |
| 126 'compositor_unittests.isolated', |
44 'content_browsertests', | 127 'content_browsertests', |
45 'content_browsertests.isolated', | 128 'content_browsertests.isolated', |
| 129 'content_gl_benchmark', |
| 130 'content_gl_tests', |
| 131 'content_perftests', |
46 'content_unittests', | 132 'content_unittests', |
47 'content_unittests.isolated', | 133 'content_unittests.isolated', |
| 134 'courgette', |
| 135 'courgette_fuzz', |
| 136 'courgette_minimal_tool', |
| 137 'courgette_unittests', |
| 138 'courgette_unittests.isolated', |
| 139 'crash_cache', |
48 'crash_inspector', | 140 'crash_inspector', |
49 'crashpad_handler', | 141 'crashpad_handler', |
| 142 'crl_set_dump', |
| 143 'crypto_unittests', |
| 144 'crypto_unittests.isolated', |
50 'd8', | 145 'd8', |
| 146 'device_unittests', |
| 147 'device_unittests.isolated', |
| 148 'display_unittests', |
| 149 'dns_fuzz_stub', |
| 150 'dump_cache', |
| 151 'dump_syms', |
| 152 'env_chromium_unittests', |
| 153 'events_unittests', |
| 154 'events_unittests.isolated', |
51 'exif.so', | 155 'exif.so', |
| 156 'extensions_browsertests', |
| 157 'extensions_browsertests.isolated', |
| 158 'extensions_unittests', |
| 159 'extensions_unittests.isolated', |
| 160 'ffmpeg_regression_tests', |
52 'ffmpegsumo.so', | 161 'ffmpegsumo.so', |
| 162 'filter_fuzz_stub', |
| 163 'frame_analyzer', |
| 164 'gcapi_example', |
| 165 'gcm_unit_tests', |
| 166 'gcm_unit_tests.isolated', |
| 167 'gdig', |
| 168 'generate_barcode_video', |
| 169 'generate_test_gn_data', |
| 170 'generate_timecode_audio', |
53 'genmacro', | 171 'genmacro', |
54 'genmodule', | 172 'genmodule', |
55 'genperf', | 173 'genperf', |
56 'genstring', | 174 'genstring', |
57 'genversion', | 175 'genversion', |
| 176 'get_server_time', |
| 177 'gfx_unittests', |
| 178 'gin_shell', |
| 179 'gin_unittests', |
| 180 'gl_tests', |
| 181 'gl_unittests', |
| 182 'gl_unittests.isolated', |
| 183 'gles2_conform_support', |
| 184 'gles2_conform_test', |
| 185 'gn', |
| 186 'gn_unittests', |
| 187 'gn_unittests.isolated', |
| 188 'goobsdiff', |
| 189 'goobspatch', |
| 190 'google_apis_unittests', |
| 191 'google_apis_unittests.isolated', |
| 192 'gpu_perftests', |
| 193 'gpu_unittests', |
| 194 'gpu_unittests.isolated', |
| 195 'hpack_example_generator', |
| 196 'hpack_fuzz_mutator', |
| 197 'hpack_fuzz_wrapper', |
58 'image_diff', | 198 'image_diff', |
| 199 'image_operations_bench', |
59 'infoplist_strings_tool', | 200 'infoplist_strings_tool', |
60 'interactive_ui_tests', | 201 'interactive_ui_tests', |
61 'interactive_ui_tests.isolated', | 202 'interactive_ui_tests.isolated', |
62 'ipc_mojo_perftests', | 203 'ipc_mojo_perftests', |
63 'ipc_mojo_unittests', | 204 'ipc_mojo_unittests', |
| 205 'ipc_perftests', |
| 206 'ipc_tests', |
| 207 'ipc_tests.isolated', |
| 208 'jingle_unittests', |
| 209 'jingle_unittests.isolated', |
| 210 'jtl_compiler', |
| 211 'khronos_glcts_test', |
| 212 'layout_test_helper', |
| 213 'libaddressinput_unittests', |
64 'libclearkeycdm.dylib', | 214 'libclearkeycdm.dylib', |
| 215 'liblzma_decompress.dylib', |
| 216 'libmojo_public_test_support.dylib', |
| 217 'libphonenumber_unittests', |
| 218 'load_library_perf_tests', |
| 219 'macviews_interactive_ui_tests', |
| 220 'maptsvdifftool', |
| 221 'mcs_probe', |
| 222 'media_perftests', |
| 223 'media_unittests', |
| 224 'media_unittests.isolated', |
| 225 'message_center_unittests', |
| 226 'message_center_unittests.isolated', |
| 227 'midi_unittests', |
| 228 'midi_unittests.isolated', |
| 229 'minidump_stackwalk', |
65 'mksnapshot', | 230 'mksnapshot', |
| 231 'mojo_common_unittests', |
| 232 'mojo_common_unittests.isolated', |
| 233 'mojo_js_integration_tests', |
| 234 'mojo_js_unittests', |
| 235 'mojo_message_pipe_perftests', |
| 236 'mojo_public_application_unittests', |
| 237 'mojo_public_bindings_perftests', |
| 238 'mojo_public_bindings_unittests', |
| 239 'mojo_public_bindings_unittests.isolated', |
| 240 'mojo_public_environment_unittests', |
| 241 'mojo_public_environment_unittests.isolated', |
| 242 'mojo_public_system_perftests', |
| 243 'mojo_public_system_unittests', |
| 244 'mojo_public_system_unittests.isolated', |
| 245 'mojo_public_utility_unittests', |
| 246 'mojo_public_utility_unittests.isolated', |
| 247 'mojo_system_unittests', |
| 248 'nacl_loader_unittests', |
| 249 'nacl_loader_unittests.isolated', |
| 250 'net_perftests', |
66 'net_unittests', | 251 'net_unittests', |
67 'net_unittests.isolated', | 252 'net_unittests.isolated', |
| 253 'net_watcher', |
| 254 'nm2tsv', |
68 'osmesa.so', | 255 'osmesa.so', |
| 256 'pdfium_diff', |
| 257 'pdfium_test', |
69 'pdfsqueeze', | 258 'pdfsqueeze', |
70 'peerconnection_server', | 259 'peerconnection_server', |
| 260 'pepper_hash_for_uma', |
| 261 'performance_browser_tests', |
| 262 'ppapi_perftests', |
| 263 'ppapi_unittests', |
| 264 'printing_unittests', |
| 265 'printing_unittests.isolated', |
71 'protoc', | 266 'protoc', |
| 267 'qcms_test', |
| 268 'quic_client', |
| 269 'quic_server', |
72 're2c', | 270 're2c', |
| 271 'remoting_perftests', |
| 272 'remoting_start_host', |
| 273 'remoting_unittests', |
| 274 'remoting_unittests.isolated', |
| 275 'rgba_to_i420_converter', |
| 276 'rlz_id', |
| 277 'rlz_unittests', |
| 278 'run_sync_testserver', |
| 279 'run_testserver', |
| 280 'sandbox_mac_unittests', |
| 281 'sandbox_mac_unittests.isolated', |
| 282 'skia_runner', |
| 283 'skia_unittests', |
| 284 'skia_unittests.isolated', |
| 285 'snapshot_unittests', |
| 286 'sql_unittests', |
| 287 'sql_unittests.isolated', |
| 288 'stress_cache', |
| 289 'symupload', |
| 290 'sync_client', |
73 'sync_integration_tests', | 291 'sync_integration_tests', |
74 'sync_integration_tests.isolated', | 292 'sync_integration_tests.isolated', |
| 293 'sync_listen_notifications', |
| 294 'sync_performance_tests', |
| 295 'sync_unit_tests', |
| 296 'sync_unit_tests.isolated', |
| 297 'telemetry_gpu_unittests.isolated', |
| 298 'tld_cleanup', |
75 'tls_edit', | 299 'tls_edit', |
| 300 'udp_proxy', |
| 301 'ui_base_unittests', |
| 302 'ui_touch_selection_unittests', |
| 303 'ui_touch_selection_unittests.isolated', |
76 'unit_tests', | 304 'unit_tests', |
77 'unit_tests.isolated', | 305 'unit_tests.isolated', |
| 306 'url_unittests', |
| 307 'url_unittests.isolated', |
| 308 'views_examples_with_content_exe', |
| 309 'views_unittests', |
| 310 'webkit_unit_tests', |
| 311 'wifi_test', |
| 312 'wtf_unittests', |
| 313 'xz', |
| 314 'xzdec', |
78 'yasm', | 315 'yasm', |
79 }, | 316 }, |
80 | 317 |
81 # http://crbug.com/330260 | 318 # http://crbug.com/330260 |
82 'win': { | 319 'win': { |
| 320 'accessibility_unittests.exe', |
| 321 'accessibility_unittests.isolated', |
| 322 'angle_unittests.exe', |
| 323 'app_list_demo.exe', |
| 324 'app_shell_unittests.exe', |
| 325 'app_shell_unittests.isolated', |
| 326 'app_shell.exe', |
| 327 'ash_shell.exe', |
| 328 'ash_unittests.isolated', |
| 329 'audio_unittests.exe', |
| 330 'audio_unittests.isolated', |
83 'base_unittests.exe', | 331 'base_unittests.exe', |
84 'base_unittests.isolated', | 332 'base_unittests.isolated', |
| 333 'blink_heap_unittests.exe', |
| 334 'blink_platform_unittests.exe', |
85 'browser_tests.exe', | 335 'browser_tests.exe', |
86 'browser_tests.isolated', | 336 'browser_tests.isolated', |
| 337 'cast_unittests.exe', |
| 338 'cast_unittests.isolated', |
| 339 'cc_blink_unittests.exe', |
| 340 'cc_perftests.exe', |
| 341 'cc_unittests.exe', |
| 342 'cc_unittests.isolated', |
| 343 'chrome_child.dll', |
| 344 'chrome_watcher.dll', |
87 'chrome.dll', | 345 'chrome.dll', |
88 'chrome.exe', | 346 'chrome.exe', |
89 'chrome_child.dll', | 347 'chrome.isolated', |
90 'chrome_watcher.dll', | |
91 'clearkeycdm.dll', | 348 'clearkeycdm.dll', |
| 349 'components_browsertests.exe', |
| 350 'components_browsertests.isolated', |
| 351 'components_unittests.exe', |
| 352 'components_unittests.isolated', |
| 353 'compositor_unittests.exe', |
| 354 'compositor_unittests.isolated', |
92 'content_browsertests.exe', | 355 'content_browsertests.exe', |
93 'content_browsertests.isolated', | 356 'content_browsertests.isolated', |
| 357 'content_gl_benchmark.exe', |
| 358 'content_gl_tests.exe', |
| 359 'content_perftests.exe', |
| 360 'content_shell.exe', |
94 'content_unittests.exe', | 361 'content_unittests.exe', |
95 'content_unittests.isolated', | 362 'content_unittests.isolated', |
| 363 'courgette64.exe', |
| 364 'crash_service64.exe', |
| 365 'crypto_unittests.isolated', |
96 'd8.exe', | 366 'd8.exe', |
| 367 'delegate_execute_unittests.exe', |
97 'delegate_execute.exe', | 368 'delegate_execute.exe', |
98 'delegate_execute_unittests.exe', | 369 'device_unittests.exe', |
| 370 'device_unittests.isolated', |
| 371 'events_unittests.exe', |
| 372 'events_unittests.isolated', |
| 373 'extensions_browsertests.exe', |
| 374 'extensions_browsertests.isolated', |
| 375 'extensions_unittests.exe', |
| 376 'extensions_unittests.isolated', |
| 377 'gcm_unit_tests.exe', |
| 378 'gcm_unit_tests.isolated', |
| 379 'gcp_portmon64.dll', |
| 380 'gfx_unittests.exe', |
| 381 'gin_shell.exe', |
| 382 'gin_unittests.exe', |
| 383 'gl_unittests.exe', |
| 384 'gl_unittests.isolated', |
| 385 'google_apis_unittests.exe', |
| 386 'google_apis_unittests.isolated', |
| 387 'gpu_unittests.exe', |
| 388 'gpu_unittests.isolated', |
| 389 'interactive_ui_tests.exe', |
| 390 'interactive_ui_tests.isolated', |
99 'ipc_mojo_perftests.exe', | 391 'ipc_mojo_perftests.exe', |
100 'ipc_mojo_unittests.exe', | 392 'ipc_mojo_unittests.exe', |
101 'interactive_ui_tests.exe', | 393 'ipc_perftests.exe', |
102 'interactive_ui_tests.isolated', | 394 'jingle_unittests.exe', |
| 395 'jingle_unittests.isolated', |
| 396 'libaddressinput_unittests.exe', |
| 397 'media_unittests.exe', |
| 398 'media_unittests.isolated', |
103 'metro_driver.dll', | 399 'metro_driver.dll', |
| 400 'midi_unittests.exe', |
| 401 'midi_unittests.isolated', |
| 402 'mini_installer.exe', |
104 'mksnapshot.exe', | 403 'mksnapshot.exe', |
105 'mock_nacl_gdb.exe', | 404 'mock_nacl_gdb.exe', |
| 405 'mojo_js_integration_tests.exe', |
| 406 'mojo_js_unittests.exe', |
| 407 'net_perftests.exe', |
106 'net_unittests.exe', | 408 'net_unittests.exe', |
107 'net_unittests.isolated', | 409 'net_unittests.isolated', |
108 'np_test_netscape_plugin.dll', | 410 'np_test_netscape_plugin.dll', |
109 'npapi_test_plugin.dll', | 411 'npapi_test_plugin.dll', |
110 'peerconnection_server.exe', | 412 'peerconnection_server.exe', |
| 413 'performance_browser_tests.exe', |
| 414 'ppapi_unittests.exe', |
| 415 'remoting_core.dll', |
| 416 'sbox_integration_tests.isolated', |
| 417 'skia_unittests.isolated', |
| 418 'sql_unittests.exe', |
| 419 'sql_unittests.isolated', |
111 'sync_integration_tests.exe', | 420 'sync_integration_tests.exe', |
112 'sync_integration_tests.isolated', | 421 'sync_integration_tests.isolated', |
| 422 'sync_performance_tests.exe', |
| 423 'sync_unit_tests.exe', |
| 424 'sync_unit_tests.isolated', |
113 'test_registrar.exe', | 425 'test_registrar.exe', |
| 426 'ui_base_unittests.exe', |
114 'unit_tests.exe', | 427 'unit_tests.exe', |
115 'unit_tests.isolated', | 428 'unit_tests.isolated', |
| 429 'url_unittests.exe', |
| 430 'url_unittests.isolated', |
| 431 'views_examples_with_content_exe.exe', |
| 432 'views_unittests.exe', |
| 433 'webkit_unit_tests.exe', |
116 }, | 434 }, |
117 }) | 435 }) |
118 | 436 |
119 def get_files_to_compare(build_dir, recursive=False): | 437 def get_files_to_compare(build_dir, recursive=False): |
120 """Get the list of files to compare.""" | 438 """Get the list of files to compare.""" |
121 allowed = frozenset( | 439 allowed = frozenset( |
122 ('', '.apk', '.app', '.dll', '.dylib', '.exe', '.nexe', '.so')) | 440 ('', '.apk', '.app', '.dll', '.dylib', '.exe', '.nexe', '.so')) |
123 non_x_ok_exts = frozenset(('.apk', '.isolated')) | 441 non_x_ok_exts = frozenset(('.apk', '.isolated')) |
124 def check(f): | 442 def check(f): |
125 if not os.path.isfile(f): | 443 if not os.path.isfile(f): |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 parser.error('--target-platform is required') | 629 parser.error('--target-platform is required') |
312 | 630 |
313 return compare_build_artifacts(os.path.abspath(options.first_build_dir), | 631 return compare_build_artifacts(os.path.abspath(options.first_build_dir), |
314 os.path.abspath(options.second_build_dir), | 632 os.path.abspath(options.second_build_dir), |
315 options.target_platform, | 633 options.target_platform, |
316 options.recursive) | 634 options.recursive) |
317 | 635 |
318 | 636 |
319 if __name__ == '__main__': | 637 if __name__ == '__main__': |
320 sys.exit(main()) | 638 sys.exit(main()) |
OLD | NEW |