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'] | |
M-A Ruel
2012/11/13 21:40:57
You could add 'obj' and 'lib' to this list and rem
iannucci
2012/11/13 22:04:23
Done.
| |
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 + ['obj', 'lib', 'cfinstaller_archive', |
141 'installer_archive'] | |
140 if chromium_utils.IsMac(): | 142 if chromium_utils.IsMac(): |
141 return [ | 143 return all_platforms + [ |
142 # We don't need the arm bits v8 builds. | 144 # We don't need the arm bits v8 builds. |
143 'd8_arm', 'v8_shell_arm', | 145 'd8_arm', 'v8_shell_arm', |
144 # pdfsqueeze is a build helper, no need to copy it to testers. | 146 # pdfsqueeze is a build helper, no need to copy it to testers. |
145 'pdfsqueeze', | 147 'pdfsqueeze', |
146 # The inspector copies its resources into a resources folder in the build | 148 # 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. | 149 # output, but we only need the copy that ends up within the Chrome bundle. |
148 'resources', | 150 'resources', |
149 # We copy the framework into the app bundle, we don't need the second | 151 # We copy the framework into the app bundle, we don't need the second |
150 # copy outside the app. | 152 # copy outside the app. |
151 # TODO(mark): Since r28431, the copy in the build directory is actually | 153 # 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 | 154 # used by tests. Putting two copies in the .zip isn't great, so maybe |
153 # we can find another workaround. | 155 # we can find another workaround. |
154 # 'Chromium Framework.framework', | 156 # 'Chromium Framework.framework', |
155 # 'Google Chrome Framework.framework', | 157 # 'Google Chrome Framework.framework', |
156 # We copy the Helper into the app bundle, we don't need the second | 158 # We copy the Helper into the app bundle, we don't need the second |
157 # copy outside the app. | 159 # copy outside the app. |
158 'Chromium Helper.app', | 160 'Chromium Helper.app', |
159 'Google Chrome Helper.app', | 161 'Google Chrome Helper.app', |
160 '.deps', 'obj', 'obj.host', 'obj.target', | 162 '.deps', 'obj', 'obj.host', 'obj.target', |
161 ] | 163 ] |
162 if chromium_utils.IsLinux(): | 164 if chromium_utils.IsLinux(): |
163 return [ | 165 return all_platforms + [ |
164 # intermediate build directories (full of .o, .d, etc.). | 166 # intermediate build directories (full of .o, .d, etc.). |
165 'appcache', 'glue', 'googleurl', 'lib', 'lib.host', 'obj', 'obj.host', | 167 'appcache', 'glue', 'googleurl', 'lib', 'lib.host', 'obj', 'obj.host', |
166 'obj.target', 'src', '.deps', | 168 'obj.target', 'src', '.deps', |
167 # scons build cruft | 169 # scons build cruft |
168 '.sconsign.dblite', | 170 '.sconsign.dblite', |
169 # build helper, not needed on testers | 171 # build helper, not needed on testers |
170 'mksnapshot', | 172 'mksnapshot', |
171 ] | 173 ] |
172 | 174 |
173 return [] | 175 return all_platforms |
174 | 176 |
175 | 177 |
176 def WriteRevisionFile(dirname, build_revision): | 178 def WriteRevisionFile(dirname, build_revision): |
177 """Writes a file containing revision number to given directory. | 179 """Writes a file containing revision number to given directory. |
178 Replaces the target file in place.""" | 180 Replaces the target file in place.""" |
179 try: | 181 try: |
180 # Script only works on python 2.6 | 182 # Script only works on python 2.6 |
181 # pylint: disable=E1123 | 183 # pylint: disable=E1123 |
182 tmp_revision_file = tempfile.NamedTemporaryFile( | 184 tmp_revision_file = tempfile.NamedTemporaryFile( |
183 mode='w', dir=dirname, | 185 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 | 362 # 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 | 363 # first unknown arg. So throw a warning if we have two or more unknown |
362 # arguments. | 364 # arguments. |
363 if args[1:]: | 365 if args[1:]: |
364 print 'Warning -- unknown arguments' % args[1:] | 366 print 'Warning -- unknown arguments' % args[1:] |
365 | 367 |
366 return Archive(options) | 368 return Archive(options) |
367 | 369 |
368 if '__main__' == __name__: | 370 if '__main__' == __name__: |
369 sys.exit(main(sys.argv)) | 371 sys.exit(main(sys.argv)) |
OLD | NEW |