OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 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 """Runs all the buildbot steps for ChromeDriver except for update/compile.""" | 6 """Runs all the buildbot steps for ChromeDriver except for update/compile.""" |
7 | 7 |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import platform | 10 import platform |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 time.sleep(60) | 174 time.sleep(60) |
175 util.PrintAndFlush('Got snapshot revision %s' % snapshot_revision) | 175 util.PrintAndFlush('Got snapshot revision %s' % snapshot_revision) |
176 | 176 |
177 | 177 |
178 def main(): | 178 def main(): |
179 parser = optparse.OptionParser() | 179 parser = optparse.OptionParser() |
180 parser.add_option( | 180 parser.add_option( |
181 '', '--android-package', | 181 '', '--android-package', |
182 help='Application package name, if running tests on Android.') | 182 help='Application package name, if running tests on Android.') |
183 parser.add_option( | 183 parser.add_option( |
184 '', '--android', action='store_true', default=False, | |
185 help='Run tests on stable and beta channels on Android.') | |
frankf
2013/08/20 18:13:50
Why don't you just list the package names, instead
| |
186 parser.add_option( | |
184 '-r', '--revision', type='string', default=None, | 187 '-r', '--revision', type='string', default=None, |
185 help='Chromium revision') | 188 help='Chromium revision') |
186 options, _ = parser.parse_args() | 189 options, _ = parser.parse_args() |
187 | 190 |
188 if not options.android_package: | 191 if not options.android_package and not options.android: |
189 KillChromes() | 192 KillChromes() |
190 CleanTmpDir() | 193 CleanTmpDir() |
191 | 194 |
192 if options.android_package: | 195 if options.android_package or options.android: |
193 Download() | 196 Download() |
194 else: | 197 else: |
195 if not options.revision: | 198 if not options.revision: |
196 parser.error('Must supply a --revision') | 199 parser.error('Must supply a --revision') |
197 | 200 |
198 if util.IsLinux() and platform.architecture()[0] == '64bit': | 201 if util.IsLinux() and platform.architecture()[0] == '64bit': |
199 Archive(options.revision) | 202 Archive(options.revision) |
200 | 203 |
201 WaitForLatestSnapshot(options.revision) | 204 WaitForLatestSnapshot(options.revision) |
202 | 205 |
203 cmd = [ | 206 cmd = [ |
204 sys.executable, | 207 sys.executable, |
205 os.path.join(_THIS_DIR, 'test', 'run_all_tests.py'), | 208 os.path.join(_THIS_DIR, 'test', 'run_all_tests.py'), |
206 ] | 209 ] |
207 if options.android_package: | 210 if options.android_package: |
208 cmd.append('--android-package=' + options.android_package) | 211 cmd.append('--android-package=' + options.android_package) |
212 if options.android: | |
213 cmd.append('--android') | |
209 | 214 |
210 passed = (util.RunCommand(cmd) == 0) | 215 passed = (util.RunCommand(cmd) == 0) |
211 | 216 |
212 if not options.android_package and passed: | 217 if not options.android_package and passed: |
213 MaybeRelease(options.revision) | 218 MaybeRelease(options.revision) |
214 | 219 |
215 | 220 |
216 if __name__ == '__main__': | 221 if __name__ == '__main__': |
217 main() | 222 main() |
OLD | NEW |