| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 print 'deleting file', file_path | 383 print 'deleting file', file_path |
| 384 os.remove(file_path) | 384 os.remove(file_path) |
| 385 | 385 |
| 386 | 386 |
| 387 def _GetSVNRevisionFromGitHash(snapshot_hashcode): | 387 def _GetSVNRevisionFromGitHash(snapshot_hashcode): |
| 388 json_url = GS_GITHASH_TO_SVN_URL % snapshot_hashcode | 388 json_url = GS_GITHASH_TO_SVN_URL % snapshot_hashcode |
| 389 try: | 389 try: |
| 390 response = urllib2.urlopen(json_url) | 390 response = urllib2.urlopen(json_url) |
| 391 except urllib2.HTTPError as error: | 391 except urllib2.HTTPError as error: |
| 392 util.PrintAndFlush('HTTP Error %d' % error.getcode()) | 392 util.PrintAndFlush('HTTP Error %d' % error.getcode()) |
| 393 except urllib2.URLError as error: |
| 394 util.PrintAndFlush('URL Error %s' % error.message) |
| 393 return None | 395 return None |
| 394 data = json.loads(response.read()[4:]) | 396 data = json.loads(response.read()[4:]) |
| 395 if 'message' in data: | 397 if 'message' in data: |
| 396 message = data['message'].split('\n') | 398 message = data['message'].split('\n') |
| 397 message = [line for line in message if line.strip()] | 399 message = [line for line in message if line.strip()] |
| 398 search_pattern = re.compile(GS_SEARCH_PATTERN) | 400 search_pattern = re.compile(GS_SEARCH_PATTERN) |
| 399 result = search_pattern.search(message[len(message)-1]) | 401 result = search_pattern.search(message[len(message)-1]) |
| 400 if result: | 402 if result: |
| 401 return result.group(1) | 403 return result.group(1) |
| 402 util.PrintAndFlush('Failed to get svn revision number for %s' % | 404 util.PrintAndFlush('Failed to get svn revision number for %s' % |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 util.MarkBuildStepStart('run_all_tests.py') | 517 util.MarkBuildStepStart('run_all_tests.py') |
| 516 util.MarkBuildStepError() | 518 util.MarkBuildStepError() |
| 517 | 519 |
| 518 # Add a "cleanup" step so that errors from runtest.py or bb_device_steps.py | 520 # Add a "cleanup" step so that errors from runtest.py or bb_device_steps.py |
| 519 # (which invoke this script) are kept in thier own build step. | 521 # (which invoke this script) are kept in thier own build step. |
| 520 util.MarkBuildStepStart('cleanup') | 522 util.MarkBuildStepStart('cleanup') |
| 521 | 523 |
| 522 | 524 |
| 523 if __name__ == '__main__': | 525 if __name__ == '__main__': |
| 524 main() | 526 main() |
| OLD | NEW |