OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """ Creates a zip file in the staging dir with the result of a compile. | 6 """ Creates a zip file in the staging dir with the result of a compile. |
7 It can be sent to other machines for testing. | 7 It can be sent to other machines for testing. |
8 """ | 8 """ |
9 | 9 |
10 import csv | 10 import csv |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 else: | 126 else: |
127 return r'^.+\.(a|dSYM)$' | 127 return r'^.+\.(a|dSYM)$' |
128 if chromium_utils.IsLinux(): | 128 if chromium_utils.IsLinux(): |
129 # object files, archives, and gcc (make build) dependency info. | 129 # object files, archives, and gcc (make build) dependency info. |
130 return r'^.+\.(o|a|d)$' | 130 return r'^.+\.(o|a|d)$' |
131 | 131 |
132 return '$NO_FILTER^' | 132 return '$NO_FILTER^' |
133 | 133 |
134 | 134 |
135 def FileExclusions(): | 135 def FileExclusions(): |
| 136 all_platforms = ['.landmines', 'obj', 'lib'] |
136 # Skip files that the testers don't care about. Mostly directories. | 137 # Skip files that the testers don't care about. Mostly directories. |
137 if chromium_utils.IsWindows(): | 138 if chromium_utils.IsWindows(): |
138 # Remove obj or lib dir entries | 139 # Remove obj or lib dir entries |
139 return ['obj', 'lib', 'cfinstaller_archive', 'installer_archive'] | 140 return all_platforms + ['cfinstaller_archive', 'installer_archive'] |
140 if chromium_utils.IsMac(): | 141 if chromium_utils.IsMac(): |
141 return [ | 142 return all_platforms + [ |
142 # We don't need the arm bits v8 builds. | 143 # We don't need the arm bits v8 builds. |
143 'd8_arm', 'v8_shell_arm', | 144 'd8_arm', 'v8_shell_arm', |
144 # pdfsqueeze is a build helper, no need to copy it to testers. | 145 # pdfsqueeze is a build helper, no need to copy it to testers. |
145 'pdfsqueeze', | 146 'pdfsqueeze', |
146 # The inspector copies its resources into a resources folder in the build | 147 # The inspector copies its resources into a resources folder in the build |
147 # output, but we only need the copy that ends up within the Chrome bundle. | 148 # output, but we only need the copy that ends up within the Chrome bundle. |
148 'resources', | 149 'resources', |
149 # We copy the framework into the app bundle, we don't need the second | 150 # We copy the framework into the app bundle, we don't need the second |
150 # copy outside the app. | 151 # copy outside the app. |
151 # TODO(mark): Since r28431, the copy in the build directory is actually | 152 # TODO(mark): Since r28431, the copy in the build directory is actually |
152 # used by tests. Putting two copies in the .zip isn't great, so maybe | 153 # used by tests. Putting two copies in the .zip isn't great, so maybe |
153 # we can find another workaround. | 154 # we can find another workaround. |
154 # 'Chromium Framework.framework', | 155 # 'Chromium Framework.framework', |
155 # 'Google Chrome Framework.framework', | 156 # 'Google Chrome Framework.framework', |
156 # We copy the Helper into the app bundle, we don't need the second | 157 # We copy the Helper into the app bundle, we don't need the second |
157 # copy outside the app. | 158 # copy outside the app. |
158 'Chromium Helper.app', | 159 'Chromium Helper.app', |
159 'Google Chrome Helper.app', | 160 'Google Chrome Helper.app', |
160 '.deps', 'obj', 'obj.host', 'obj.target', | 161 '.deps', 'obj.host', 'obj.target', |
161 ] | 162 ] |
162 if chromium_utils.IsLinux(): | 163 if chromium_utils.IsLinux(): |
163 return [ | 164 return all_platforms + [ |
164 # intermediate build directories (full of .o, .d, etc.). | 165 # intermediate build directories (full of .o, .d, etc.). |
165 'appcache', 'glue', 'googleurl', 'lib', 'lib.host', 'obj', 'obj.host', | 166 'appcache', 'glue', 'googleurl', 'lib.host', 'obj.host', |
166 'obj.target', 'src', '.deps', | 167 'obj.target', 'src', '.deps', |
167 # scons build cruft | 168 # scons build cruft |
168 '.sconsign.dblite', | 169 '.sconsign.dblite', |
169 # build helper, not needed on testers | 170 # build helper, not needed on testers |
170 'mksnapshot', | 171 'mksnapshot', |
171 ] | 172 ] |
172 | 173 |
173 return [] | 174 return all_platforms |
174 | 175 |
175 | 176 |
176 def WriteRevisionFile(dirname, build_revision): | 177 def WriteRevisionFile(dirname, build_revision): |
177 """Writes a file containing revision number to given directory. | 178 """Writes a file containing revision number to given directory. |
178 Replaces the target file in place.""" | 179 Replaces the target file in place.""" |
179 try: | 180 try: |
180 # Script only works on python 2.6 | 181 # Script only works on python 2.6 |
181 # pylint: disable=E1123 | 182 # pylint: disable=E1123 |
182 tmp_revision_file = tempfile.NamedTemporaryFile( | 183 tmp_revision_file = tempfile.NamedTemporaryFile( |
183 mode='w', dir=dirname, | 184 mode='w', dir=dirname, |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 # When option_parser is passed argv as a list, it can return the caller as | 361 # When option_parser is passed argv as a list, it can return the caller as |
361 # first unknown arg. So throw a warning if we have two or more unknown | 362 # first unknown arg. So throw a warning if we have two or more unknown |
362 # arguments. | 363 # arguments. |
363 if args[1:]: | 364 if args[1:]: |
364 print 'Warning -- unknown arguments' % args[1:] | 365 print 'Warning -- unknown arguments' % args[1:] |
365 | 366 |
366 return Archive(options) | 367 return Archive(options) |
367 | 368 |
368 if '__main__' == __name__: | 369 if '__main__' == __name__: |
369 sys.exit(main(sys.argv)) | 370 sys.exit(main(sys.argv)) |
OLD | NEW |