Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 ''' | 3 ''' |
| 4 Copyright 2012 Google Inc. | 4 Copyright 2012 Google Inc. |
| 5 | 5 |
| 6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
| 7 found in the LICENSE file. | 7 found in the LICENSE file. |
| 8 ''' | 8 ''' |
| 9 | 9 |
| 10 ''' | 10 ''' |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 'base-macmini': | 55 'base-macmini': |
| 56 'Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release', | 56 'Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release', |
| 57 'base-macmini-lion-float': | 57 'base-macmini-lion-float': |
| 58 'Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release', | 58 'Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release', |
| 59 'base-android-galaxy-nexus': | 59 'base-android-galaxy-nexus': |
| 60 'Test-Android-GalaxyNexus-SGX540-Arm7-Debug', | 60 'Test-Android-GalaxyNexus-SGX540-Arm7-Debug', |
| 61 'base-android-nexus-7': | 61 'base-android-nexus-7': |
| 62 'Test-Android-Nexus7-Tegra3-Arm7-Release', | 62 'Test-Android-Nexus7-Tegra3-Arm7-Release', |
| 63 'base-android-nexus-s': | 63 'base-android-nexus-s': |
| 64 'Test-Android-NexusS-SGX540-Arm7-Release', | 64 'Test-Android-NexusS-SGX540-Arm7-Release', |
| 65 'base-android-xoom': | |
| 66 'Test-Android-Xoom-Tegra2-Arm7-Release', | |
|
borenet
2013/07/11 18:11:34
I'm pretty sure we still want this. The GMs just
epoger
2013/07/11 18:16:17
The problem is, because we have NO actual results
borenet
2013/07/11 18:20:08
Do we really want it to fail? My preference would
| |
| 67 'base-android-nexus-10': | 65 'base-android-nexus-10': |
| 68 'Test-Android-Nexus10-MaliT604-Arm7-Release', | 66 'Test-Android-Nexus10-MaliT604-Arm7-Release', |
| 69 'base-android-nexus-4': | 67 'base-android-nexus-4': |
| 70 'Test-Android-Nexus4-Adreno320-Arm7-Release', | 68 'Test-Android-Nexus4-Adreno320-Arm7-Release', |
| 71 } | 69 } |
| 72 | 70 |
| 73 | 71 |
| 74 class CommandFailedException(Exception): | 72 class CommandFailedException(Exception): |
| 75 pass | 73 pass |
| 76 | 74 |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 101 self._actuals_base_url = actuals_base_url | 99 self._actuals_base_url = actuals_base_url |
| 102 self._actuals_filename = actuals_filename | 100 self._actuals_filename = actuals_filename |
| 103 self._add_new = add_new | 101 self._add_new = add_new |
| 104 self._testname_pattern = re.compile('(\S+)_(\S+).png') | 102 self._testname_pattern = re.compile('(\S+)_(\S+).png') |
| 105 | 103 |
| 106 # Returns the full contents of filepath, as a single string. | 104 # Returns the full contents of filepath, as a single string. |
| 107 # If filepath looks like a URL, try to read it that way instead of as | 105 # If filepath looks like a URL, try to read it that way instead of as |
| 108 # a path on local storage. | 106 # a path on local storage. |
| 109 def _GetFileContents(self, filepath): | 107 def _GetFileContents(self, filepath): |
| 110 if filepath.startswith('http:') or filepath.startswith('https:'): | 108 if filepath.startswith('http:') or filepath.startswith('https:'): |
| 111 return urllib2.urlopen(filepath).read() | 109 try: |
| 110 return urllib2.urlopen(filepath).read() | |
| 111 except urllib2.HTTPError as e: | |
| 112 raise Exception('unable to read URL %s: %s' % (filepath, e)) | |
|
epoger
2013/07/11 18:08:30
while I was at it, improved error reporting so the
| |
| 112 else: | 113 else: |
| 113 return open(filepath, 'r').read() | 114 return open(filepath, 'r').read() |
| 114 | 115 |
| 115 # Returns a dictionary of actual results from actual-results.json file. | 116 # Returns a dictionary of actual results from actual-results.json file. |
| 116 # | 117 # |
| 117 # The dictionary returned has this format: | 118 # The dictionary returned has this format: |
| 118 # { | 119 # { |
| 119 # u'imageblur_565.png': [u'bitmap-64bitMD5', 3359963596899141322], | 120 # u'imageblur_565.png': [u'bitmap-64bitMD5', 3359963596899141322], |
| 120 # u'imageblur_8888.png': [u'bitmap-64bitMD5', 4217923806027861152], | 121 # u'imageblur_8888.png': [u'bitmap-64bitMD5', 4217923806027861152], |
| 121 # u'shadertext3_8888.png': [u'bitmap-64bitMD5', 3713708307125704716] | 122 # u'shadertext3_8888.png': [u'bitmap-64bitMD5', 3713708307125704716] |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 dry_run=args.dry_run, | 284 dry_run=args.dry_run, |
| 284 json_base_url=args.actuals_base_url, | 285 json_base_url=args.actuals_base_url, |
| 285 json_filename=args.actuals_filename, | 286 json_filename=args.actuals_filename, |
| 286 add_new=args.add_new, | 287 add_new=args.add_new, |
| 287 missing_json_is_fatal=missing_json_is_fatal) | 288 missing_json_is_fatal=missing_json_is_fatal) |
| 288 try: | 289 try: |
| 289 rebaseliner.RebaselineSubdir(subdir=subdir, builder=builder) | 290 rebaseliner.RebaselineSubdir(subdir=subdir, builder=builder) |
| 290 except BaseException as e: | 291 except BaseException as e: |
| 291 print >> sys.stderr, e | 292 print >> sys.stderr, e |
| 292 sys.exit(1) | 293 sys.exit(1) |
| OLD | NEW |