Tools/Scripts/webkitpy/layout_tests/models/test_input.py

3232class TestInput:
3333 """Groups information about a test for easy passing of data."""
3434
35  def __init__(self, test_name, timeout):
 35 def __init__(self, test_name, timeout, ref_file=None, is_mismatch=False):
3636 """Holds the input parameters for a test.
3737 Args:
3838 test: name of test (not an absolute path!)

4040 """
4141 self.test_name = test_name
4242 self.timeout = timeout
 43 self.ref_file = ref_file
 44 self.is_mismatch = is_mismatch
4345
4446 def __repr__(self):
4547 return "TestInput('%s', %d)" % (self.test_name, self.timeout)
99141

Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

316316 # This maps worker names to the state we are tracking for each of them.
317317 self._worker_states = {}
318318
 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
319326 def collect_tests(self, args):
320327 """Find all the files to test.
321328

326333 paths = self._strip_test_dir_prefixes(args)
327334 if self._options.test_list:
328335 paths += self._strip_test_dir_prefixes(read_test_files(self._fs, self._options.test_list, self._port.TEST_PATH_SEPARATOR))
 336
329337 self._test_files = self._port.tests(paths)
330338
 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
331359 def _strip_test_dir_prefixes(self, paths):
332360 return [self._strip_test_dir_prefix(path) for path in paths if path]
333361

544572 """Returns the appropriate TestInput object for the file. Mostly this
545573 is used for looking up the timeout value (in ms) to use for the given
546574 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
547581 if self._test_is_slow(test_file):
548  return TestInput(test_file, self._options.slow_time_out_ms)
549  return TestInput(test_file, self._options.time_out_ms)
 582 return TestInput(test_file, self._options.slow_time_out_ms, ref_file, is_mismatch)
 583 return TestInput(test_file, self._options.time_out_ms, ref_file, is_mismatch)
550584
551585 def _test_requires_lock(self, test_file):
552586 """Return True if the test needs to be locked when
99141