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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 'SKIP') | 169 'SKIP') |
170 return any(s in expectations for s in unstrippable_expectations) | 170 return any(s in expectations for s in unstrippable_expectations) |
171 | 171 |
172 def _get_builder_results_by_path(self): | 172 def _get_builder_results_by_path(self): |
173 """Returns a dictionary of results for each builder. | 173 """Returns a dictionary of results for each builder. |
174 | 174 |
175 Returns a dictionary where each key is a builder and value is a dictiona
ry containing | 175 Returns a dictionary where each key is a builder and value is a dictiona
ry containing |
176 the distinct results for each test. E.g. | 176 the distinct results for each test. E.g. |
177 | 177 |
178 { | 178 { |
179 'WebKit Linux': { | 179 'WebKit Linux Precise': { |
180 'test1.html': ['PASS', 'IMAGE'], | 180 'test1.html': ['PASS', 'IMAGE'], |
181 'test2.html': ['PASS'], | 181 'test2.html': ['PASS'], |
182 }, | 182 }, |
183 'WebKit Mac10.10': { | 183 'WebKit Mac10.10': { |
184 'test1.html': ['PASS', 'IMAGE'], | 184 'test1.html': ['PASS', 'IMAGE'], |
185 'test2.html': ['PASS', 'TEXT'], | 185 'test2.html': ['PASS', 'TEXT'], |
186 } | 186 } |
187 } | 187 } |
188 """ | 188 """ |
189 builder_results_by_path = {} | 189 builder_results_by_path = {} |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 """Writes the given TestExpectations object to the filesystem. | 282 """Writes the given TestExpectations object to the filesystem. |
283 | 283 |
284 Args: | 284 Args: |
285 test_expectations: The TestExpectations object to write. | 285 test_expectations: The TestExpectations object to write. |
286 test_expectations_file: The full file path of the Blink | 286 test_expectations_file: The full file path of the Blink |
287 TestExpectations file. This file will be overwritten. | 287 TestExpectations file. This file will be overwritten. |
288 """ | 288 """ |
289 self._host.filesystem.write_text_file( | 289 self._host.filesystem.write_text_file( |
290 test_expectations_file, | 290 test_expectations_file, |
291 TestExpectations.list_to_string(test_expectations, reconstitute_only
_these=[])) | 291 TestExpectations.list_to_string(test_expectations, reconstitute_only
_these=[])) |
OLD | NEW |