| Differences between
and this patch
- Tools/Scripts/webkitpy/layout_tests/models/test_input.py -1 / +3 lines
Lines 32-38 Tools/Scripts/webkitpy/layout_tests/models/test_input.py_sec1
32
class TestInput:
32
class TestInput:
33
    """Groups information about a test for easy passing of data."""
33
    """Groups information about a test for easy passing of data."""
34
34
35
    def __init__(self, test_name, timeout):
35
    def __init__(self, test_name, timeout, ref_file=None, is_mismatch=False):
36
        """Holds the input parameters for a test.
36
        """Holds the input parameters for a test.
37
        Args:
37
        Args:
38
          test: name of test (not an absolute path!)
38
          test: name of test (not an absolute path!)
Lines 40-45 Tools/Scripts/webkitpy/layout_tests/models/test_input.py_sec2
40
          """
40
          """
41
        self.test_name = test_name
41
        self.test_name = test_name
42
        self.timeout = timeout
42
        self.timeout = timeout
43
        self.ref_file = ref_file
44
        self.is_mismatch = is_mismatch
43
45
44
    def __repr__(self):
46
    def __repr__(self):
45
        return "TestInput('%s', %d)" % (self.test_name, self.timeout)
47
        return "TestInput('%s', %d)" % (self.test_name, self.timeout)
- Tools/Scripts/webkitpy/layout_tests/controllers/manager.py -2 / +40 lines
Lines 316-321 Tools/Scripts/webkitpy/layout_tests/controllers/manager.py_sec1
316
        # This maps worker names to the state we are tracking for each of them.
316
        # This maps worker names to the state we are tracking for each of them.
317
        self._worker_states = {}
317
        self._worker_states = {}
318
318
319
    def _parse_reftest_tests(self):
320
      """Parse all reftests.list in tests' directories and populate self._reftests
321
322
      Args:
323
       tests: list of tests for which references may be parsed
324
      """
325
326
      self._reftest_list = {}
327
      test_dirs = set()
328
      for path in self._test_files:
329
          test_dir = self._fs.dirname(path)
330
          if test_dir in test_dirs:
331
              continue
332
          test_dirs.add(test_dir)
333
          reftest_list_path = self._fs.join(self._port.path_from_webkit_base('LayoutTests'), test_dir, 'reftest.list')
334
          if self._fs.exists(reftest_list_path):
335
              for line in self._fs.read_text_file(reftest_list_path).split('\n'):
336
                  split_line = line.split()
337
                  if len(split_line) < 3:
338
                      continue
339
                  expectation_type, test_file, ref_file = split_line[0], split_line[1], split_line[2]
340
                  ref_file_path = self._fs.join(test_dir, ref_file)
341
                  self._reftest_list[self._fs.join(test_dir, test_file)] = (expectation_type, ref_file_path)
342
343
      # Don't treat reference files as test files
344
      for expectation_type, ref_file_path in self._reftest_list.values():
345
          if ref_file_path in self._test_files:
346
              self._test_files.remove(ref_file_path)
347
319
    def collect_tests(self, args):
348
    def collect_tests(self, args):
320
        """Find all the files to test.
349
        """Find all the files to test.
321
350
Lines 326-333 Tools/Scripts/webkitpy/layout_tests/controllers/manager.py_sec2
326
        paths = self._strip_test_dir_prefixes(args)
355
        paths = self._strip_test_dir_prefixes(args)
327
        if self._options.test_list:
356
        if self._options.test_list:
328
            paths += self._strip_test_dir_prefixes(read_test_files(self._fs, self._options.test_list, self._port.TEST_PATH_SEPARATOR))
357
            paths += self._strip_test_dir_prefixes(read_test_files(self._fs, self._options.test_list, self._port.TEST_PATH_SEPARATOR))
358
329
        self._test_files = self._port.tests(paths)
359
        self._test_files = self._port.tests(paths)
360
        self._parse_reftest_tests()
330
361
362
331
    def _strip_test_dir_prefixes(self, paths):
363
    def _strip_test_dir_prefixes(self, paths):
332
        return [self._strip_test_dir_prefix(path) for path in paths if path]
364
        return [self._strip_test_dir_prefix(path) for path in paths if path]
333
365
Lines 544-552 Tools/Scripts/webkitpy/layout_tests/controllers/manager.py_sec3
544
        """Returns the appropriate TestInput object for the file. Mostly this
576
        """Returns the appropriate TestInput object for the file. Mostly this
545
        is used for looking up the timeout value (in ms) to use for the given
577
        is used for looking up the timeout value (in ms) to use for the given
546
        test."""
578
        test."""
579
        if test_file in self._reftest_list:
580
            is_mismatch = self._reftest_list[test_file][0] == '!='
581
            ref_file = self._reftest_list[test_file][1]
582
        else:
583
            is_mismatch = False
584
            ref_file = None
547
        if self._test_is_slow(test_file):
585
        if self._test_is_slow(test_file):
548
            return TestInput(test_file, self._options.slow_time_out_ms)
586
            return TestInput(test_file, self._options.slow_time_out_ms, ref_file, is_mismatch)
549
        return TestInput(test_file, self._options.time_out_ms)
587
        return TestInput(test_file, self._options.time_out_ms, ref_file, is_mismatch)
550
588
551
    def _test_requires_lock(self, test_file):
589
    def _test_requires_lock(self, test_file):
552
        """Return True if the test needs to be locked when
590
        """Return True if the test needs to be locked when

Return to Bug 66837