Changeset 85210 in webkit
- Timestamp:
- Apr 28, 2011 10:55:03 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85209 r85210 1 2011-04-28 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 link to tests at a specific revision in the results.html file 6 https://bugs.webkit.org/show_bug.cgi?id=59711 7 8 This matches old-run-webkit-tests. 9 10 * fast/harness/resources/results-test.js: 11 * fast/harness/results-expected.txt: 12 * fast/harness/results.html: 13 1 14 2011-04-28 Dominic Cooney <dominicc@chromium.org> 2 15 -
trunk/LayoutTests/fast/harness/resources/results-test.js
r85089 r85210 30 30 "uses_expectations_file": true, 31 31 "has_pretty_patch": false, 32 "has_wdiff": false 32 "has_wdiff": false, 33 "revision": 12345 33 34 }; 34 35 } … … 311 312 assertTrue(document.querySelectorAll('.zoom-image-container').length == 3); 312 313 }); 314 315 results = mockResults(); 316 results.tests['fullscreen/full-screen-api.html'] = mockExpectation('TEXT', 'IMAGE+TEXT'); 317 runTest(results, function() { 318 var expectedHref = 'file://' + results.layout_tests_dir + '/fullscreen/full-screen-api.html'; 319 assertTrue(document.querySelector('tbody td:first-child a').href == expectedHref); 320 }); 321 322 var oldShouldUseTracLinks = shouldUseTracLinks; 323 shouldUseTracLinks = function() { return true; }; 324 325 results = mockResults(); 326 results.tests['fullscreen/full-screen-api.html'] = mockExpectation('TEXT', 'IMAGE+TEXT'); 327 runTest(results, function() { 328 var expectedHref = 'http://trac.webkit.org/export/' + results.revision + '/trunk/LayoutTests/fullscreen/full-screen-api.html'; 329 assertTrue(document.querySelector('tbody td:first-child a').href == expectedHref); 330 }); 331 332 results = mockResults(); 333 results.tests['fullscreen/full-screen-api.html'] = mockExpectation('TEXT', 'IMAGE+TEXT'); 334 results.revision = ''; 335 runTest(results, function() { 336 var expectedHref = 'http://trac.webkit.org/browser/trunk/LayoutTests/fullscreen/full-screen-api.html'; 337 assertTrue(document.querySelector('tbody td:first-child a').href == expectedHref); 338 }); 339 340 shouldUseTracLinks = oldShouldUseTracLinks; 313 341 314 342 document.body.innerHTML = '<pre>' + g_log.join('\n') + '</pre>'; -
trunk/LayoutTests/fast/harness/results-expected.txt
r85089 r85210 111 111 TEST-23: PASS 112 112 TEST-23: PASS 113 TEST-24: PASS 114 TEST-25: PASS 115 TEST-26: PASS -
trunk/LayoutTests/fast/harness/results.html
r85089 r85210 266 266 } 267 267 268 function shouldUseTracLinks() 269 { 270 return !globalState().results.layout_tests_dir || !location.toString().indexOf('file://') == 0; 271 } 272 268 273 function testLink(test) 269 274 { 270 275 var basePath; 271 if (globalState().results.layout_tests_dir && location.toString().indexOf('file://') == 0) 276 if (shouldUseTracLinks()) { 277 var revision = globalState().results.revision; 278 basePath = 'http://trac.webkit.org'; 279 basePath += revision ? ('/export/' + revision) : '/browser'; 280 basePath += '/trunk/LayoutTests/'; 281 } else 272 282 basePath = globalState().results.layout_tests_dir + '/'; 273 else274 basePath = 'http://trac.webkit.org/browser/trunk/LayoutTests/';275 283 return '<span class=expand-button onclick="toggleExpectations(event)"><span class=expand-button-text>+</span></span>' + 276 284 '<a class=test-link href="' + basePath + test + '">' + test + '</a>'; -
trunk/Tools/ChangeLog
r85200 r85210 1 2011-04-28 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 link to tests at a specific revision in the results.html file 6 https://bugs.webkit.org/show_bug.cgi?id=59711 7 8 * Scripts/webkitpy/common/checkout/scm.py: 9 Add a method to get the head svn revision. 10 * Scripts/webkitpy/common/checkout/scm_unittest.py: 11 * Scripts/webkitpy/layout_tests/layout_package/manager.py: 12 Include the svn revision in the results json. 13 1 14 2011-04-28 Carlos Garcia Campos <cgarcia@igalia.com> 2 15 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm.py
r84730 r85210 272 272 self._subclass_must_implement() 273 273 274 def head_svn_revision(self): 275 self._subclass_must_implement() 276 274 277 def create_patch(self, git_commit=None, changed_files=None): 275 278 self._subclass_must_implement() … … 496 499 return "svn" 497 500 501 def head_svn_revision(self): 502 return self.value_from_svn_info(self.checkout_root, 'Revision') 503 498 504 # FIXME: This method should be on Checkout. 499 505 def create_patch(self, git_commit=None, changed_files=None): … … 781 787 return "git" 782 788 783 def prepend_svn_revision(self, diff):789 def head_svn_revision(self): 784 790 git_log = self.run(['git', 'log', '-25']) 785 791 match = re.search("^\s*git-svn-id:.*@(?P<svn_revision>\d+)\ ", git_log, re.MULTILINE) 786 792 if not match: 793 return "" 794 return str(match.group('svn_revision')) 795 796 def prepend_svn_revision(self, diff): 797 revision = self.head_svn_revision() 798 if not revision: 787 799 return diff 788 800 789 return "Subversion Revision: " + str(match.group('svn_revision'))+ '\n' + diff801 return "Subversion Revision: " + revision + '\n' + diff 790 802 791 803 def create_patch(self, git_commit=None, changed_files=None): -
trunk/Tools/Scripts/webkitpy/common/checkout/scm_unittest.py
r84730 r85210 178 178 # Change back to a valid directory so that later calls to os.getcwd() do not fail. 179 179 if os.path.isabs(__file__): 180 path = __file__180 path = os.path.dirname(__file__) 181 181 else: 182 182 path = sys.path[0] … … 475 475 self.assertFalse(scm.exists('foo.txt')) 476 476 477 def _shared_test_head_svn_revision(self): 478 self.assertEqual(self.scm.head_svn_revision(), '5') 477 479 478 480 class SVNTest(SCMTest): … … 792 794 self.assertTrue("test_file" in self.scm.deleted_files()) 793 795 796 def test_head_svn_revision(self): 797 self._shared_test_head_svn_revision() 798 794 799 def test_propset_propget(self): 795 800 filepath = os.path.join(self.svn_checkout_path, "test_file") … … 855 860 """Sets up fresh git repository with one commit. Then setups a second git 856 861 repo that tracks the first one.""" 862 # FIXME: We should instead clone a git repo that is tracking an SVN repo. 863 # That better matches what we do with WebKit. 857 864 self.original_dir = os.getcwd() 858 865 … … 901 908 self._shared_test_exists(scm, scm.commit_locally_with_message) 902 909 910 def test_head_svn_revision(self): 911 scm = detect_scm_system(self.untracking_checkout_path) 912 # If we cloned a git repo tracking an SVG repo, this would give the same result as 913 # self._shared_test_head_svn_revision(). 914 self.assertEqual(scm.head_svn_revision(), '') 903 915 904 916 class GitSVNTest(SCMTest): … … 1388 1400 self.assertTrue("test_file_commit1" in self.scm.deleted_files()) 1389 1401 1402 def test_head_svn_revision(self): 1403 self._shared_test_head_svn_revision() 1404 1390 1405 def test_to_object_name(self): 1391 1406 relpath = 'test_file_commit1' -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/manager.py
r85111 r85210 47 47 import time 48 48 49 from webkitpy.common.checkout import scm 50 49 51 from webkitpy.layout_tests.layout_package import json_layout_results_generator 50 52 from webkitpy.layout_tests.layout_package import json_results_generator … … 188 190 results['has_wdiff'] = port_obj.wdiff_available() 189 191 results['has_pretty_patch'] = port_obj.pretty_patch_available() 192 results['revision'] = scm.default_scm().head_svn_revision() 190 193 191 194 return results
Note: See TracChangeset
for help on using the changeset viewer.