webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
webkitpy.layout_tests.models.test_expectations.TestExpectations Class Reference
Inheritance diagram for webkitpy.layout_tests.models.test_expectations.TestExpectations:

Public Member Functions

def expectation_from_string (cls, string)
 
def __init__ (self, port, tests=None, include_generic=True, include_overrides=True, expectations_to_lint=None, force_expectations_pass=False)
 
def readable_filename_and_line_number (self, line)
 
def parse_generic_expectations (self)
 
def parse_default_port_expectations (self)
 
def parse_override_expectations (self)
 
def parse_all_expectations (self)
 
def model (self)
 
def get_rebaselining_failures (self)
 
def matches_an_expected_result (self, test, result, pixel_tests_are_enabled)
 
def is_rebaselining (self, test)
 
def has_warnings (self)
 
def remove_configuration_from_test (self, test, test_configuration)
 
def remove_rebaselined_tests (self, except_these_tests, filename)
 
def add_skipped_tests (self, tests_to_skip)
 

Static Public Member Functions

def result_was_expected (result, expected_results, test_needs_rebaselining, test_is_skipped)
 
def remove_pixel_failures (expected_results)
 
def has_pixel_failures (actual_results)
 
def suffixes_for_expectations (expectations)
 
def list_to_string (expectation_lines, test_configuration_converter=None, reconstitute_only_these=None)
 

Static Public Attributes

dictionary EXPECTATIONS
 
dictionary EXPECTATION_DESCRIPTIONS
 
tuple EXPECTATION_ORDER = (PASS, CRASH, TIMEOUT, MISSING, FAIL, IMAGE, SKIP)
 
tuple BUILD_TYPES = ('debug', 'release')
 
dictionary MODIFIERS
 
dictionary TIMELINES
 
dictionary RESULT_TYPES
 

Detailed Description

Test expectations consist of lines with specifications of what
to expect from layout test cases. The test cases can be directories
in which case the expectations apply to all test cases in that
directory and any subdirectory. The format is along the lines of:

  LayoutTests/js/fixme.js [ Failure ]
  LayoutTests/js/flaky.js [ Failure Pass ]
  LayoutTests/js/crash.js [ Crash Failure Pass Timeout ]
  ...

To add modifiers:
  LayoutTests/js/no-good.js
  [ Debug ] LayoutTests/js/no-good.js [ Pass Timeout ]
  [ Debug ] LayoutTests/js/no-good.js [ Pass Skip Timeout ]
  [ Linux Debug ] LayoutTests/js/no-good.js [ Pass Skip Timeout ]
  [ Linux Win ] LayoutTests/js/no-good.js [ Pass Skip Timeout ]

Skip: Doesn't run the test.
Slow: The test takes a long time to run, but does not timeout indefinitely.
WontFix: For tests that we never intend to pass on a given platform (treated like Skip).

Notes:
  -A test cannot be both SLOW and TIMEOUT
  -A test can be included twice, but not via the same path.
  -If a test is included twice, then the more precise path wins.
  -CRASH tests cannot be WONTFIX

Constructor & Destructor Documentation

◆ __init__()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.__init__ (   self,
  port,
  tests = None,
  include_generic = True,
  include_overrides = True,
  expectations_to_lint = None,
  force_expectations_pass = False 
)

Member Function Documentation

◆ add_skipped_tests()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.add_skipped_tests (   self,
  tests_to_skip 
)

◆ expectation_from_string()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.expectation_from_string (   cls,
  string 
)

◆ get_rebaselining_failures()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.get_rebaselining_failures (   self)

◆ has_pixel_failures()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.has_pixel_failures (   actual_results)
static

◆ has_warnings()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.has_warnings (   self)

◆ is_rebaselining()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.is_rebaselining (   self,
  test 
)

◆ list_to_string()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.list_to_string (   expectation_lines,
  test_configuration_converter = None,
  reconstitute_only_these = None 
)
static

◆ matches_an_expected_result()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.matches_an_expected_result (   self,
  test,
  result,
  pixel_tests_are_enabled 
)

◆ model()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.model (   self)

