| 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 """Fetch the latest results for a pre-selected set of builders we care about. | 6 """Fetch the latest results for a pre-selected set of builders we care about. |
| 7 If we find a 'good' revision -- based on criteria explained below -- we | 7 If we find a 'good' revision -- based on criteria explained below -- we |
| 8 mark the revision as LKGR, and POST it to the LKGR server: | 8 mark the revision as LKGR, and POST it to the LKGR server: |
| 9 | 9 |
| 10 http://chromium-status.appspot.com/lkgr | 10 http://chromium-status.appspot.com/lkgr |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 import re | 59 import re |
| 60 import smtplib | 60 import smtplib |
| 61 import socket | 61 import socket |
| 62 import subprocess | 62 import subprocess |
| 63 import sys | 63 import sys |
| 64 import textwrap | 64 import textwrap |
| 65 import threading | 65 import threading |
| 66 import urllib | 66 import urllib |
| 67 import xml.etree.ElementTree as xml | 67 import xml.etree.ElementTree as xml |
| 68 | 68 |
| 69 import requests |
| 70 |
| 69 from infra.libs import git | 71 from infra.libs import git |
| 70 | 72 |
| 71 from infra.ext import requests | |
| 72 | |
| 73 | 73 |
| 74 LOGGER = logging.getLogger(__name__) | 74 LOGGER = logging.getLogger(__name__) |
| 75 RUN_LOG = [] | 75 RUN_LOG = [] |
| 76 | 76 |
| 77 | 77 |
| 78 GIT_HASH_RE = re.compile('^[a-fA-F0-9]{40}$') | 78 GIT_HASH_RE = re.compile('^[a-fA-F0-9]{40}$') |
| 79 | 79 |
| 80 | 80 |
| 81 ################################################## | 81 ################################################## |
| 82 # Helper classes | 82 # Helper classes |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 '%s%s LKGR (%s) exceeds lag threshold' % | 939 '%s%s LKGR (%s) exceeds lag threshold' % |
| 940 (subject_base, args.project, lkgr), | 940 (subject_base, args.project, lkgr), |
| 941 '\n'.join(RUN_LOG), args.dry_run) | 941 '\n'.join(RUN_LOG), args.dry_run) |
| 942 return 1 | 942 return 1 |
| 943 | 943 |
| 944 return 0 | 944 return 0 |
| 945 | 945 |
| 946 | 946 |
| 947 if __name__ == '__main__': | 947 if __name__ == '__main__': |
| 948 sys.exit(main(sys.argv[1:])) | 948 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |