Changeset 85875 in webkit


Ignore:
Timestamp:
May 5, 2011 1:55:18 PM (13 years ago)
Author:
dpranke@chromium.org
Message:

2011-05-05 Dirk Pranke <dpranke@chromium.org>

Reviewed by Ojan Vafai.

new-run-webkit-tests: merge TestExpectations, TestExpectationsFile classes
https://bugs.webkit.org/show_bug.cgi?id=60002

  • Scripts/webkitpy/layout_tests/layout_package/manager.py:
  • Scripts/webkitpy/layout_tests/layout_package/printing.py:
  • Scripts/webkitpy/layout_tests/layout_package/result_summary.py:
  • Scripts/webkitpy/layout_tests/layout_package/test_expectations.py:
  • Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py:
  • Scripts/webkitpy/style/checkers/test_expectations.py:
Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r85871 r85875  
     12011-05-05  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        new-run-webkit-tests: merge TestExpectations, TestExpectationsFile classes
     6        https://bugs.webkit.org/show_bug.cgi?id=60002
     7
     8        * Scripts/webkitpy/layout_tests/layout_package/manager.py:
     9        * Scripts/webkitpy/layout_tests/layout_package/printing.py:
     10        * Scripts/webkitpy/layout_tests/layout_package/result_summary.py:
     11        * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py:
     12        * Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py:
     13        * Scripts/webkitpy/style/checkers/test_expectations.py:
     14
    1152011-05-05  Eric Seidel  <eric@webkit.org>
    216
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/manager.py

    r85344 r85875  
    7070BUILDER_BASE_URL = "http://build.chromium.org/buildbot/layout_test_results/"
    7171
    72 TestExpectationsFile = test_expectations.TestExpectationsFile
     72TestExpectations = test_expectations.TestExpectations
    7373
    7474
     
    110110    num_regressions = 0
    111111    keywords = {}
    112     for expecation_string, expectation_enum in TestExpectationsFile.EXPECTATIONS.iteritems():
     112    for expecation_string, expectation_enum in TestExpectations.EXPECTATIONS.iteritems():
    113113        keywords[expectation_enum] = expecation_string.upper()
    114114
    115     for modifier_string, modifier_enum in TestExpectationsFile.MODIFIERS.iteritems():
     115    for modifier_string, modifier_enum in TestExpectations.MODIFIERS.iteritems():
    116116        keywords[modifier_enum] = modifier_string.upper()
    117117
     
    915915    def _char_for_result(self, result):
    916916        result = result.lower()
    917         if result in TestExpectationsFile.EXPECTATIONS:
    918             result_enum_value = TestExpectationsFile.EXPECTATIONS[result]
     917        if result in TestExpectations.EXPECTATIONS:
     918            result_enum_value = TestExpectations.EXPECTATIONS[result]
    919919        else:
    920             result_enum_value = TestExpectationsFile.MODIFIERS[result]
     920            result_enum_value = TestExpectations.MODIFIERS[result]
    921921        return json_layout_results_generator.JSONLayoutResultsGenerator.FAILURE_TO_CHAR[result_enum_value]
    922922
     
    12331233        self._printer.print_actual("=> %s (%d):" % (heading, not_passing))
    12341234
    1235         for result in TestExpectationsFile.EXPECTATION_ORDER:
     1235        for result in TestExpectations.EXPECTATION_ORDER:
    12361236            if result == test_expectations.PASS:
    12371237                continue
    12381238            results = (result_summary.tests_by_expectation[result] &
    12391239                       result_summary.tests_by_timeline[timeline])
    1240             desc = TestExpectationsFile.EXPECTATION_DESCRIPTIONS[result]
     1240            desc = TestExpectations.EXPECTATION_DESCRIPTIONS[result]
    12411241            if not_passing and len(results):
    12421242                pct = len(results) * 100.0 / not_passing
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/printing.py

    r85609 r85875  
    3939_log = logging.getLogger("webkitpy.layout_tests.printer")
    4040
    41 TestExpectationsFile = test_expectations.TestExpectationsFile
     41TestExpectations = test_expectations.TestExpectations
    4242
    4343NUM_SLOW_TESTS_TO_LOG = 10
     
    369369    def _print_unexpected_test_result(self, result):
    370370        """Prints one unexpected test result line."""
    371         desc = TestExpectationsFile.EXPECTATION_DESCRIPTIONS[result.type][0]
     371        desc = TestExpectations.EXPECTATION_DESCRIPTIONS[result.type][0]
    372372        self.write("  %s -> unexpected %s" %
    373373                   (self._port.relative_test_filename(result.filename),
     
    487487
    488488        if len(flaky):
    489             descriptions = TestExpectationsFile.EXPECTATION_DESCRIPTIONS
     489            descriptions = TestExpectations.EXPECTATION_DESCRIPTIONS
    490490            for key, tests in flaky.iteritems():
    491                 result = TestExpectationsFile.EXPECTATIONS[key.lower()]
     491                result = TestExpectations.EXPECTATIONS[key.lower()]
    492492                self._buildbot_stream.write("Unexpected flakiness: %s (%d)\n"
    493493                    % (descriptions[result][1], len(tests)))
     
    498498                    actual = result['actual'].split(" ")
    499499                    expected = result['expected'].split(" ")
    500                     result = TestExpectationsFile.EXPECTATIONS[key.lower()]
     500                    result = TestExpectations.EXPECTATIONS[key.lower()]
    501501                    new_expectations_list = list(set(actual) | set(expected))
    502502                    self._buildbot_stream.write("  %s = %s\n" %
     
    506506
    507507        if len(regressions):
    508             descriptions = TestExpectationsFile.EXPECTATION_DESCRIPTIONS
     508            descriptions = TestExpectations.EXPECTATION_DESCRIPTIONS
    509509            for key, tests in regressions.iteritems():
    510                 result = TestExpectationsFile.EXPECTATIONS[key.lower()]
     510                result = TestExpectations.EXPECTATIONS[key.lower()]
    511511                self._buildbot_stream.write(
    512512                    "Regressions: Unexpected %s : (%d)\n" % (
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/result_summary.py

    r79837 r85875  
    3737_log = logging.getLogger("webkitpy.layout_tests.run_webkit_tests")
    3838
    39 TestExpectationsFile = test_expectations.TestExpectationsFile
     39TestExpectations = test_expectations.TestExpectations
    4040
    4141
     
    6060        self.failures = {}
    6161        self.tests_by_expectation[test_expectations.SKIP] = set()
    62         for expectation in TestExpectationsFile.EXPECTATIONS.values():
     62        for expectation in TestExpectations.EXPECTATIONS.values():
    6363            self.tests_by_expectation[expectation] = set()
    64         for timeline in TestExpectationsFile.TIMELINES.values():
     64        for timeline in TestExpectations.TIMELINES.values():
    6565            self.tests_by_timeline[timeline] = (
    6666                expectations.get_tests_with_timeline(timeline))
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py

    r84633 r85875  
    8585
    8686
     87def strip_comments(line):
     88    """Strips comments from a line and return None if the line is empty
     89    or else the contents of line with leading and trailing spaces removed
     90    and all other whitespace collapsed"""
     91
     92    commentIndex = line.find('//')
     93    if commentIndex is -1:
     94        commentIndex = len(line)
     95
     96    line = re.sub(r'\s+', ' ', line[:commentIndex].strip())
     97    if line == '':
     98        return None
     99    else:
     100        return line
     101
     102
     103class ParseError(Exception):
     104    def __init__(self, fatal, errors):
     105        self.fatal = fatal
     106        self.errors = errors
     107
     108    def __str__(self):
     109        return '\n'.join(map(str, self.errors))
     110
     111    def __repr__(self):
     112        return 'ParseError(fatal=%s, errors=%s)' % (self.fatal, self.errors)
     113
     114
     115class ModifiersAndExpectations:
     116    """A holder for modifiers and expectations on a test that serializes to
     117    JSON."""
     118
     119    def __init__(self, modifiers, expectations):
     120        self.modifiers = modifiers
     121        self.expectations = expectations
     122
     123
     124class ExpectationsJsonEncoder(simplejson.JSONEncoder):
     125    """JSON encoder that can handle ModifiersAndExpectations objects."""
     126    def default(self, obj):
     127        # A ModifiersAndExpectations object has two fields, each of which
     128        # is a dict. Since JSONEncoders handle all the builtin types directly,
     129        # the only time this routine should be called is on the top level
     130        # object (i.e., the encoder shouldn't recurse).
     131        assert isinstance(obj, ModifiersAndExpectations)
     132        return {"modifiers": obj.modifiers,
     133                "expectations": obj.expectations}
     134
     135
    87136class TestExpectations:
     137    """Test expectations consist of lines with specifications of what
     138    to expect from layout test cases. The test cases can be directories
     139    in which case the expectations apply to all test cases in that
     140    directory and any subdirectory. The format is along the lines of:
     141
     142      LayoutTests/fast/js/fixme.js = FAIL
     143      LayoutTests/fast/js/flaky.js = FAIL PASS
     144      LayoutTests/fast/js/crash.js = CRASH TIMEOUT FAIL PASS
     145      ...
     146
     147    To add other options:
     148      SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
     149      DEBUG : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
     150      DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
     151      LINUX DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
     152      LINUX WIN : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
     153
     154    SKIP: Doesn't run the test.
     155    SLOW: The test takes a long time to run, but does not timeout indefinitely.
     156    WONTFIX: For tests that we never intend to pass on a given platform.
     157
     158    Notes:
     159      -A test cannot be both SLOW and TIMEOUT
     160      -A test should only be one of IMAGE, TEXT, IMAGE+TEXT, AUDIO, or FAIL.
     161       FAIL is a legacy value that currently means either IMAGE,
     162       TEXT, or IMAGE+TEXT. Once we have finished migrating the expectations,
     163       we should change FAIL to have the meaning of IMAGE+TEXT and remove the
     164       IMAGE+TEXT identifier.
     165      -A test can be included twice, but not via the same path.
     166      -If a test is included twice, then the more precise path wins.
     167      -CRASH tests cannot be WONTFIX
     168    """
     169
    88170    TEST_LIST = "test_expectations.txt"
    89171
    90     def __init__(self, port, tests, expectations, test_config,
    91                  is_lint_mode, overrides=None):
     172    EXPECTATIONS = {'pass': PASS,
     173                    'fail': FAIL,
     174                    'text': TEXT,
     175                    'image': IMAGE,
     176                    'image+text': IMAGE_PLUS_TEXT,
     177                    'audio': AUDIO,
     178                    'timeout': TIMEOUT,
     179                    'crash': CRASH,
     180                    'missing': MISSING}
     181
     182    EXPECTATION_DESCRIPTIONS = {SKIP: ('skipped', 'skipped'),
     183                                PASS: ('pass', 'passes'),
     184                                FAIL: ('failure', 'failures'),
     185                                TEXT: ('text diff mismatch',
     186                                       'text diff mismatch'),
     187                                IMAGE: ('image mismatch', 'image mismatch'),
     188                                IMAGE_PLUS_TEXT: ('image and text mismatch',
     189                                                  'image and text mismatch'),
     190                                AUDIO: ('audio mismatch', 'audio mismatch'),
     191                                CRASH: ('DumpRenderTree crash',
     192                                        'DumpRenderTree crashes'),
     193                                TIMEOUT: ('test timed out', 'tests timed out'),
     194                                MISSING: ('no expected result found',
     195                                          'no expected results found')}
     196
     197    EXPECTATION_ORDER = (PASS, CRASH, TIMEOUT, MISSING, IMAGE_PLUS_TEXT,
     198       TEXT, IMAGE, AUDIO, FAIL, SKIP)
     199
     200    BUILD_TYPES = ('debug', 'release')
     201
     202    MODIFIERS = {'skip': SKIP,
     203                 'wontfix': WONTFIX,
     204                 'slow': SLOW,
     205                 'rebaseline': REBASELINE,
     206                 'none': NONE}
     207
     208    TIMELINES = {'wontfix': WONTFIX,
     209                 'now': NOW}
     210
     211    RESULT_TYPES = {'skip': SKIP,
     212                    'pass': PASS,
     213                    'fail': FAIL,
     214                    'flaky': FLAKY}
     215
     216    @classmethod
     217    def expectation_from_string(cls, string):
     218        assert(' ' not in string)  # This only handles one expectation at a time.
     219        return cls.EXPECTATIONS.get(string.lower())
     220
     221    def __init__(self, port, tests, expectations,
     222                 test_config, is_lint_mode, overrides=None):
    92223        """Loads and parses the test expectations given in the string.
    93224        Args:
     
    105236                and downstream expectations).
    106237        """
    107         self._expected_failures = TestExpectationsFile(port, expectations,
    108             tests, test_config, is_lint_mode,
    109             overrides=overrides)
    110 
    111     # TODO(ojan): Allow for removing skipped tests when getting the list of
    112     # tests to run, but not when getting metrics.
    113     # TODO(ojan): Replace the Get* calls here with the more sane API exposed
    114     # by TestExpectationsFile below. Maybe merge the two classes entirely?
    115 
    116     def get_expectations_json_for_all_platforms(self):
    117         return (
    118             self._expected_failures.get_expectations_json_for_all_platforms())
    119 
    120     def get_rebaselining_failures(self):
    121         return (self._expected_failures.get_test_set(REBASELINE, FAIL) |
    122                 self._expected_failures.get_test_set(REBASELINE, IMAGE) |
    123                 self._expected_failures.get_test_set(REBASELINE, TEXT) |
    124                 self._expected_failures.get_test_set(REBASELINE,
    125                                                      IMAGE_PLUS_TEXT) |
    126                 self._expected_failures.get_test_set(REBASELINE, AUDIO))
    127 
    128     def get_options(self, test):
    129         return self._expected_failures.get_options(test)
    130 
    131     def get_expectations(self, test):
    132         return self._expected_failures.get_expectations(test)
    133 
    134     def get_expectations_string(self, test):
    135         """Returns the expectatons for the given test as an uppercase string.
    136         If there are no expectations for the test, then "PASS" is returned."""
    137         expectations = self.get_expectations(test)
    138         retval = []
    139 
    140         for expectation in expectations:
    141             retval.append(self.expectation_to_string(expectation))
    142 
    143         return " ".join(retval)
    144 
    145     def expectation_to_string(self, expectation):
    146         """Return the uppercased string equivalent of a given expectation."""
    147         for item in TestExpectationsFile.EXPECTATIONS.items():
    148             if item[1] == expectation:
    149                 return item[0].upper()
    150         raise ValueError(expectation)
    151 
    152     @classmethod
    153     def expectation_from_string(cls, string):
    154         assert(' ' not in string)  # This only handles one expectation at a time.
    155         return TestExpectationsFile.EXPECTATIONS.get(string.lower())
    156 
    157     def get_tests_with_result_type(self, result_type):
    158         return self._expected_failures.get_tests_with_result_type(result_type)
    159 
    160     def get_tests_with_timeline(self, timeline):
    161         return self._expected_failures.get_tests_with_timeline(timeline)
    162 
    163     def matches_an_expected_result(self, test, result,
    164                                    pixel_tests_are_enabled):
    165         expected_results = self._expected_failures.get_expectations(test)
    166         if not pixel_tests_are_enabled:
    167             expected_results = remove_pixel_failures(expected_results)
    168         return result_was_expected(result, expected_results,
    169             self.is_rebaselining(test), self.has_modifier(test, SKIP))
    170 
    171     def is_rebaselining(self, test):
    172         return self._expected_failures.has_modifier(test, REBASELINE)
    173 
    174     def has_modifier(self, test, modifier):
    175         return self._expected_failures.has_modifier(test, modifier)
    176 
    177     def remove_rebaselined_tests(self, tests):
    178         return self._expected_failures.remove_rebaselined_tests(tests)
    179 
    180 
    181 def strip_comments(line):
    182     """Strips comments from a line and return None if the line is empty
    183     or else the contents of line with leading and trailing spaces removed
    184     and all other whitespace collapsed"""
    185 
    186     commentIndex = line.find('//')
    187     if commentIndex is -1:
    188         commentIndex = len(line)
    189 
    190     line = re.sub(r'\s+', ' ', line[:commentIndex].strip())
    191     if line == '':
    192         return None
    193     else:
    194         return line
    195 
    196 
    197 class ParseError(Exception):
    198     def __init__(self, fatal, errors):
    199         self.fatal = fatal
    200         self.errors = errors
    201 
    202     def __str__(self):
    203         return '\n'.join(map(str, self.errors))
    204 
    205     def __repr__(self):
    206         return 'ParseError(fatal=%s, errors=%s)' % (self.fatal, self.errors)
    207 
    208 
    209 class ModifiersAndExpectations:
    210     """A holder for modifiers and expectations on a test that serializes to
    211     JSON."""
    212 
    213     def __init__(self, modifiers, expectations):
    214         self.modifiers = modifiers
    215         self.expectations = expectations
    216 
    217 
    218 class ExpectationsJsonEncoder(simplejson.JSONEncoder):
    219     """JSON encoder that can handle ModifiersAndExpectations objects."""
    220     def default(self, obj):
    221         # A ModifiersAndExpectations object has two fields, each of which
    222         # is a dict. Since JSONEncoders handle all the builtin types directly,
    223         # the only time this routine should be called is on the top level
    224         # object (i.e., the encoder shouldn't recurse).
    225         assert isinstance(obj, ModifiersAndExpectations)
    226         return {"modifiers": obj.modifiers,
    227                 "expectations": obj.expectations}
    228 
    229 
    230 class TestExpectationsFile:
    231     """Test expectation files consist of lines with specifications of what
    232     to expect from layout test cases. The test cases can be directories
    233     in which case the expectations apply to all test cases in that
    234     directory and any subdirectory. The format of the file is along the
    235     lines of:
    236 
    237       LayoutTests/fast/js/fixme.js = FAIL
    238       LayoutTests/fast/js/flaky.js = FAIL PASS
    239       LayoutTests/fast/js/crash.js = CRASH TIMEOUT FAIL PASS
    240       ...
    241 
    242     To add other options:
    243       SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
    244       DEBUG : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
    245       DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
    246       LINUX DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
    247       LINUX WIN : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
    248 
    249     SKIP: Doesn't run the test.
    250     SLOW: The test takes a long time to run, but does not timeout indefinitely.
    251     WONTFIX: For tests that we never intend to pass on a given platform.
    252 
    253     Notes:
    254       -A test cannot be both SLOW and TIMEOUT
    255       -A test should only be one of IMAGE, TEXT, IMAGE+TEXT, AUDIO, or FAIL.
    256        FAIL is a legacy value that currently means either IMAGE,
    257        TEXT, or IMAGE+TEXT. Once we have finished migrating the expectations,
    258        we should change FAIL to have the meaning of IMAGE+TEXT and remove the
    259        IMAGE+TEXT identifier.
    260       -A test can be included twice, but not via the same path.
    261       -If a test is included twice, then the more precise path wins.
    262       -CRASH tests cannot be WONTFIX
    263     """
    264 
    265     EXPECTATIONS = {'pass': PASS,
    266                     'fail': FAIL,
    267                     'text': TEXT,
    268                     'image': IMAGE,
    269                     'image+text': IMAGE_PLUS_TEXT,
    270                     'audio': AUDIO,
    271                     'timeout': TIMEOUT,
    272                     'crash': CRASH,
    273                     'missing': MISSING}
    274 
    275     EXPECTATION_DESCRIPTIONS = {SKIP: ('skipped', 'skipped'),
    276                                 PASS: ('pass', 'passes'),
    277                                 FAIL: ('failure', 'failures'),
    278                                 TEXT: ('text diff mismatch',
    279                                        'text diff mismatch'),
    280                                 IMAGE: ('image mismatch', 'image mismatch'),
    281                                 IMAGE_PLUS_TEXT: ('image and text mismatch',
    282                                                   'image and text mismatch'),
    283                                 AUDIO: ('audio mismatch', 'audio mismatch'),
    284                                 CRASH: ('DumpRenderTree crash',
    285                                         'DumpRenderTree crashes'),
    286                                 TIMEOUT: ('test timed out', 'tests timed out'),
    287                                 MISSING: ('no expected result found',
    288                                           'no expected results found')}
    289 
    290     EXPECTATION_ORDER = (PASS, CRASH, TIMEOUT, MISSING, IMAGE_PLUS_TEXT,
    291        TEXT, IMAGE, AUDIO, FAIL, SKIP)
    292 
    293     BUILD_TYPES = ('debug', 'release')
    294 
    295     MODIFIERS = {'skip': SKIP,
    296                  'wontfix': WONTFIX,
    297                  'slow': SLOW,
    298                  'rebaseline': REBASELINE,
    299                  'none': NONE}
    300 
    301     TIMELINES = {'wontfix': WONTFIX,
    302                  'now': NOW}
    303 
    304     RESULT_TYPES = {'skip': SKIP,
    305                     'pass': PASS,
    306                     'fail': FAIL,
    307                     'flaky': FLAKY}
    308 
    309     def __init__(self, port, expectations, full_test_list,
    310                  test_config, is_lint_mode, overrides=None):
    311         # See argument documentation in TestExpectation(), above.
    312 
    313238        self._port = port
    314239        self._fs = port._filesystem
    315240        self._expectations = expectations
    316         self._full_test_list = full_test_list
     241        self._full_test_list = tests
    317242        self._test_config = test_config
    318243        self._is_lint_mode = is_lint_mode
     
    363288        self._handle_any_read_errors()
    364289        self._process_tests_without_expectations()
     290
     291    # TODO(ojan): Allow for removing skipped tests when getting the list of
     292    # tests to run, but not when getting metrics.
     293
     294    def get_rebaselining_failures(self):
     295        return (self.get_test_set(REBASELINE, FAIL) |
     296                self.get_test_set(REBASELINE, IMAGE) |
     297                self.get_test_set(REBASELINE, TEXT) |
     298                self.get_test_set(REBASELINE, IMAGE_PLUS_TEXT) |
     299                self.get_test_set(REBASELINE, AUDIO))
     300
     301    def get_expectations_string(self, test):
     302        """Returns the expectatons for the given test as an uppercase string.
     303        If there are no expectations for the test, then "PASS" is returned."""
     304        expectations = self.get_expectations(test)
     305        retval = []
     306
     307        for expectation in expectations:
     308            retval.append(self.expectation_to_string(expectation))
     309
     310        return " ".join(retval)
     311
     312    def expectation_to_string(self, expectation):
     313        """Return the uppercased string equivalent of a given expectation."""
     314        for item in self.EXPECTATIONS.items():
     315            if item[1] == expectation:
     316                return item[0].upper()
     317        raise ValueError(expectation)
     318
     319    def matches_an_expected_result(self, test, result, pixel_tests_are_enabled):
     320        expected_results = self.get_expectations(test)
     321        if not pixel_tests_are_enabled:
     322            expected_results = remove_pixel_failures(expected_results)
     323        return result_was_expected(result,
     324                                   expected_results,
     325                                   self.is_rebaselining(test),
     326                                   self.has_modifier(test, SKIP))
     327
     328    def is_rebaselining(self, test):
     329        return self.has_modifier(test, REBASELINE)
     330
    365331
    366332    def _handle_any_read_errors(self):
     
    847813    # We don't include the "none" modifier because it isn't actually legal.
    848814    REGEXES_TO_IGNORE = (['bug\w+'] +
    849                          TestExpectationsFile.MODIFIERS.keys()[:-1])
     815                         TestExpectations.MODIFIERS.keys()[:-1])
    850816    DUPLICATE_REGEXES_ALLOWED = ['bug\w+']
    851817
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py

    r82705 r85875  
    179179        # Handle some corner cases for this routine not covered by other tests.
    180180        self.parse_exp(self.get_basic_expectations())
    181         s = self._exp._expected_failures.get_test_set(WONTFIX)
     181        s = self._exp.get_test_set(WONTFIX)
    182182        self.assertEqual(s,
    183183            set([self.get_test('failures/expected/crash.html'),
    184184                 self.get_test('failures/expected/image_checksum.html')]))
    185         s = self._exp._expected_failures.get_test_set(WONTFIX, CRASH)
     185        s = self._exp.get_test_set(WONTFIX, CRASH)
    186186        self.assertEqual(s,
    187187            set([self.get_test('failures/expected/crash.html')]))
    188         s = self._exp._expected_failures.get_test_set(WONTFIX, CRASH,
    189                                                       include_skips=False)
     188        s = self._exp.get_test_set(WONTFIX, CRASH, include_skips=False)
    190189        self.assertEqual(s, set([]))
    191190
     
    291290        self.parse_exp('SLOW : failures/expected/text.html = TEXT')
    292291        self.assertEqual(
    293             len(self._exp._expected_failures.get_non_fatal_errors()), 1)
     292            len(self._exp.get_non_fatal_errors()), 1)
    294293
    295294    def test_slow_and_timeout(self):
     
    317316        # This should log a non-fatal error.
    318317        self.parse_exp('BUG_TEST : missing_file.html = TEXT')
    319         self.assertEqual(
    320             len(self._exp._expected_failures.get_non_fatal_errors()), 1)
     318        self.assertEqual(len(self._exp.get_non_fatal_errors()), 1)
    321319
    322320
  • trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations.py

    r77163 r85875  
    8989        expectations = None
    9090        try:
    91             expectations = test_expectations.TestExpectationsFile(
    92                 port=self._port_obj, expectations=expectations_str, full_test_list=tests,
     91            expectations = test_expectations.TestExpectations(
     92                port=self._port_obj, expectations=expectations_str, tests=tests,
    9393                test_config=self._port_obj.test_configuration(),
    9494                is_lint_mode=True, overrides=overrides)
Note: See TracChangeset for help on using the changeset viewer.