Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from recipe_engine import recipe_api | 5 from recipe_engine import recipe_api |
| 6 from recipe_engine import util as recipe_util | 6 from recipe_engine import util as recipe_util |
| 7 | 7 |
| 8 from .util import GTestResults, TestResults | 8 from .util import GTestResults, TestResults |
| 9 | 9 |
| 10 # TODO(luqui): Destroy this DEPS hack. | 10 # TODO(luqui): Destroy this DEPS hack. |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 if new_failures: | 188 if new_failures: |
| 189 self.m.python.failing_step(step_name, step_text) | 189 self.m.python.failing_step(step_name, step_text) |
| 190 else: | 190 else: |
| 191 self.m.python.succeeding_step(step_name, step_text) | 191 self.m.python.succeeding_step(step_name, step_text) |
| 192 finally: | 192 finally: |
| 193 if new_failures: | 193 if new_failures: |
| 194 self.m.tryserver.set_test_failure_tryjob_result() | 194 self.m.tryserver.set_test_failure_tryjob_result() |
| 195 elif ignored_failures: | 195 elif ignored_failures: |
| 196 self.m.step.active_result.presentation.status = self.m.step.WARNING | 196 self.m.step.active_result.presentation.status = self.m.step.WARNING |
| 197 | 197 |
| 198 if test.name == 'webkit_tests': | |
| 199 self._archive_retry_summary({ | |
| 200 'failures': sorted(new_failures), | |
| 201 'ignored': sorted(ignored_failures) | |
| 202 }) | |
| 203 | |
| 204 def _archive_retry_summary(self, retry_summary): | |
| 205 """Archives the retry summary as JSON, storing it alongside the results | |
| 206 from the first run.""" | |
| 207 script = self.m.chromium.package_repo_resource( | |
| 208 'scripts', 'slave', 'chromium', 'archive_layout_test_retry_summary.py') | |
| 209 args = [ | |
| 210 '--retry-summary', self.m.json.dumps(retry_summary), | |
|
Dirk Pranke
2016/10/15 22:34:36
Passing this as a command line argument seems awkw
| |
| 211 '--build-number', self.m.properties['buildnumber'], | |
| 212 '--builder-name', self.m.properties['buildername'], | |
| 213 '--gs-bucket', 'gs://chromium-layout-test-archives', | |
| 214 '--staging-dir', self.m.path['cache'].join('chrome_staging'), | |
| 215 ] | |
| 216 self.m.python('archive_retry_summary', script, args) | |
| 217 | |
| 198 def create_results_from_json(self, data): | 218 def create_results_from_json(self, data): |
| 199 return TestResults(data) | 219 return TestResults(data) |
| 200 | 220 |
| 201 @recipe_util.returns_placeholder | 221 @recipe_util.returns_placeholder |
| 202 def test_results(self, add_json_log=True): | 222 def test_results(self, add_json_log=True): |
| 203 """A placeholder which will expand to '/tmp/file'. | 223 """A placeholder which will expand to '/tmp/file'. |
| 204 | 224 |
| 205 The recipe must provide the expected --json-test-results flag. | 225 The recipe must provide the expected --json-test-results flag. |
| 206 | 226 |
| 207 The test_results will be an instance of the TestResults class. | 227 The test_results will be an instance of the TestResults class. |
| 208 """ | 228 """ |
| 209 return TestResultsOutputPlaceholder(self, add_json_log) | 229 return TestResultsOutputPlaceholder(self, add_json_log) |
| 210 | 230 |
| 211 @recipe_util.returns_placeholder | 231 @recipe_util.returns_placeholder |
| 212 def gtest_results(self, add_json_log=True): | 232 def gtest_results(self, add_json_log=True): |
| 213 """A placeholder which will expand to | 233 """A placeholder which will expand to |
| 214 '--test-launcher-summary-output=/tmp/file'. | 234 '--test-launcher-summary-output=/tmp/file'. |
| 215 | 235 |
| 216 Provides the --test-launcher-summary-output flag since --flag=value | 236 Provides the --test-launcher-summary-output flag since --flag=value |
| 217 (i.e. a single token in the command line) is the required format. | 237 (i.e. a single token in the command line) is the required format. |
| 218 | 238 |
| 219 The test_results will be an instance of the GTestResults class. | 239 The test_results will be an instance of the GTestResults class. |
| 220 """ | 240 """ |
| 221 return GTestResultsOutputPlaceholder(self, add_json_log) | 241 return GTestResultsOutputPlaceholder(self, add_json_log) |
| 222 | |
| OLD | NEW |