| OLD | NEW |
| 1 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2009 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 """A helper class for reading in and dealing with tests expectations | 5 """A helper class for reading in and dealing with tests expectations |
| 6 for layout tests. | 6 for layout tests. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS | 188 DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS |
| 189 LINUX DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS | 189 LINUX DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS |
| 190 DEFER LINUX WIN : LayoutTests/fast/js/no-good.js = TIMEOUT PASS | 190 DEFER LINUX WIN : LayoutTests/fast/js/no-good.js = TIMEOUT PASS |
| 191 | 191 |
| 192 SKIP: Doesn't run the test. | 192 SKIP: Doesn't run the test. |
| 193 SLOW: The test takes a long time to run, but does not timeout indefinitely. | 193 SLOW: The test takes a long time to run, but does not timeout indefinitely. |
| 194 WONTFIX: For tests that we never intend to pass on a given platform. | 194 WONTFIX: For tests that we never intend to pass on a given platform. |
| 195 DEFER: Test does not count in our statistics for the current release. | 195 DEFER: Test does not count in our statistics for the current release. |
| 196 DEBUG: Expectations apply only to the debug build. | 196 DEBUG: Expectations apply only to the debug build. |
| 197 RELEASE: Expectations apply only to release build. | 197 RELEASE: Expectations apply only to release build. |
| 198 LINUX/WIN/WIN-XP/WIN-VISTA/MAC: Expectations apply only to these platforms. | 198 LINUX/WIN/WIN-XP/WIN-VISTA/WIN-7/MAC: Expectations apply only to these |
| 199 platforms. |
| 199 | 200 |
| 200 Notes: | 201 Notes: |
| 201 -A test cannot be both SLOW and TIMEOUT | 202 -A test cannot be both SLOW and TIMEOUT |
| 202 -A test cannot be both DEFER and WONTFIX | 203 -A test cannot be both DEFER and WONTFIX |
| 203 -A test should only be one of IMAGE, TEXT, IMAGE+TEXT, or FAIL. FAIL is | 204 -A test should only be one of IMAGE, TEXT, IMAGE+TEXT, or FAIL. FAIL is |
| 204 a migratory state that currently means either IMAGE, TEXT, or IMAGE+TEXT. | 205 a migratory state that currently means either IMAGE, TEXT, or IMAGE+TEXT. |
| 205 Once we have finished migrating the expectations, we will change FAIL | 206 Once we have finished migrating the expectations, we will change FAIL |
| 206 to have the meaning of IMAGE+TEXT and remove the IMAGE+TEXT identifier. | 207 to have the meaning of IMAGE+TEXT and remove the IMAGE+TEXT identifier. |
| 207 -A test can be included twice, but not via the same path. | 208 -A test can be included twice, but not via the same path. |
| 208 -If a test is included twice, then the more precise path wins. | 209 -If a test is included twice, then the more precise path wins. |
| 209 -CRASH tests cannot be DEFER or WONTFIX | 210 -CRASH tests cannot be DEFER or WONTFIX |
| 210 """ | 211 """ |
| 211 | 212 |
| 212 EXPECTATIONS = { 'pass': PASS, | 213 EXPECTATIONS = { 'pass': PASS, |
| 213 'fail': FAIL, | 214 'fail': FAIL, |
| 214 'text': TEXT, | 215 'text': TEXT, |
| 215 'image': IMAGE, | 216 'image': IMAGE, |
| 216 'image+text': IMAGE_PLUS_TEXT, | 217 'image+text': IMAGE_PLUS_TEXT, |
| 217 'timeout': TIMEOUT, | 218 'timeout': TIMEOUT, |
| 218 'crash': CRASH } | 219 'crash': CRASH } |
| 219 | 220 |
| 220 PLATFORMS = [ 'mac', 'linux', 'win', 'win-xp', 'win-vista' ] | 221 PLATFORMS = [ 'mac', 'linux', 'win', 'win-xp', 'win-vista', 'win-7' ] |
| 221 | 222 |
| 222 BUILD_TYPES = [ 'debug', 'release' ] | 223 BUILD_TYPES = [ 'debug', 'release' ] |
| 223 | 224 |
| 224 MODIFIERS = { 'skip': SKIP, | 225 MODIFIERS = { 'skip': SKIP, |
| 225 'wontfix': WONTFIX, | 226 'wontfix': WONTFIX, |
| 226 'defer': DEFER, | 227 'defer': DEFER, |
| 227 'slow': SLOW, | 228 'slow': SLOW, |
| 228 'rebaseline': REBASELINE, | 229 'rebaseline': REBASELINE, |
| 229 'none': NONE } | 230 'none': NONE } |
| 230 | 231 |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 def _AddError(self, lineno, msg, path): | 676 def _AddError(self, lineno, msg, path): |
| 676 """Reports an error that will prevent running the tests. Does not | 677 """Reports an error that will prevent running the tests. Does not |
| 677 immediately raise an exception because we'd like to aggregate all the | 678 immediately raise an exception because we'd like to aggregate all the |
| 678 errors so they can all be printed out.""" | 679 errors so they can all be printed out.""" |
| 679 self._errors.append('\nLine:%s %s %s' % (lineno, msg, path)) | 680 self._errors.append('\nLine:%s %s %s' % (lineno, msg, path)) |
| 680 | 681 |
| 681 def _LogNonFatalError(self, lineno, msg, path): | 682 def _LogNonFatalError(self, lineno, msg, path): |
| 682 """Reports an error that will not prevent running the tests. These are | 683 """Reports an error that will not prevent running the tests. These are |
| 683 still errors, but not bad enough to warrant breaking test running.""" | 684 still errors, but not bad enough to warrant breaking test running.""" |
| 684 self._non_fatal_errors.append('Line:%s %s %s' % (lineno, msg, path)) | 685 self._non_fatal_errors.append('Line:%s %s %s' % (lineno, msg, path)) |
| OLD | NEW |