| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 results_builder = str(builder) | 274 results_builder = str(builder) |
| 275 if self._from_trybot: | 275 if self._from_trybot: |
| 276 results_builder = results_builder + TRYBOT_SUFFIX | 276 results_builder = results_builder + TRYBOT_SUFFIX |
| 277 actuals_url = '/'.join([self._actuals_base_url, results_builder, | 277 actuals_url = '/'.join([self._actuals_base_url, results_builder, |
| 278 self._actuals_filename]) | 278 self._actuals_filename]) |
| 279 # Only update results for tests that are currently failing. | 279 # Only update results for tests that are currently failing. |
| 280 # We don't want to rewrite results for tests that are already succeeding, | 280 # We don't want to rewrite results for tests that are already succeeding, |
| 281 # because we don't want to add annotation fields (such as | 281 # because we don't want to add annotation fields (such as |
| 282 # JSONKEY_EXPECTEDRESULTS_BUGS) except for tests whose expectations we | 282 # JSONKEY_EXPECTEDRESULTS_BUGS) except for tests whose expectations we |
| 283 # are actually modifying. | 283 # are actually modifying. |
| 284 sections = [gm_json.JSONKEY_ACTUALRESULTS_FAILED] | 284 sections = [gm_json.JSONKEY_ACTUALRESULTS_FAILUREIGNORED] |
| 285 if self._add_new: | 285 if self._add_new: |
| 286 sections.append(gm_json.JSONKEY_ACTUALRESULTS_NOCOMPARISON) | 286 sections.append(gm_json.JSONKEY_ACTUALRESULTS_NOCOMPARISON) |
| 287 if self._add_ignored: | 287 if self._add_ignored: |
| 288 sections.append(gm_json.JSONKEY_ACTUALRESULTS_FAILUREIGNORED) | 288 sections.append(gm_json.JSONKEY_ACTUALRESULTS_FAILUREIGNORED) |
| 289 results_to_update = self._GetActualResults(json_url=actuals_url, | 289 results_to_update = self._GetActualResults(json_url=actuals_url, |
| 290 sections=sections) | 290 sections=sections) |
| 291 | 291 |
| 292 # Read in current expectations. | 292 # Read in current expectations. |
| 293 expectations_input_filepath = os.path.join( | 293 expectations_input_filepath = os.path.join( |
| 294 self._expectations_root, builder, self._expectations_input_filename) | 294 self._expectations_root, builder, self._expectations_input_filename) |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 except: | 481 except: |
| 482 exception_handler.RaiseExceptionOrContinue() | 482 exception_handler.RaiseExceptionOrContinue() |
| 483 else: | 483 else: |
| 484 try: | 484 try: |
| 485 raise _InternalException('expectations_json_file %s not found' % | 485 raise _InternalException('expectations_json_file %s not found' % |
| 486 expectations_json_file) | 486 expectations_json_file) |
| 487 except: | 487 except: |
| 488 exception_handler.RaiseExceptionOrContinue() | 488 exception_handler.RaiseExceptionOrContinue() |
| 489 | 489 |
| 490 exception_handler.ReportAllFailures() | 490 exception_handler.ReportAllFailures() |
| OLD | NEW |