| 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 / +36 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, tests):
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
        pass
325
319
    def collect_tests(self, args):
326
    def collect_tests(self, args):
320
        """Find all the files to test.
327
        """Find all the files to test.
321
328
Lines 326-333 Tools/Scripts/webkitpy/layout_tests/controllers/manager.py_sec2
326
        paths = self._strip_test_dir_prefixes(args)
333
        paths = self._strip_test_dir_prefixes(args)
327
        if self._options.test_list:
334
        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))
335
            paths += self._strip_test_dir_prefixes(read_test_files(self._fs, self._options.test_list, self._port.TEST_PATH_SEPARATOR))
336
329
        self._test_files = self._port.tests(paths)
337
        self._test_files = self._port.tests(paths)
330
338
339
        # Parse reftest.list
340
        self._reftest_list = {}
341
        test_dirs = set()
342
        for path in self._test_files:
343
            test_dir = self._fs.dirname(path)
344
            if test_dir in test_dirs:
345
                continue
346
            test_dirs.add(test_dir)
347
            reftest_list_path = self._fs.join(self._port.path_from_webkit_base('LayoutTests'), test_dir, 'reftest.list')
348
            if self._fs.exists(reftest_list_path):
349
                for line in self._fs.read_text_file(reftest_list_path).split('\n'):
350
                    split_line = line.split()
351
                    if len(split_line) < 3:
352
                        continue
353
                    expectation_type, test_file, ref_file = split_line[0], split_line[1], split_line[2]
354
                    self._reftest_list[self._fs.join(test_dir, test_file)] = (expectation_type, self._fs.join(test_dir, ref_file))
355
356
        print self._reftest_list
357
358
331
    def _strip_test_dir_prefixes(self, paths):
359
    def _strip_test_dir_prefixes(self, paths):
332
        return [self._strip_test_dir_prefix(path) for path in paths if path]
360
        return [self._strip_test_dir_prefix(path) for path in paths if path]
333
361
Lines 544-552 Tools/Scripts/webkitpy/layout_tests/controllers/manager.py_sec3
544
        """Returns the appropriate TestInput object for the file. Mostly this
572
        """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
573
        is used for looking up the timeout value (in ms) to use for the given
546
        test."""
574
        test."""
575
        if test_file in self._reftest_list:
576
            is_mismatch = self._reftest_list[test_file][0] == '!='
577
            ref_file = self._reftest_list[test_file][1]
578
        else:
579
            is_mismatch = False
580
            ref_file = None
547
        if self._test_is_slow(test_file):
581
        if self._test_is_slow(test_file):
548
            return TestInput(test_file, self._options.slow_time_out_ms)
582
            return TestInput(test_file, self._options.slow_time_out_ms, ref_file, is_mismatch)
549
        return TestInput(test_file, self._options.time_out_ms)
583
        return TestInput(test_file, self._options.time_out_ms, ref_file, is_mismatch)
550
584
551
    def _test_requires_lock(self, test_file):
585
    def _test_requires_lock(self, test_file):
552
        """Return True if the test needs to be locked when
586
        """Return True if the test needs to be locked when

Return to Bug 66837