Changeset 243771 in webkit
- Timestamp:
- Apr 2, 2019, 5:04:06 PM (7 years ago)
- Location:
- branches/safari-607-branch/Tools
- Files:
-
- 19 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/controllers/manager.py (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/controllers/single_test_runner.py (modified) (2 diffs)
-
Scripts/webkitpy/layout_tests/views/printing.py (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/views/printing_unittest.py (modified) (1 diff)
-
Scripts/webkitpy/port/base.py (modified) (18 diffs)
-
Scripts/webkitpy/port/base_unittest.py (modified) (3 diffs)
-
Scripts/webkitpy/port/darwin.py (modified) (1 diff)
-
Scripts/webkitpy/port/driver.py (modified) (1 diff)
-
Scripts/webkitpy/port/gtk.py (modified) (1 diff)
-
Scripts/webkitpy/port/ios.py (modified) (1 diff)
-
Scripts/webkitpy/port/mac.py (modified) (1 diff)
-
Scripts/webkitpy/port/port_testcase.py (modified) (1 diff)
-
Scripts/webkitpy/port/test.py (modified) (1 diff)
-
Scripts/webkitpy/port/watch.py (modified) (1 diff)
-
Scripts/webkitpy/port/win.py (modified) (1 diff)
-
Scripts/webkitpy/port/wpe.py (modified) (1 diff)
-
Scripts/webkitpy/tool/servers/rebaselineserver.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/Tools/ChangeLog
r243770 r243771 1 2019-04-02 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r239989. rdar://problem/49539128 4 5 webkitpy: Implement device type specific expected results (Part 1) 6 https://bugs.webkit.org/show_bug.cgi?id=192162 7 8 Reviewed by Lucas Forschler. 9 10 Device type specific expected results covers two related ideas. The first (covered by this change) 11 is where to search for -expected.* files. The second is which tests to run based on the 12 TestExpectations.txt file. 13 14 After this change, the baseline search path will be determined by the type of device running a 15 test. Device type will be passed into any function which picks a file based on the baseline search 16 path. 17 18 * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: 19 (Worker._update_test_input): Pass device_type to self._port.reference_files(...). 20 * Scripts/webkitpy/layout_tests/controllers/manager.py: 21 (Manager.run): Print baseline search path for each round of devices. 22 * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: 23 (SingleTestRunner.__init__): Pass device_type into expected_*(...). 24 (SingleTestRunner._expected_driver_output): Ditto. 25 (SingleTestRunner._driver_input): Ditto. 26 * Scripts/webkitpy/layout_tests/views/printing.py: 27 (Printer.print_config): Move printing of baseline search path to a separate function. 28 (Printer.print_baseline_search_path): Moved from Printer.print_config. 29 * Scripts/webkitpy/layout_tests/views/printing_unittest.py: 30 (Testprinter.test_print_config): 31 (Testprinter.test_print_baseline_search_path): 32 * Scripts/webkitpy/port/base.py: 33 (Port.baseline_search_path): Pass device_type through. 34 (Port._expected_baselines_for_suffixes): Ditto. 35 (Port.expected_baselines): Ditto. 36 (Port.expected_filename): Ditto. 37 (Port.expected_checksum): Ditto. 38 (Port.expected_image): Ditto. 39 (Port.expected_audio): Ditto. 40 (Port.expected_text): Ditto. 41 (Port.reference_files): Ditto. 42 (Port.tests): Ditto. 43 (Port._expanded_paths): Ditto. 44 (Port.skipped_layout_tests): Ditto. 45 (Port.expectations_dict): Ditto. 46 (Port._port_specific_expectations_files): Ditto. 47 (Port.expectations_files): Ditto. 48 (Port.test_search_path): Ditto. 49 (Port._tests_for_other_platforms): Ditto. 50 * Scripts/webkitpy/port/base_unittest.py: 51 (PortTest.test_additional_platform_directory): Accept, but do not use, device_type. 52 (PortTest.test_nonexistant_expectations): Ditto. 53 (test_ref_tests_platform_directory): Ditto. 54 * Scripts/webkitpy/port/darwin.py: 55 (DarwinPort._port_specific_expectations_files): Accept device_type. 56 * Scripts/webkitpy/port/driver.py: 57 (DriverProxy): 58 (DriverProxy.host): Expose _target_host for device_type information. 59 * Scripts/webkitpy/port/gtk.py: 60 (GtkPort._port_specific_expectations_files): Accept, but do not use, device_type. 61 * Scripts/webkitpy/port/ios.py: 62 (IOSPort. default_baseline_search_path): Remove memoized, since it does not accept **kwargs. 63 * Scripts/webkitpy/port/mac.py: 64 (MacPort. default_baseline_search_path): Ditto. 65 * Scripts/webkitpy/port/port_testcase.py: 66 (TestWebKitPort._tests_for_other_platforms): Accept, but do not use, device_type. 67 * Scripts/webkitpy/port/test.py: 68 * Scripts/webkitpy/port/watch.py: 69 (WatchPort. default_baseline_search_path): Remove memoized, since it does not accept **kwargs. 70 * Scripts/webkitpy/port/win.py: 71 (WinPort.test_search_path): Accept, but do not use, device_type. 72 * Scripts/webkitpy/port/wpe.py: 73 (WPEPort._port_specific_expectations_files): Ditto. 74 * Scripts/webkitpy/tool/servers/rebaselineserver.py: 75 (get_test_baselines.AllPlatformsPort.baseline_search_path): Ditto. 76 77 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239989 268f45cc-cd09-0410-ab3c-d52691b4dbfc 78 79 2019-01-15 Jonathan Bedard <jbedard@apple.com> 80 81 webkitpy: Implement device type specific expected results (Part 1) 82 https://bugs.webkit.org/show_bug.cgi?id=192162 83 84 Reviewed by Lucas Forschler. 85 86 Device type specific expected results covers two related ideas. The first (covered by this change) 87 is where to search for -expected.* files. The second is which tests to run based on the 88 TestExpectations.txt file. 89 90 After this change, the baseline search path will be determined by the type of device running a 91 test. Device type will be passed into any function which picks a file based on the baseline search 92 path. 93 94 * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: 95 (Worker._update_test_input): Pass device_type to self._port.reference_files(...). 96 * Scripts/webkitpy/layout_tests/controllers/manager.py: 97 (Manager.run): Print baseline search path for each round of devices. 98 * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: 99 (SingleTestRunner.__init__): Pass device_type into expected_*(...). 100 (SingleTestRunner._expected_driver_output): Ditto. 101 (SingleTestRunner._driver_input): Ditto. 102 * Scripts/webkitpy/layout_tests/views/printing.py: 103 (Printer.print_config): Move printing of baseline search path to a separate function. 104 (Printer.print_baseline_search_path): Moved from Printer.print_config. 105 * Scripts/webkitpy/layout_tests/views/printing_unittest.py: 106 (Testprinter.test_print_config): 107 (Testprinter.test_print_baseline_search_path): 108 * Scripts/webkitpy/port/base.py: 109 (Port.baseline_search_path): Pass device_type through. 110 (Port._expected_baselines_for_suffixes): Ditto. 111 (Port.expected_baselines): Ditto. 112 (Port.expected_filename): Ditto. 113 (Port.expected_checksum): Ditto. 114 (Port.expected_image): Ditto. 115 (Port.expected_audio): Ditto. 116 (Port.expected_text): Ditto. 117 (Port.reference_files): Ditto. 118 (Port.tests): Ditto. 119 (Port._expanded_paths): Ditto. 120 (Port.skipped_layout_tests): Ditto. 121 (Port.expectations_dict): Ditto. 122 (Port._port_specific_expectations_files): Ditto. 123 (Port.expectations_files): Ditto. 124 (Port.test_search_path): Ditto. 125 (Port._tests_for_other_platforms): Ditto. 126 * Scripts/webkitpy/port/base_unittest.py: 127 (PortTest.test_additional_platform_directory): Accept, but do not use, device_type. 128 (PortTest.test_nonexistant_expectations): Ditto. 129 (test_ref_tests_platform_directory): Ditto. 130 * Scripts/webkitpy/port/darwin.py: 131 (DarwinPort._port_specific_expectations_files): Accept device_type. 132 * Scripts/webkitpy/port/driver.py: 133 (DriverProxy): 134 (DriverProxy.host): Expose _target_host for device_type information. 135 * Scripts/webkitpy/port/gtk.py: 136 (GtkPort._port_specific_expectations_files): Accept, but do not use, device_type. 137 * Scripts/webkitpy/port/ios.py: 138 (IOSPort. default_baseline_search_path): Remove memoized, since it does not accept **kwargs. 139 * Scripts/webkitpy/port/mac.py: 140 (MacPort. default_baseline_search_path): Ditto. 141 * Scripts/webkitpy/port/port_testcase.py: 142 (TestWebKitPort._tests_for_other_platforms): Accept, but do not use, device_type. 143 * Scripts/webkitpy/port/test.py: 144 * Scripts/webkitpy/port/watch.py: 145 (WatchPort. default_baseline_search_path): Remove memoized, since it does not accept **kwargs. 146 * Scripts/webkitpy/port/win.py: 147 (WinPort.test_search_path): Accept, but do not use, device_type. 148 * Scripts/webkitpy/port/wpe.py: 149 (WPEPort._port_specific_expectations_files): Ditto. 150 * Scripts/webkitpy/tool/servers/rebaselineserver.py: 151 (get_test_baselines.AllPlatformsPort.baseline_search_path): Ditto. 152 1 153 2019-04-02 Kocsen Chung <kocsen_chung@apple.com> 2 154 -
branches/safari-607-branch/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
r235771 r243771 295 295 if test_input.reference_files is None: 296 296 # Lazy initialization. 297 test_input.reference_files = self._port.reference_files(test_input.test_name )297 test_input.reference_files = self._port.reference_files(test_input.test_name, device_type=self._port.target_host(self._worker_number).device_type) 298 298 if test_input.reference_files: 299 299 test_input.should_run_pixel_test = True -
branches/safari-607-branch/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
r238944 r243771 275 275 index += 1 276 276 277 self._printer.print_baseline_search_path(device_type=device_type) 278 277 279 _log.info('Running {}{}'.format(pluralize(len(tests), 'test'), ' for {}'.format(str(device_type)) if device_type else '')) 278 280 _log.info('') -
branches/safari-607-branch/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
r217130 r243771 70 70 # in either layout tests or reftests, but not in both. 71 71 for suffix in ('.txt', '.png', '.wav'): 72 expected_filename = self._port.expected_filename(self._test_name, suffix )72 expected_filename = self._port.expected_filename(self._test_name, suffix, device_type=self._driver.host.device_type) 73 73 if self._filesystem.exists(expected_filename): 74 74 _log.error('%s is a reftest, but has an unused expectation file. Please remove %s.', self._test_name, expected_filename) 75 75 76 76 def _expected_driver_output(self): 77 return DriverOutput(self._port.expected_text(self._test_name ),78 self._port.expected_image(self._test_name ),79 self._port.expected_checksum(self._test_name ),80 self._port.expected_audio(self._test_name ))77 return DriverOutput(self._port.expected_text(self._test_name, device_type=self._driver.host.device_type), 78 self._port.expected_image(self._test_name, device_type=self._driver.host.device_type), 79 self._port.expected_checksum(self._test_name, device_type=self._driver.host.device_type), 80 self._port.expected_audio(self._test_name, device_type=self._driver.host.device_type)) 81 81 82 82 def _should_fetch_expected_checksum(self): … … 90 90 image_hash = None 91 91 if self._should_fetch_expected_checksum(): 92 image_hash = self._port.expected_checksum(self._test_name )92 image_hash = self._port.expected_checksum(self._test_name, device_type=self._driver.host.device_type) 93 93 return DriverInput(self._test_name, self._timeout, image_hash, self._should_run_pixel_test, self._should_dump_jsconsolelog_in_stderr) 94 94 -
branches/safari-607-branch/Tools/Scripts/webkitpy/layout_tests/views/printing.py
r238749 r243771 98 98 self._print_default('') 99 99 100 def print_baseline_search_path(self, device_type=None): 101 fs = self._port.host.filesystem 102 full_baseline_search_path = self._port.baseline_search_path(device_type=device_type) 103 normalize_baseline = lambda baseline_search_path: [ 104 fs.relpath(x, self._port.layout_tests_dir()).replace("../", "") for x in baseline_search_path] 105 106 self._print_default('Verbose baseline search path: {} -> generic'.format( 107 ' -> '.join(normalize_baseline(full_baseline_search_path)))) 108 109 self._print_default('') 110 self._print_default('Baseline search path: {} -> generic'.format( 111 ' -> '.join(normalize_baseline([path for path in full_baseline_search_path if fs.exists(path)])))) 112 self._print_default('') 113 100 114 def print_found(self, num_all_test_files, num_to_run, repeat_each, iterations): 101 115 found_str = 'Found %s; running %d' % (grammar.pluralize(num_all_test_files, "test"), num_to_run) -
branches/safari-607-branch/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
r202819 r243771 118 118 self.assertIn('Regular timeout: ', err.getvalue()) 119 119 120 def test_print_baseline_search_path(self): 121 printer, err = self.get_printer() 122 printer.print_baseline_search_path() 123 124 self.assertIn('Verbose baseline search path: platform/test-mac-leopard -> platform/test-mac-snowleopard -> generic', err.getvalue()) 125 self.assertIn('Baseline search path: platform/test-mac-leopard -> generic', err.getvalue()) 126 120 127 self.reset(err) 121 128 printer._options.quiet = True 122 printer.print_ config('/tmp')129 printer.print_baseline_search_path() 123 130 self.assertNotIn('Baseline search path: platform/test-mac-leopard -> platform/test-mac-snowleopard -> generic', err.getvalue()) 124 131 -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/base.py
r243769 r243771 211 211 return baseline_search_paths[0] 212 212 213 def baseline_search_path(self ):214 return self.get_option('additional_platform_directory', []) + self._compare_baseline() + self.default_baseline_search_path( )213 def baseline_search_path(self, device_type=None): 214 return self.get_option('additional_platform_directory', []) + self._compare_baseline() + self.default_baseline_search_path(device_type=device_type) 215 215 216 216 def default_baseline_search_path(self, device_type=None): … … 411 411 return ('.wav', '.webarchive', '.txt', '.png') 412 412 413 def _expected_baselines_for_suffixes(self, test_name, suffixes, all_baselines=False ):414 baseline_search_path = self.baseline_search_path( ) + [self.layout_tests_dir()]413 def _expected_baselines_for_suffixes(self, test_name, suffixes, all_baselines=False, device_type=None): 414 baseline_search_path = self.baseline_search_path(device_type=device_type) + [self.layout_tests_dir()] 415 415 416 416 baselines = [] … … 431 431 return baselines 432 432 433 def expected_baselines(self, test_name, suffix, all_baselines=False ):433 def expected_baselines(self, test_name, suffix, all_baselines=False, device_type=None): 434 434 """Given a test name, finds where the baseline results are located. 435 435 … … 458 458 platform specific. 459 459 """ 460 return self._expected_baselines_for_suffixes(test_name, [suffix], all_baselines=all_baselines )461 462 def expected_filename(self, test_name, suffix, return_default=True ):460 return self._expected_baselines_for_suffixes(test_name, [suffix], all_baselines=all_baselines, device_type=device_type) 461 462 def expected_filename(self, test_name, suffix, return_default=True, device_type=None): 463 463 """Given a test name, returns an absolute path to its expected results. 464 464 … … 480 480 the other baseline and filename manipulation routines. 481 481 """ 482 platform_dir, baseline_filename = self.expected_baselines(test_name, suffix )[0]482 platform_dir, baseline_filename = self.expected_baselines(test_name, suffix, device_type=device_type)[0] 483 483 if platform_dir or return_default: 484 484 return self._filesystem.join(platform_dir or self.layout_tests_dir(), baseline_filename) 485 485 return None 486 486 487 def expected_checksum(self, test_name ):487 def expected_checksum(self, test_name, device_type=None): 488 488 """Returns the checksum of the image we expect the test to produce, or None if it is a text-only test.""" 489 png_path = self.expected_filename(test_name, '.png' )489 png_path = self.expected_filename(test_name, '.png', device_type=device_type) 490 490 491 491 if self._filesystem.exists(png_path): … … 495 495 return None 496 496 497 def expected_image(self, test_name ):497 def expected_image(self, test_name, device_type=None): 498 498 """Returns the image we expect the test to produce.""" 499 baseline_path = self.expected_filename(test_name, '.png' )499 baseline_path = self.expected_filename(test_name, '.png', device_type=device_type) 500 500 if not self._filesystem.exists(baseline_path): 501 501 return None 502 502 return self._filesystem.read_binary_file(baseline_path) 503 503 504 def expected_audio(self, test_name ):505 baseline_path = self.expected_filename(test_name, '.wav' )504 def expected_audio(self, test_name, device_type=None): 505 baseline_path = self.expected_filename(test_name, '.wav', device_type=device_type) 506 506 if not self._filesystem.exists(baseline_path): 507 507 return None 508 508 return self._filesystem.read_binary_file(baseline_path) 509 509 510 def expected_text(self, test_name ):510 def expected_text(self, test_name, device_type=None): 511 511 """Returns the text output we expect the test to produce, or None 512 512 if we don't expect there to be any text output. … … 515 515 # output from DRT (instead treating it as a binary string), we read the 516 516 # baselines as a binary string, too. 517 baseline_path = self.expected_filename(test_name, '.txt' )517 baseline_path = self.expected_filename(test_name, '.txt', device_type=device_type) 518 518 if not self._filesystem.exists(baseline_path): 519 baseline_path = self.expected_filename(test_name, '.webarchive' )519 baseline_path = self.expected_filename(test_name, '.webarchive', device_type=device_type) 520 520 if not self._filesystem.exists(baseline_path): 521 521 return None … … 546 546 return parsed_list 547 547 548 def reference_files(self, test_name ):548 def reference_files(self, test_name, device_type=None): 549 549 """Return a list of expectation (== or !=) and filename pairs""" 550 550 … … 561 561 for part2 in self._supported_reference_extensions: 562 562 suffixes.append(part1 + part2) 563 for platform_dir, baseline_filename in self._expected_baselines_for_suffixes(test_name, suffixes ):563 for platform_dir, baseline_filename in self._expected_baselines_for_suffixes(test_name, suffixes, device_type=device_type): 564 564 if not platform_dir: 565 565 continue … … 582 582 return [self.host.filesystem.relpath(test, self.layout_tests_dir()) for test in self._filesystem.glob(re.sub('-expected.*', '.*', self._filesystem.join(self.layout_tests_dir(), path))) if self._filesystem.isfile(test)] 583 583 584 def tests(self, paths ):584 def tests(self, paths, device_type=None): 585 585 """Return the list of tests found. Both generic and platform-specific tests matching paths should be returned.""" 586 expanded_paths = self._expanded_paths(paths )586 expanded_paths = self._expanded_paths(paths, device_type=device_type) 587 587 return self._real_tests(expanded_paths) 588 588 589 def _expanded_paths(self, paths ):589 def _expanded_paths(self, paths, device_type=None): 590 590 expanded_paths = [] 591 591 fs = self._filesystem … … 595 595 if self.test_isdir(path) and not path.startswith('platform') and not fs.isabs(path): 596 596 for platform_dir in all_platform_dirs: 597 if fs.isdir(fs.join(platform_dir, path)) and platform_dir in self.baseline_search_path( ):597 if fs.isdir(fs.join(platform_dir, path)) and platform_dir in self.baseline_search_path(device_type=device_type): 598 598 expanded_paths.append(self.relative_test_filename(fs.join(platform_dir, path))) 599 599 … … 756 756 return self._webkit_finder.perf_tests_dir() 757 757 758 def skipped_layout_tests(self, test_list ):758 def skipped_layout_tests(self, test_list, device_type=None): 759 759 """Returns tests skipped outside of the TestExpectations files.""" 760 return set(self._tests_for_other_platforms( )).union(self._skipped_tests_for_unsupported_features(test_list))760 return set(self._tests_for_other_platforms(device_type=device_type)).union(self._skipped_tests_for_unsupported_features(test_list)) 761 761 762 762 @memoized … … 1162 1162 return False 1163 1163 1164 def expectations_dict(self ):1164 def expectations_dict(self, device_type=None): 1165 1165 """Returns an OrderedDict of name -> expectations strings. 1166 1166 The names are expected to be (but not required to be) paths in the filesystem. … … 1173 1173 expectations = OrderedDict() 1174 1174 1175 for path in self.expectations_files( ):1175 for path in self.expectations_files(device_type=device_type): 1176 1176 if self._filesystem.exists(path): 1177 1177 expectations[path] = self._filesystem.read_text_file(path) … … 1186 1186 return expectations 1187 1187 1188 def _port_specific_expectations_files(self ):1188 def _port_specific_expectations_files(self, **kwargs): 1189 1189 # Unlike baseline_search_path, we only want to search [WK2-PORT, PORT-VERSION, PORT] and any directories 1190 1190 # included via --additional-platform-directory, not the full casade. … … 1204 1204 return [self._filesystem.join(self._webkit_baseline_path(d), 'TestExpectations') for d in search_paths] 1205 1205 1206 def expectations_files(self ):1207 return [self.path_to_generic_test_expectations_file()] + self._port_specific_expectations_files( )1206 def expectations_files(self, device_type=None): 1207 return [self.path_to_generic_test_expectations_file()] + self._port_specific_expectations_files(device_type=device_type) 1208 1208 1209 1209 def repository_paths(self): … … 1537 1537 return [] 1538 1538 1539 def test_search_path(self ):1540 return self.baseline_search_path( )1541 1542 def _tests_for_other_platforms(self ):1539 def test_search_path(self, device_type=None): 1540 return self.baseline_search_path(device_type=device_type) 1541 1542 def _tests_for_other_platforms(self, device_type=None): 1543 1543 # By default we will skip any directory under LayoutTests/platform 1544 1544 # that isn't in our baseline search path (this mirrors what … … 1548 1548 dirs_to_skip = [] 1549 1549 for entry in entries: 1550 if self._filesystem.isdir(entry) and entry not in self.test_search_path( ):1550 if self._filesystem.isdir(entry) and entry not in self.test_search_path(device_type=device_type): 1551 1551 basename = self._filesystem.basename(entry) 1552 1552 dirs_to_skip.append('platform/%s' % basename) -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/base_unittest.py
r239048 r243771 162 162 def test_additional_platform_directory(self): 163 163 port = self.make_port(port_name='foo') 164 port.default_baseline_search_path = lambda : ['LayoutTests/platform/foo']164 port.default_baseline_search_path = lambda **kwargs: ['LayoutTests/platform/foo'] 165 165 test_file = 'fast/test.html' 166 166 … … 188 188 def test_nonexistant_expectations(self): 189 189 port = self.make_port(port_name='foo') 190 port.expectations_files = lambda : ['/mock-checkout/LayoutTests/platform/exists/TestExpectations', '/mock-checkout/LayoutTests/platform/nonexistant/TestExpectations']190 port.expectations_files = lambda **kwargs: ['/mock-checkout/LayoutTests/platform/exists/TestExpectations', '/mock-checkout/LayoutTests/platform/nonexistant/TestExpectations'] 191 191 port._filesystem.write_text_file('/mock-checkout/LayoutTests/platform/exists/TestExpectations', '') 192 192 self.assertEqual('\n'.join(port.expectations_dict().keys()), '/mock-checkout/LayoutTests/platform/exists/TestExpectations') … … 414 414 def test_ref_tests_platform_directory(self): 415 415 port = self.make_port(port_name='foo') 416 port.default_baseline_search_path = lambda : ['/mock-checkout/LayoutTests/platform/foo']416 port.default_baseline_search_path = lambda **kwargs: ['/mock-checkout/LayoutTests/platform/foo'] 417 417 port._filesystem.write_text_file('/mock-checkout/LayoutTests/fast/ref-expected.html', 'foo') 418 418 -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/darwin.py
r229085 r243771 54 54 return super(DarwinPort, self).default_timeout_ms() 55 55 56 def _port_specific_expectations_files(self ):57 return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self.baseline_search_path( )]))56 def _port_specific_expectations_files(self, device_type=None): 57 return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self.baseline_search_path(device_type=device_type)])) 58 58 59 59 def check_for_leaks(self, process_name, process_pid): -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/driver.py
r235467 r243771 720 720 return self._driver_instance_constructor(self._port, self._worker_number, pixel_tests, self._no_timeout) 721 721 722 @property 723 def host(self): 724 return self._driver._target_host 725 722 726 # FIXME: this should be a @classmethod (or implemented on Port instead). 723 727 def is_http_test(self, test_name): -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/gtk.py
r243769 r243771 214 214 return map(self._webkit_baseline_path, self._search_paths()) 215 215 216 def _port_specific_expectations_files(self ):216 def _port_specific_expectations_files(self, **kwargs): 217 217 return [self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in reversed(self._search_paths())] 218 218 -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/ios.py
r243769 r243771 53 53 return VersionNameMap.map(self.host.platform).to_name(self._os_version, platform=IOSPort.port_name) 54 54 55 @memoized56 55 def default_baseline_search_path(self, device_type=None): 57 56 wk_string = 'wk1' -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/mac.py
r243769 r243771 70 70 return ['ARCHS=i386'] if self.architecture() == 'x86' else [] 71 71 72 @memoized73 72 def default_baseline_search_path(self, **kwargs): 74 73 versions_to_fallback = [] -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/port_testcase.py
r238944 r243771 71 71 return self.symbols_string 72 72 73 def _tests_for_other_platforms(self ):73 def _tests_for_other_platforms(self, **kwargs): 74 74 return ["media", ] 75 75 -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/test.py
r238903 r243771 408 408 return 'MOCK _path_to_driver' 409 409 410 def baseline_search_path(self ):410 def baseline_search_path(self, **kwargs): 411 411 search_paths = { 412 412 'test-mac-snowleopard': ['test-mac-snowleopard'], -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/watch.py
r243769 r243771 59 59 return 4 60 60 61 @memoized62 61 def default_baseline_search_path(self, **kwargs): 63 62 versions_to_fallback = [] -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/win.py
r243769 r243771 218 218 return {binary.split('.')[0]: self._build_path(binary) for binary in self.API_TEST_BINARY_NAMES} 219 219 220 def test_search_path(self ):220 def test_search_path(self, **kwargs): 221 221 test_fallback_names = [path for path in self.baseline_search_path() if not path.startswith(self._webkit_baseline_path('mac'))] 222 222 return map(self._webkit_baseline_path, test_fallback_names) -
branches/safari-607-branch/Tools/Scripts/webkitpy/port/wpe.py
r243769 r243771 106 106 return map(self._webkit_baseline_path, self._search_paths()) 107 107 108 def _port_specific_expectations_files(self ):108 def _port_specific_expectations_files(self, **kwargs): 109 109 return map(lambda x: self._filesystem.join(self._webkit_baseline_path(x), 'TestExpectations'), reversed(self._search_paths())) 110 110 -
branches/safari-607-branch/Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py
r225733 r243771 169 169 self._platforms_by_directory = dict([(self._webkit_baseline_path(p), p) for p in test_config.platforms]) 170 170 171 def baseline_search_path(self ):171 def baseline_search_path(self, **kwargs): 172 172 return self._platforms_by_directory.keys() 173 173
Note:
See TracChangeset
for help on using the changeset viewer.