OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 """Updates TestExpectations based on results in builder bots. | 5 """Updates TestExpectations based on results in builder bots. |
6 | 6 |
7 Scans the TestExpectations file and uses results from actual builder bots runs | 7 Scans the TestExpectations file and uses results from actual builder bots runs |
8 to remove tests that are marked as flaky but don't fail in the specified way. | 8 to remove tests that are marked as flaky but don't fail in the specified way. |
9 | 9 |
10 E.g. If a test has this expectation: | 10 E.g. If a test has this expectation: |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 'SKIP') | 177 'SKIP') |
178 return any(s in expectations for s in unstrippable_expectations) | 178 return any(s in expectations for s in unstrippable_expectations) |
179 | 179 |
180 def _get_builder_results_by_path(self): | 180 def _get_builder_results_by_path(self): |
181 """Returns a dictionary of results for each builder. | 181 """Returns a dictionary of results for each builder. |
182 | 182 |
183 Returns a dictionary where each key is a builder and value is a dictiona
ry containing | 183 Returns a dictionary where each key is a builder and value is a dictiona
ry containing |
184 the distinct results for each test. E.g. | 184 the distinct results for each test. E.g. |
185 | 185 |
186 { | 186 { |
187 'WebKit Linux': { | 187 'WebKit Linux Precise': { |
188 'test1.html': ['PASS', 'IMAGE'], | 188 'test1.html': ['PASS', 'IMAGE'], |
189 'test2.html': ['PASS'], | 189 'test2.html': ['PASS'], |
190 }, | 190 }, |
191 'WebKit Mac10.10': { | 191 'WebKit Mac10.10': { |
192 'test1.html': ['PASS', 'IMAGE'], | 192 'test1.html': ['PASS', 'IMAGE'], |
193 'test2.html': ['PASS', 'TEXT'], | 193 'test2.html': ['PASS', 'TEXT'], |
194 } | 194 } |
195 } | 195 } |
196 """ | 196 """ |
197 builder_results_by_path = {} | 197 builder_results_by_path = {} |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 """Writes the given TestExpectations object to the filesystem. | 290 """Writes the given TestExpectations object to the filesystem. |
291 | 291 |
292 Args: | 292 Args: |
293 test_expectations: The TestExpectations object to write. | 293 test_expectations: The TestExpectations object to write. |
294 test_expectations_file: The full file path of the Blink | 294 test_expectations_file: The full file path of the Blink |
295 TestExpectations file. This file will be overwritten. | 295 TestExpectations file. This file will be overwritten. |
296 """ | 296 """ |
297 self._host.filesystem.write_text_file( | 297 self._host.filesystem.write_text_file( |
298 test_expectations_file, | 298 test_expectations_file, |
299 TestExpectations.list_to_string(test_expectations, reconstitute_only
_these=[])) | 299 TestExpectations.list_to_string(test_expectations, reconstitute_only
_these=[])) |
OLD | NEW |