| OLD | NEW |
| 1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 run_results, | 169 run_results, |
| 170 "Exiting early after %d failures." % run_results.unexpected_failures
) | 170 "Exiting early after %d failures." % run_results.unexpected_failures
) |
| 171 interrupt_if_at_failure_limit( | 171 interrupt_if_at_failure_limit( |
| 172 self._options.exit_after_n_crashes_or_timeouts, | 172 self._options.exit_after_n_crashes_or_timeouts, |
| 173 run_results.unexpected_crashes + run_results.unexpected_timeouts, | 173 run_results.unexpected_crashes + run_results.unexpected_timeouts, |
| 174 run_results, | 174 run_results, |
| 175 # This differs from ORWT because it does not include WebProcess cras
hes. | 175 # This differs from ORWT because it does not include WebProcess cras
hes. |
| 176 "Exiting early after %d crashes and %d timeouts." % (run_results.une
xpected_crashes, run_results.unexpected_timeouts)) | 176 "Exiting early after %d crashes and %d timeouts." % (run_results.une
xpected_crashes, run_results.unexpected_timeouts)) |
| 177 | 177 |
| 178 def _update_summary_with_result(self, run_results, result): | 178 def _update_summary_with_result(self, run_results, result): |
| 179 expected = self._expectations.matches_an_expected_result(result.test_nam
e, result.type, self._options.pixel_tests or result.reftest_type) | 179 expected = self._expectations.matches_an_expected_result(result.test_nam
e, result.type, self._options.pixel_tests or result.reftest_type, self._options.
enable_sanitizer) |
| 180 exp_str = self._expectations.get_expectations_string(result.test_name) | 180 exp_str = self._expectations.get_expectations_string(result.test_name) |
| 181 got_str = self._expectations.expectation_to_string(result.type) | 181 got_str = self._expectations.expectation_to_string(result.type) |
| 182 | 182 |
| 183 if result.device_failed: | 183 if result.device_failed: |
| 184 self._printer.print_finished_test(result, False, exp_str, "Aborted") | 184 self._printer.print_finished_test(result, False, exp_str, "Aborted") |
| 185 return | 185 return |
| 186 | 186 |
| 187 run_results.add(result, expected, self._test_is_slow(result.test_name)) | 187 run_results.add(result, expected, self._test_is_slow(result.test_name)) |
| 188 self._printer.print_finished_test(result, expected, exp_str, got_str) | 188 self._printer.print_finished_test(result, expected, exp_str, got_str) |
| 189 self._interrupt_if_at_failure_limits(run_results) | 189 self._interrupt_if_at_failure_limits(run_results) |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 def split_at(seq, index): | 497 def split_at(seq, index): |
| 498 return (seq[:index], seq[index:]) | 498 return (seq[:index], seq[index:]) |
| 499 | 499 |
| 500 num_old_per_new = divide_and_round_up(len(old_shards), max_new_shards) | 500 num_old_per_new = divide_and_round_up(len(old_shards), max_new_shards) |
| 501 new_shards = [] | 501 new_shards = [] |
| 502 remaining_shards = old_shards | 502 remaining_shards = old_shards |
| 503 while remaining_shards: | 503 while remaining_shards: |
| 504 some_shards, remaining_shards = split_at(remaining_shards, num_old_p
er_new) | 504 some_shards, remaining_shards = split_at(remaining_shards, num_old_p
er_new) |
| 505 new_shards.append(TestShard('%s_%d' % (shard_name_prefix, len(new_sh
ards) + 1), extract_and_flatten(some_shards))) | 505 new_shards.append(TestShard('%s_%d' % (shard_name_prefix, len(new_sh
ards) + 1), extract_and_flatten(some_shards))) |
| 506 return new_shards | 506 return new_shards |
| OLD | NEW |