Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """ Defines variables necessary to make lightweight linux perf builds. | 5 """ Defines variables necessary to make lightweight linux perf builds. |
| 6 | 6 |
| 7 Declares required files to run manual bisect script on chrome Linux | 7 Declares required files and whitelisted files to run manual bisect |
| 8 builds in perf. Binary files that should be stripped to reduce zip file | 8 script on perf builds. Binary files that should be |
| 9 size are declared. The file list was gotten from the local chrome | 9 stripped to reduce zip file size are declared. The file list was |
| 10 executable path in Linux. (This can be retrieved by typing 'chrome://version' | 10 gotten from the local chrome executable path. (This can be retrieved by |
| 11 in chrome and following the executable path. The list needs to be updated if | 11 typing 'chrome://version' in chrome and following the executable path. |
| 12 future chrome versions require additional files. | 12 The list needs to be updated if future chrome versions require additional files. |
| 13 """ | 13 """ |
| 14 CHROME_REQUIRED_FILES = { | |
| 15 'linux': [ | |
| 16 'chrome', | |
| 17 'chrome_100_percent.pak', | |
| 18 'chrome_200_percent.pak', | |
| 19 'default_apps', | |
| 20 'icudtl.dat', | |
| 21 'libwidevinecdm.so', | |
| 22 'locales', | |
| 23 'nacl_helper', | |
| 24 'nacl_helper_bootstrap', | |
| 25 'nacl_irt_x86_64.nexe', | |
| 26 'natives_blob.bin', | |
| 27 'PepperFlash', | |
| 28 'product_logo_48.png' | |
| 29 'resources.pak', | |
| 30 'snapshot_blob.bin', | |
| 31 'xdg-mime', | |
| 32 'xdg-settings' | |
| 33 ], | |
| 34 'win': [ | |
| 35 'chrome.dll', | |
| 36 'chrome.exe', | |
| 37 'chrome_100_percent.pak', | |
| 38 'chrome_200_percent.pak', | |
| 39 'chrome_child.dll', | |
| 40 'chrome_elf.dll', | |
| 41 'chrome_watcher.dll', | |
| 42 'default_apps', | |
| 43 'd3dcompiler_47.dll', | |
| 44 'icudtl.dat', | |
| 45 'libEGL.dll', | |
| 46 'libGLESv2.dll', | |
| 47 'locales', | |
| 48 'nacl_irt_x86_64.nexe', | |
| 49 'natives_blob.bin', | |
| 50 'PepperFlash', | |
| 51 'resources.pak', | |
| 52 'SecondaryTile.png', | |
| 53 'snapshot_blob.bin' | |
| 54 ], | |
| 55 'mac': [ | |
| 56 'Google Chrome.app' | |
| 57 ] | |
| 58 } | |
| 14 | 59 |
| 15 CHROME_REQUIRED_FILES = [ | 60 CHROME_WHITELIST_FILES = { |
| 16 'chrome', | 61 'linux': '', |
| 17 'chrome_100_percent.pak', | 62 'win': '^\d+\.\d+\.\d+\.\d+\.manifest$', |
| 18 'chrome_200_percent.pak', | 63 'mac': '' |
| 19 'default_apps', | 64 } |
| 20 'icudtl.dat', | 65 |
| 21 'libwidevinecdm.so', | 66 CHROME_STRIP_LIST = { |
| 22 'locales', | 67 'linux': [ |
| 23 'nacl_helper', | 68 'chrome', |
| 24 'nacl_helper_bootstrap', | 69 'nacl_helper' |
| 25 'nacl_irt_x86_64.nexe', | 70 ], |
| 26 'natives_blob.bin', | 71 'win': [ |
| 27 'PepperFlash', | 72 # No stripping symbols from win64 archives. |
| 28 'product_logo_48.png' | 73 |
| 29 'resources.pak', | 74 ], |
| 30 'snapshot_blob.bin', | 75 'mac': [ |
| 31 'xdg-mime', | 76 # No stripping symbols from Mac archives. |
| 32 'xdg-settings', | 77 ] |
| 33 ] | 78 } |
| 34 | 79 |
| 35 | 80 |
| 36 CHROME_STRIP_LIST = [ | 81 def get_required_files(platform): |
|
ghost stip (do not use)
2016/08/31 16:38:27
could have just used CHROME_REQUIRED_FILES.get(pla
| |
| 37 'chrome', | 82 """Returns required files to run manual bisect given platform.""" |
| 38 'nacl_helper' | 83 if platform in CHROME_REQUIRED_FILES: |
| 39 ] | 84 return CHROME_REQUIRED_FILES[platform] |
| 85 return [] | |
| 86 | |
| 87 | |
| 88 def get_strip_files(platform): | |
| 89 """Returns files to strip to reduce size for given platform.""" | |
| 90 if platform in CHROME_STRIP_LIST: | |
| 91 return CHROME_STRIP_LIST[platform] | |
| 92 return [] | |
| 93 | |
| 94 | |
| 95 def get_whitelist_files(platform): | |
| 96 """Returns regex whitelist to include files given platform""" | |
| 97 if platform in CHROME_WHITELIST_FILES: | |
| 98 return CHROME_WHITELIST_FILES[platform] | |
| 99 return '' | |
| OLD | NEW |