Changeset 57256 in webkit
- Timestamp:
- Apr 8, 2010 12:27:59 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r57254 r57256 1 2010-04-08 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Rename target to configuration in new-run-webkit-tests to match the rest of WebKit 6 https://bugs.webkit.org/show_bug.cgi?id=37251 7 8 The rest of our tools call --debug or --release the configuration. 9 It's confusing to call it target in this script. 10 11 * Scripts/webkitpy/layout_tests/driver_test.py: 12 * Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py: 13 * Scripts/webkitpy/layout_tests/port/base.py: 14 * Scripts/webkitpy/layout_tests/port/chromium.py: 15 * Scripts/webkitpy/layout_tests/port/chromium_linux.py: 16 * Scripts/webkitpy/layout_tests/port/chromium_mac.py: 17 * Scripts/webkitpy/layout_tests/port/chromium_win.py: 18 * Scripts/webkitpy/layout_tests/port/mac.py: 19 * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py: 20 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 21 * Scripts/webkitpy/layout_tests/test_types/fuzzy_image_diff.py: 22 * Scripts/webkitpy/layout_tests/test_types/image_diff.py: 23 * Scripts/webkitpy/layout_tests/test_types/test_type_base.py: 24 * Scripts/webkitpy/layout_tests/test_types/text_diff.py: 25 1 26 2010-04-07 Adam Barth <abarth@webkit.org> 2 27 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py
r54710 r57256 65 65 optparser.add_option('-p', '--platform', action='store', default='mac', 66 66 help='Platform to test (e.g., "mac", "chromium-mac", etc.') 67 optparser.add_option('-t', '--target', action='store', default='Release', 68 help='build type ("Debug" or "Release")') 67 optparser.add_option('--debug', action='store_const', const='Debug', 68 dest="configuration", help='Set the configuration to Debug') 69 optparser.add_option('--release', action='store_const', const='Release', 70 dest="configuration", help='Set the configuration to Release') 69 71 optparser.add_option('', '--timeout', action='store', default='2000', 70 72 help='test timeout in milliseconds (2000 by default)') -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py
r57187 r57256 52 52 53 53 54 def process_output(port, test_info, test_types, test_args, target, output_dir,55 crash, timeout, test_run_time, actual_checksum,54 def process_output(port, test_info, test_types, test_args, configuration, 55 output_dir, crash, timeout, test_run_time, actual_checksum, 56 56 output, error): 57 57 """Receives the output from a test_shell process, subjects it to a number … … 64 64 test_types: list of test types to subject the output to 65 65 test_args: arguments to be passed to each test 66 target: Debug or Release66 configuration: Debug or Release 67 67 output_dir: directory to put crash stack traces into 68 68 … … 102 102 new_failures = test_type.compare_output(port, test_info.filename, 103 103 output, local_test_args, 104 target)104 configuration) 105 105 # Don't add any more failures if we already have a crash, so we don't 106 106 # double-report those tests. We do double-report for timeouts since … … 131 131 132 132 def __init__(self, port, image_path, shell_args, test_info, 133 test_types, test_args, target, output_dir):133 test_types, test_args, configuration, output_dir): 134 134 """ 135 135 Args: … … 147 147 self._test_types = test_types 148 148 self._test_args = test_args 149 self._ target = target149 self._configuration = configuration 150 150 self._output_dir = output_dir 151 151 … … 160 160 self._test_stats = process_output(self._port, 161 161 test_info, self._test_types, self._test_args, 162 self._ target, self._output_dir, crash, timeout, end - start,162 self._configuration, self._output_dir, crash, timeout, end - start, 163 163 actual_checksum, output, error) 164 164 driver.stop() … … 366 366 self._test_types, 367 367 self._test_args, 368 self._options. target,368 self._options.configuration, 369 369 self._options.results_directory) 370 370 … … 421 421 422 422 stats = process_output(self._port, test_info, self._test_types, 423 self._test_args, self._options. target,423 self._test_args, self._options.configuration, 424 424 self._options.results_directory, crash, 425 425 timeout, end - start, actual_checksum, -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
r56876 r57256 580 580 raise NotImplementedError('Port.path_to_apache_config_file') 581 581 582 def _path_to_driver(self, target=None):582 def _path_to_driver(self, configuration=None): 583 583 """Returns the full path to the test driver (DumpRenderTree).""" 584 584 raise NotImplementedError('Port.path_to_driver') -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
r57173 r57256 81 81 'test driver') 82 82 if result: 83 result = (self._check_driver_build_up_to_date(self._options. target)83 result = (self._check_driver_build_up_to_date(self._options.configuration) 84 84 and result) 85 85 else: … … 130 130 131 131 def results_directory(self): 132 return self.path_from_chromium_base('webkit', self._options. target,132 return self.path_from_chromium_base('webkit', self._options.configuration, 133 133 self._options.results_directory) 134 134 … … 202 202 # 203 203 204 def _check_driver_build_up_to_date(self, target):205 if targetin ('Debug', 'Release'):204 def _check_driver_build_up_to_date(self, configuration): 205 if configuration in ('Debug', 'Release'): 206 206 try: 207 207 debug_path = self._path_to_driver('Debug') … … 211 211 release_mtime = os.stat(release_path).st_mtime 212 212 213 if (debug_mtime > release_mtime and target== 'Release' or214 release_mtime > debug_mtime and target== 'Debug'):213 if (debug_mtime > release_mtime and configuration == 'Release' or 214 release_mtime > debug_mtime and configuration == 'Debug'): 215 215 _log.warning('You are not running the most ' 216 216 'recent test_shell binary. You need to ' … … 237 237 self._port = port 238 238 self._options = options 239 self._ target = port._options.target239 self._configuration = port._options.configuration 240 240 self._image_path = image_path 241 241 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
r56287 r57256 47 47 if port_name is None: 48 48 port_name = 'chromium-linux' 49 if options and not hasattr(options, ' target'):50 options. target= 'Release'49 if options and not hasattr(options, 'configuration'): 50 options.configuration = 'Release' 51 51 chromium.ChromiumPort.__init__(self, port_name, options) 52 52 … … 170 170 return "/usr/bin/php-cgi" 171 171 172 def _path_to_driver(self, target=None):173 if not target:174 target = self._options.target175 return self._build_path( target, 'test_shell')172 def _path_to_driver(self, configuration=None): 173 if not configuration: 174 configuration = self._options.configuration 175 return self._build_path(configuration, 'test_shell') 176 176 177 177 def _path_to_helper(self): … … 179 179 180 180 def _path_to_image_diff(self): 181 return self._build_path(self._options. target, 'image_diff')181 return self._build_path(self._options.configuration, 'image_diff') 182 182 183 183 def _path_to_wdiff(self): -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
r56287 r57256 47 47 if port_name is None: 48 48 port_name = 'chromium-mac' 49 if options and not hasattr(options, ' target'):50 options. target= 'Release'49 if options and not hasattr(options, 'configuration'): 50 options.configuration = 'Release' 51 51 chromium.ChromiumPort.__init__(self, port_name, options) 52 52 … … 146 146 return self._lighttpd_path('bin', 'php-cgi') 147 147 148 def _path_to_driver(self, target=None):149 # TODO(pinkerton): make |target| happy with case-sensitive file148 def _path_to_driver(self, configuration=None): 149 # FIXME: make |configuration| happy with case-sensitive file 150 150 # systems. 151 if not target:152 target = self._options.target153 return self._build_path( target, 'TestShell.app', 'Contents', 'MacOS',154 ' TestShell')151 if not configuration: 152 configuration = self._options.configuration 153 return self._build_path(configuration, 'TestShell.app', 'Contents', 154 'MacOS', 'TestShell') 155 155 156 156 def _path_to_helper(self): 157 return self._build_path(self._options. target, 'layout_test_helper')157 return self._build_path(self._options.configuration, 'layout_test_helper') 158 158 159 159 def _path_to_image_diff(self): 160 return self._build_path(self._options. target, 'image_diff')160 return self._build_path(self._options.configuration, 'image_diff') 161 161 162 162 def _path_to_wdiff(self): -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win.py
r56774 r57256 48 48 if port_name is None: 49 49 port_name = 'chromium-win' + self.version() 50 if options and not hasattr(options, ' target'):51 options. target= 'Release'50 if options and not hasattr(options, 'configuration'): 51 options.configuration = 'Release' 52 52 chromium.ChromiumPort.__init__(self, port_name, options) 53 53 … … 142 142 return self._lighttpd_path('php5', 'php-cgi.exe') 143 143 144 def _path_to_driver(self, target=None):145 if not target:146 target = self._options.target147 return self._build_path( target, 'test_shell.exe')144 def _path_to_driver(self, configuration=None): 145 if not configuration: 146 configuration = self._options.configuration 147 return self._build_path(configuration, 'test_shell.exe') 148 148 149 149 def _path_to_helper(self): 150 return self._build_path(self._options. target, 'layout_test_helper.exe')150 return self._build_path(self._options.configuration, 'layout_test_helper.exe') 151 151 152 152 def _path_to_image_diff(self): 153 return self._build_path(self._options. target, 'image_diff.exe')153 return self._build_path(self._options.configuration, 'image_diff.exe') 154 154 155 155 def _path_to_wdiff(self): -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py
r57254 r57256 81 81 def check_build(self, needs_http): 82 82 build_drt_command = [self.script_path("build-dumprendertree")] 83 if self._options. target== "Debug":83 if self._options.configuration == "Debug": 84 84 build_drt_command.append('--debug') 85 85 if executive.run_command(build_drt_command, return_exit_code=True): … … 320 320 [self.script_path("webkit-build-directory"), 321 321 "--top-level"]).rstrip() 322 return os.path.join(self._cached_build_root, self._options. target,322 return os.path.join(self._cached_build_root, self._options.configuration, 323 323 *comps) 324 324 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
r56876 r57256 1004 1004 datefmt='%y%m%d %H:%M:%S') 1005 1005 1006 # options. targetis used by port to locate image_diff binary.1006 # options.configuration is used by port to locate image_diff binary. 1007 1007 # Check the imgage_diff release binary, if it does not exist, 1008 1008 # fallback to debug. 1009 options. target= "release"1009 options.configuration = "release" 1010 1010 port_obj = port.get(None, options) 1011 1011 if not port_obj.check_image_diff(override_step=None, logging=False): 1012 1012 _log.debug('No release version image diff binary found.') 1013 options. target= "debug"1013 options.configuration = "debug" 1014 1014 port_obj = port.get(None, options) 1015 1015 else: -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r57185 r57256 348 348 self._expectations = self.parse_expectations( 349 349 self._port.test_platform_name(), 350 self._options. target== 'Debug')350 self._options.configuration == 'Debug') 351 351 352 352 self._test_files = set(files) … … 1388 1388 stream=meter) 1389 1389 1390 if not options.target: 1391 if options.debug: 1392 options.target = "Debug" 1393 else: 1394 options.target = "Release" 1390 if not options.configuration: 1391 options.configuration = "Release" 1392 # FIXME: We should detect from set-webkit-configuration. 1395 1393 1396 1394 port_obj = port.get(options.platform, options) … … 1432 1430 1433 1431 if not options.time_out_ms: 1434 if options. target== "Debug":1432 if options.configuration == "Debug": 1435 1433 options.time_out_ms = str(2 * TestRunner.DEFAULT_TEST_TIMEOUT_MS) 1436 1434 else: … … 1461 1459 1462 1460 if options.lint_test_files: 1463 # Creating the expecations for each platform/target pair does all the 1464 # test list parsing and ensures it's correct syntax (e.g. no dupes). 1461 # Creating the expecations for each platform/configuration pair does 1462 # all the test list parsing and ensures it's correct syntax (e.g. no 1463 # dupes). 1465 1464 for platform in port_obj.test_platform_names(): 1466 1465 test_runner.parse_expectations(platform, is_debug_mode=True) … … 1476 1475 if options.new_baseline: 1477 1476 write("Placing new baselines in %s" % port_obj.baseline_path()) 1478 write("Using %s build" % options. target)1477 write("Using %s build" % options.configuration) 1479 1478 if options.pixel_tests: 1480 1479 write("Pixel tests enabled") … … 1485 1484 meter.update("Parsing expectations ...") 1486 1485 test_runner.parse_expectations(port_obj.test_platform_name(), 1487 options. target== 'Debug')1486 options.configuration == 'Debug') 1488 1487 1489 1488 meter.update("Checking build ...") … … 1571 1570 default=False, 1572 1571 help="run a separate test_shell for each test") 1573 option_parser.add_option("", "--debug", action="store_true", default=False,1574 help="use the debug binary instead of the release"1575 " binary")1576 1572 option_parser.add_option("", "--num-slow-tests-to-log", default=50, 1577 1573 help="Number of slow tests whose timings " … … 1579 1575 option_parser.add_option("", "--platform", 1580 1576 help="Override the platform for expected results") 1581 option_parser.add_option("", "--target", default="", 1582 help="Set the build target configuration " 1583 "(overrides --debug)") 1577 option_parser.add_option('--debug', action='store_const', const='Debug', 1578 dest="configuration", 1579 help='Set the configuration to Debug') 1580 option_parser.add_option('--release', action='store_const', const='Release', 1581 dest="configuration", 1582 help='Set the configuration to Release') 1584 1583 option_parser.add_option("", "--log", action="store", 1585 1584 default="detailed-progress,unexpected", -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/fuzzy_image_diff.py
r56475 r57256 45 45 class FuzzyImageDiff(test_type_base.TestTypeBase): 46 46 47 def compare_output(self, filename, output, test_args, target):47 def compare_output(self, filename, output, test_args, configuration): 48 48 """Implementation of CompareOutput that checks the output image and 49 49 checksum against the expected files from the LayoutTest directory. -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
r56647 r57256 85 85 self._save_baseline_data(filename, checksum, ".checksum") 86 86 87 def _create_image_diff(self, port, filename, target):87 def _create_image_diff(self, port, filename, configuration): 88 88 """Creates the visual diff of the expected/actual PNGs. 89 89 90 90 Args: 91 91 filename: the name of the test 92 target: Debug or Release92 configuration: Debug or Release 93 93 Returns True if the files are different, False if they match 94 94 """ … … 111 111 if not _compare_available and not _compare_msg_printed: 112 112 _compare_msg_printed = True 113 print('image_diff not found. Make sure you have a ' + target +114 ' build of the image_diff executable.')113 print('image_diff not found. Make sure you have a ' + 114 configuration + ' build of the image_diff executable.') 115 115 116 116 return result 117 117 118 def compare_output(self, port, filename, output, test_args, target):118 def compare_output(self, port, filename, output, test_args, configuration): 119 119 """Implementation of CompareOutput that checks the output image and 120 120 checksum against the expected files from the LayoutTest directory. … … 170 170 # Even though we only use the result in one codepath below but we 171 171 # still need to call CreateImageDiff for other codepaths. 172 images_are_different = self._create_image_diff(port, filename, target)172 images_are_different = self._create_image_diff(port, filename, configuration) 173 173 if expected_hash == '': 174 174 failures.append(test_failures.FailureMissingImageHash(self)) -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py
r55938 r57256 132 132 return os.path.splitext(output_filename)[0] + modifier 133 133 134 def compare_output(self, port, filename, output, test_args, target):134 def compare_output(self, port, filename, output, test_args, configuration): 135 135 """Method that compares the output from the test with the 136 136 expected value. … … 143 143 test_args: a TestArguments object holding optional additional 144 144 arguments 145 target: Debug or Release145 configuration: Debug or Release 146 146 147 147 Return: -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
r55603 r57256 81 81 return text.strip("\r\n").replace("\r\n", "\n") + "\n" 82 82 83 def compare_output(self, port, filename, output, test_args, target):83 def compare_output(self, port, filename, output, test_args, configuration): 84 84 """Implementation of CompareOutput that checks the output text against 85 85 the expected text from the LayoutTest directory."""
Note: See TracChangeset
for help on using the changeset viewer.