Changeset 57290 in webkit
- Timestamp:
- Apr 8, 2010 1:47:06 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r57278 r57290 1 2010-04-07 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Enable rebaseline-chromium-webkit-tests to run from a webkit-only 6 checkout (i.e., you don't need anything from the Chromium tree checked 7 out). This requires us to introduce the concept of a "target" 8 port/platform that we use to get configuration information from as well 9 as the "running" port that we use to make directories and diff images 10 and the "rebaselining" port we use to actually manage baselines. 11 12 https://bugs.webkit.org/show_bug.cgi?id=37238 13 14 * Scripts/webkitpy/layout_tests/port/mac.py: 15 * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py: 16 1 17 2010-04-05 Antonio Gomes <tonikitoo@webkit.org> 2 18 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py
r57257 r57290 63 63 # FIXME: disable pixel tests until they are run by default on the 64 64 # build machines. 65 if options and options.pixel_tests is None: 65 if options and (not hasattr(options, "pixel_tests") or 66 options.pixel_tests is None): 66 67 options.pixel_tests = False 67 68 … … 87 88 return False 88 89 90 if not self.check_image_diff(): 91 return False 92 89 93 driver_path = self._path_to_driver() 90 94 if not os.path.exists(driver_path): 91 95 _log.error("DumpRenderTree was not found at %s" % driver_path) 92 return False93 94 image_diff_path = self._path_to_image_diff()95 if not os.path.exists(image_diff_path):96 _log.error("ImageDiff was not found at %s" % image_diff_path)97 96 return False 98 97 … … 103 102 return False 104 103 104 return True 105 106 def check_image_diff(self, override_step=None, logging=True): 107 image_diff_path = self._path_to_image_diff() 108 if not os.path.exists(image_diff_path): 109 _log.error("ImageDiff was not found at %s" % image_diff_path) 110 return False 105 111 return True 106 112 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
r57256 r57290 42 42 """ 43 43 44 import copy 44 45 import logging 45 46 import optparse … … 204 205 REVISION_REGEX = r'<a href=\"(\d+)/\">' 205 206 206 def __init__(self, running_port, platform, options): 207 def __init__(self, running_port, target_port, platform, options): 208 """ 209 Args: 210 running_port: the Port the script is running on. 211 target_port: the Port the script uses to find port-specific 212 configuration information like the test_expectations.txt 213 file location and the list of test platforms. 214 platform: the test platform to rebaseline 215 options: the command-line options object.""" 207 216 self._platform = platform 208 217 self._options = options 209 # This is the port that the script is running on.210 218 self._port = running_port 211 # This is the port that the rebaselining tool creates new baselines for.219 self._target_port = target_port 212 220 self._rebaseline_port = port.get( 213 self._ port.test_platform_name_to_name(platform), options)221 self._target_port.test_platform_name_to_name(platform), options) 214 222 self._rebaselining_tests = [] 215 223 self._rebaselined_tests = [] … … 505 513 False otherwise. 506 514 """ 507 test_filepath = os.path.join(self._port.layout_tests_dir(), test) 515 test_filepath = os.path.join(self._target_port.layout_tests_dir(), 516 test) 508 517 all_baselines = self._rebaseline_port.expected_baselines( 509 518 test_filepath, suffix, True) … … 581 590 self._test_expectations.remove_platform_from_expectations( 582 591 self._rebaselined_tests, self._platform)) 583 path = self._ port.path_to_test_expectations_file()592 path = self._target_port.path_to_test_expectations_file() 584 593 if backup: 585 594 date_suffix = time.strftime('%Y%m%d%H%M%S', … … 798 807 HTML_TR = '<tr>%s</tr>' 799 808 800 def __init__(self, port, options, platforms, rebaselining_tests):809 def __init__(self, target_port, options, platforms, rebaselining_tests): 801 810 self._html_directory = options.html_directory 802 self._ port =port811 self._target_port = target_port 803 812 self._platforms = platforms 804 813 self._rebaselining_tests = rebaselining_tests … … 839 848 _log.info('Launching html: "%s"', self._html_file) 840 849 841 html_uri = self._ port.filename_to_uri(self._html_file)850 html_uri = self._target_port.filename_to_uri(self._html_file) 842 851 webbrowser.open(html_uri, 1) 843 852 … … 877 886 if os.path.exists(old_file): 878 887 links += html_td_link % { 879 'uri': self._ port.filename_to_uri(old_file),888 'uri': self._target_port.filename_to_uri(old_file), 880 889 'name': baseline_filename} 881 890 else: … … 883 892 links += self.HTML_TD_NOLINK % '' 884 893 885 links += html_td_link % {'uri': self._port.filename_to_uri(new_file), 894 links += html_td_link % {'uri': self._target_port.filename_to_uri( 895 new_file), 886 896 'name': baseline_filename} 887 897 … … 891 901 _log.info(' Baseline diff file: "%s"', diff_file) 892 902 if os.path.exists(diff_file): 893 links += html_td_link % {'uri': self._ port.filename_to_uri(903 links += html_td_link % {'uri': self._target_port.filename_to_uri( 894 904 diff_file), 'name': 'Diff'} 895 905 else: … … 930 940 931 941 if rows: 932 test_path = os.path.join(self._port.layout_tests_dir(), test) 933 html = self.HTML_TR_TEST % (self._port.filename_to_uri(test_path), 934 test) 942 test_path = os.path.join(self._target_port.layout_tests_dir(), 943 test) 944 html = self.HTML_TR_TEST % ( 945 self._target_port.filename_to_uri(test_path), test) 935 946 html += self.HTML_TEST_DETAIL % ' '.join(rows) 936 947 … … 988 999 ' rebaselining comparison.')) 989 1000 1001 option_parser.add_option('', '--target-platform', 1002 default='chromium', 1003 help=('The target platform to rebaseline ' 1004 '("mac", "chromium", "qt", etc.). Defaults ' 1005 'to "chromium".')) 990 1006 options = option_parser.parse_args()[0] 991 1007 992 # FIXME: Setting options.chromium to True forces port.get() to only look 993 # at Chromium ports; we hard-code this because this script doesn't work 994 # on non-Chromium ports yet. We should fix that. 995 options.chromium = True 1008 # We need to create three different Port objects over the life of this 1009 # script. |target_port_obj| is used to determine configuration information: 1010 # location of the expectations file, names of ports to rebaseline, etc. 1011 # |port_obj| is used for runtime functionality like actually diffing 1012 # Then we create a rebaselining port to actual find and manage the 1013 # baselines. 1014 target_options = copy.copy(options) 1015 if options.target_platform == 'chromium': 1016 target_options.chromium = True 1017 target_port_obj = port.get(None, target_options) 996 1018 997 1019 # Set up our logging format. … … 1014 1036 port_obj = port.get(None, options) 1015 1037 else: 1016 _log.debug('Found release version image diff binary.')1038 _log.debug('Found release version image diff binary.') 1017 1039 1018 1040 # Verify 'platforms' option is valid … … 1041 1063 backup = options.backup 1042 1064 for platform in rebaseline_platforms: 1043 rebaseliner = Rebaseliner(port_obj, platform, options)1065 rebaseliner = Rebaseliner(port_obj, target_port_obj, platform, options) 1044 1066 1045 1067 _log.info('') … … 1056 1078 _log.info('') 1057 1079 log_dashed_string('Rebaselining result comparison started', None) 1058 html_generator = HtmlGenerator( port_obj,1080 html_generator = HtmlGenerator(target_port_obj, 1059 1081 options, 1060 1082 rebaseline_platforms,
Note: See TracChangeset
for help on using the changeset viewer.