Changeset 83646 in webkit
- Timestamp:
- Apr 12, 2011 3:02:14 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r83643 r83646 1 2011-04-12 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 new-run-webkit-tests: --results-directory is relative to builddir, not $PWD 6 https://bugs.webkit.org/show_bug.cgi?id=58272 7 8 NRWT was interpreting the --results-directory cmd line arg as 9 relative to the build directory, not the current working 10 directory (ORWT uses the latter, which is much more intuitive). 11 12 This patch fixes the base case, but includes an override for 13 Chromium that is needed until the bots can be updated. 14 15 * Scripts/webkitpy/layout_tests/port/base.py: 16 * Scripts/webkitpy/layout_tests/port/base_unittest.py: 17 * Scripts/webkitpy/layout_tests/port/chromium.py: 18 * Scripts/webkitpy/layout_tests/port/port_testcase.py: 19 * Scripts/webkitpy/layout_tests/port/test.py: 20 * Scripts/webkitpy/layout_tests/port/webkit.py: 21 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 22 * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py: 23 1 24 2011-04-12 Philippe Normand <pnormand@igalia.com> 2 25 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py
r83635 r83646 141 141 self._test_configuration = None 142 142 self._multiprocessing_is_available = (multiprocessing is not None) 143 self._results_directory = None 143 144 144 145 def default_child_processes(self): … … 571 572 572 573 def results_directory(self): 573 """Absolute path to the place to store the test results.""" 574 raise NotImplementedError('Port.results_directory') 574 """Absolute path to the place to store the test results (uses --results-directory).""" 575 if not self._results_directory: 576 option_val = self.get_option('results_directory') or self.default_results_directory() 577 self._results_directory = self._filesystem.abspath(option_val) 578 return self._results_directory 579 580 def default_results_directory(self): 581 """Absolute path to the default place to store the test results.""" 582 raise NotImplementedError() 575 583 576 584 def setup_test_run(self): -
trunk/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
r82972 r83646 275 275 self.assertVirtual(port.diff_image, None, None) 276 276 self.assertVirtual(port.path_to_test_expectations_file) 277 self.assertVirtual(port. results_directory)277 self.assertVirtual(port.default_results_directory) 278 278 self.assertVirtual(port.test_expectations) 279 279 self.assertVirtual(port._path_to_apache) -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
r83635 r83646 201 201 'chromium', 'test_expectations.txt') 202 202 203 def results_directory(self):203 def default_results_directory(self): 204 204 try: 205 205 return self.path_from_chromium_base('webkit', 206 206 self.get_option('configuration'), 207 self.get_option('results_directory'))207 'layout-test-results') 208 208 except AssertionError: 209 209 return self._build_path(self.get_option('configuration'), 210 self.get_option('results_directory')) 210 'layout-test-results') 211 212 def results_directory(self): 213 # FIXME: This is a hack needed for compatibility with the Chromium 214 # buildbots until their scripts can be updated. Once they have been, 215 # this routine can be deleted and we can use the base class. 216 # See https://bugs.webkit.org/show_bug.cgi?id=58272 for more details. 217 if not self._results_directory: 218 option_val = self.get_option('results_directory') 219 if option_val and not self._filesystem.isabs(option_val): 220 self._results_directory = self._build_path(self.get_option('configuration'), 221 option_val) 222 else: 223 return super(ChromiumPort, self).results_directory(self) 224 return self._results_directory 211 225 212 226 def setup_test_run(self): -
trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
r83476 r83646 39 39 40 40 from webkitpy.tool import mocktool 41 mock_options = mocktool.MockOptions(results_directory='layout-test-results', 42 use_apache=True, 41 mock_options = mocktool.MockOptions(use_apache=True, 43 42 configuration='Release') 44 43 … … 61 60 return None 62 61 63 port = maker(options=options) 64 if hasattr(options, "results_directory"): 65 port._options.results_directory = port.results_directory() 66 return port 62 return maker(options=options) 67 63 68 64 def test_default_worker_model(self): -
trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py
r83635 r83646 330 330 return None 331 331 332 def results_directory(self): 333 if not self._results_directory: 334 self._results_directory = self._filesystem.join('/tmp', 335 self.get_option('results_directory')) 336 return self._results_directory 332 def default_results_directory(self): 333 return '/tmp/layout-test-results' 337 334 338 335 def setup_test_run(self): -
trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py
r83475 r83646 167 167 return result 168 168 169 def results_directory(self):169 def default_results_directory(self): 170 170 # Results are store relative to the built products to make it easy 171 171 # to have multiple copies of webkit checked out and built. 172 return self._build_path( self.get_option('results_directory'))172 return self._build_path('layout-test-results') 173 173 174 174 def setup_test_run(self): -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r83635 r83646 153 153 options.use_apache = sys.platform in ('darwin', 'linux2') 154 154 155 if not port_obj._filesystem.isabs(options.results_directory):156 # This normalizes the path to the build dir.157 # FIXME: how this happens is not at all obvious; this is a dumb158 # interface and should be cleaned up.159 options.results_directory = port_obj.results_directory()160 161 155 if not options.time_out_ms: 162 156 if options.configuration == "Debug": … … 289 283 help="Ignore image differences less than this percentage (some " 290 284 "ports may ignore this option)", type="float"), 291 optparse.make_option("--results-directory", 292 default="layout-test-results", 293 help="Output results directory source dir, relative to Debug or " 294 "Release"), 285 optparse.make_option("--results-directory", help="Location of test results"), 295 286 optparse.make_option("--build-directory", 296 287 help="Path to the directory under which build files are kept (should not include configuration)"), -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
r82972 r83646 36 36 import itertools 37 37 import logging 38 import os 38 39 import Queue 39 40 import sys … … 466 467 # We run a configuration that should fail, to generate output, then 467 468 # look for what the output results url was. 468 469 fs = port.unit_test_filesystem() 470 fs.maybe_make_directory('/tmp/cwd') 471 fs.chdir('/tmp/cwd') 469 472 res, out, err, user = logging_run(['--results-directory=foo'], 470 tests_included=True )471 self.assertEqual(user.opened_urls, ['/tmp/ foo/results.html'])473 tests_included=True, filesystem=fs) 474 self.assertEqual(user.opened_urls, ['/tmp/cwd/foo/results.html']) 472 475 473 476 # These next tests test that we run the tests in ascending alphabetical
Note: See TracChangeset
for help on using the changeset viewer.