◆ parse_all_expectations()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.parse_all_expectations (   self)

◆ parse_default_port_expectations()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.parse_default_port_expectations (   self)

◆ parse_generic_expectations()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.parse_generic_expectations (   self)

◆ parse_override_expectations()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.parse_override_expectations (   self)

◆ readable_filename_and_line_number()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.readable_filename_and_line_number (   self,
  line 
)

◆ remove_configuration_from_test()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.remove_configuration_from_test (   self,
  test,
  test_configuration 
)

◆ remove_pixel_failures()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.remove_pixel_failures (   expected_results)
static
Returns a copy of the expected results for a test, except that we
drop any pixel failures and return the remaining expectations. For example,
if we're not running pixel tests, then tests expected to fail as IMAGE
will PASS.

◆ remove_rebaselined_tests()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.remove_rebaselined_tests (   self,
  except_these_tests,
  filename 
)
Returns a copy of the expectations in the file with the tests removed.

◆ result_was_expected()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.result_was_expected (   result,
  expected_results,
  test_needs_rebaselining,
  test_is_skipped 
)
static
Returns whether we got a result we were expecting.
Args:
    result: actual result of a test execution
    expected_results: set of results listed in test_expectations
    test_needs_rebaselining: whether test was marked as REBASELINE
    test_is_skipped: whether test was marked as SKIP

◆ suffixes_for_expectations()

def webkitpy.layout_tests.models.test_expectations.TestExpectations.suffixes_for_expectations (   expectations)
static

Member Data Documentation

◆ BUILD_TYPES

tuple webkitpy.layout_tests.models.test_expectations.TestExpectations.BUILD_TYPES = ('debug', 'release')
static

◆ EXPECTATION_DESCRIPTIONS

dictionary webkitpy.layout_tests.models.test_expectations.TestExpectations.EXPECTATION_DESCRIPTIONS
static
Initial value:
= {SKIP: 'skipped',
PASS: 'passes',
FAIL: 'failures',
IMAGE: 'image-only failures',
TEXT: 'text-only failures',
IMAGE_PLUS_TEXT: 'image and text failures',
AUDIO: 'audio failures',
CRASH: 'crashes',
TIMEOUT: 'timeouts',
MISSING: 'missing results'}

◆ EXPECTATION_ORDER

tuple webkitpy.layout_tests.models.test_expectations.TestExpectations.EXPECTATION_ORDER = (PASS, CRASH, TIMEOUT, MISSING, FAIL, IMAGE, SKIP)
static

◆ EXPECTATIONS

dictionary webkitpy.layout_tests.models.test_expectations.TestExpectations.EXPECTATIONS
static
Initial value:
= {'pass': PASS,
'audio': AUDIO,
'fail': FAIL,
'image': IMAGE,
'image+text': IMAGE_PLUS_TEXT,
'text': TEXT,
'timeout': TIMEOUT,
'crash': CRASH,
'missing': MISSING,
'skip': SKIP}

◆ MODIFIERS

dictionary webkitpy.layout_tests.models.test_expectations.TestExpectations.MODIFIERS
static
Initial value:
= {TestExpectationParser.SKIP_MODIFIER: SKIP,
TestExpectationParser.WONTFIX_MODIFIER: WONTFIX,
TestExpectationParser.SLOW_MODIFIER: SLOW,
TestExpectationParser.DUMPJSCONSOLELOGINSTDERR_MODIFIER: DUMPJSCONSOLELOGINSTDERR,
TestExpectationParser.REBASELINE_MODIFIER: REBASELINE,
'none': NONE}

◆ RESULT_TYPES

dictionary webkitpy.layout_tests.models.test_expectations.TestExpectations.RESULT_TYPES
static
Initial value:
= {'skip': SKIP,
'pass': PASS,
'fail': FAIL,
'flaky': FLAKY}

◆ TIMELINES

dictionary webkitpy.layout_tests.models.test_expectations.TestExpectations.TIMELINES
static
Initial value:
= {TestExpectationParser.WONTFIX_MODIFIER: WONTFIX,
'now': NOW}

The documentation for this class was generated from the following file: