| 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 bisect | 8 import bisect |
| 9 import csv | 9 import csv |
| 10 import datetime | 10 import datetime |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 util.PrintAndFlush('Got snapshot revision %s' % snapshot_revision) | 384 util.PrintAndFlush('Got snapshot revision %s' % snapshot_revision) |
| 385 | 385 |
| 386 | 386 |
| 387 def main(): | 387 def main(): |
| 388 parser = optparse.OptionParser() | 388 parser = optparse.OptionParser() |
| 389 parser.add_option( | 389 parser.add_option( |
| 390 '', '--android-packages', | 390 '', '--android-packages', |
| 391 help='Comma separated list of application package names, ' | 391 help='Comma separated list of application package names, ' |
| 392 'if running tests on Android.') | 392 'if running tests on Android.') |
| 393 parser.add_option( | 393 parser.add_option( |
| 394 '-r', '--revision', type='int', default=None, | 394 '-r', '--revision', type='int', help='Chromium revision') |
| 395 help='Chromium revision') | 395 parser.add_option('', '--update-log', action='store_true', |
| 396 help='Update the test results log (only applicable to Android)') |
| 396 options, _ = parser.parse_args() | 397 options, _ = parser.parse_args() |
| 397 | 398 |
| 398 bitness = '32' | 399 bitness = '32' |
| 399 if util.IsLinux() and platform_module.architecture()[0] == '64bit': | 400 if util.IsLinux() and platform_module.architecture()[0] == '64bit': |
| 400 bitness = '64' | 401 bitness = '64' |
| 401 platform = '%s%s' % (util.GetPlatformName(), bitness) | 402 platform = '%s%s' % (util.GetPlatformName(), bitness) |
| 402 if options.android_packages: | 403 if options.android_packages: |
| 403 platform = 'android' | 404 platform = 'android' |
| 404 | 405 |
| 405 if platform != 'android': | 406 if platform != 'android': |
| 406 KillChromes() | 407 KillChromes() |
| 407 CleanTmpDir() | 408 CleanTmpDir() |
| 408 | 409 |
| 409 if platform == 'android': | 410 if platform == 'android': |
| 411 if not options.revision and options.update_log: |
| 412 parser.error('Must supply a --revision with --update-log') |
| 410 DownloadPrebuilts() | 413 DownloadPrebuilts() |
| 411 else: | 414 else: |
| 412 if not options.revision: | 415 if not options.revision: |
| 413 parser.error('Must supply a --revision') | 416 parser.error('Must supply a --revision') |
| 414 | |
| 415 if platform == 'linux64': | 417 if platform == 'linux64': |
| 416 ArchivePrebuilts(options.revision) | 418 ArchivePrebuilts(options.revision) |
| 417 | 419 |
| 418 WaitForLatestSnapshot(options.revision) | 420 WaitForLatestSnapshot(options.revision) |
| 419 | 421 |
| 420 cmd = [ | 422 cmd = [ |
| 421 sys.executable, | 423 sys.executable, |
| 422 os.path.join(_THIS_DIR, 'test', 'run_all_tests.py'), | 424 os.path.join(_THIS_DIR, 'test', 'run_all_tests.py'), |
| 423 ] | 425 ] |
| 424 if platform == 'android': | 426 if platform == 'android': |
| 425 cmd.append('--android-packages=' + options.android_packages) | 427 cmd.append('--android-packages=' + options.android_packages) |
| 426 | 428 |
| 427 passed = (util.RunCommand(cmd) == 0) | 429 passed = (util.RunCommand(cmd) == 0) |
| 428 | 430 |
| 429 if platform == 'android': | 431 if platform == 'android': |
| 430 UpdateTestResultsLog(platform, options.revision, passed) | 432 if options.update_log: |
| 433 UpdateTestResultsLog(platform, options.revision, passed) |
| 431 elif passed: | 434 elif passed: |
| 432 _MaybeUpdateReleaseCandidate(platform, options.revision) | 435 _MaybeUpdateReleaseCandidate(platform, options.revision) |
| 433 _MaybeRelease(platform) | 436 _MaybeRelease(platform) |
| 434 | 437 |
| 435 | 438 |
| 436 if __name__ == '__main__': | 439 if __name__ == '__main__': |
| 437 main() | 440 main() |
| OLD | NEW |