Changeset 92166 in webkit
- Timestamp:
- Aug 1, 2011 8:47:48 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/base.js
r91677 r92166 135 135 }; 136 136 137 base.callInSequence = function(func tionList, callback)137 base.callInSequence = function(func, argumentList, callback) 138 138 { 139 139 var nextIndex = 0; … … 141 141 function callNext() 142 142 { 143 if (nextIndex >= functionList.length)143 if (nextIndex >= argumentList.length) { 144 144 callback(); 145 146 functionList[nextIndex].call(null, callNext); 145 return; 146 } 147 148 func(argumentList[nextIndex++], callNext); 147 149 } 148 150 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/base_unittests.js
r91519 r92166 47 47 deepEqual(base.keys({"a": 1, "b": 0}), ["a", "b"]); 48 48 deepEqual(base.keys({"a": 1, "b": { "c" : 1}}), ["a", "b"]); 49 }); 50 51 test("callInParallel", 4, function() { 52 var expectedCall = [true, true, true]; 53 var expectCompletionCallback = true; 54 55 base.callInParallel([ 56 function(callback) { 57 ok(expectedCall[0]); 58 expectedCall[0] = false; 59 callback(); 60 }, 61 function(callback) { 62 ok(expectedCall[1]); 63 expectedCall[1] = false; 64 callback(); 65 }, 66 function(callback) { 67 ok(expectedCall[2]); 68 expectedCall[2] = false; 69 callback(); 70 }, 71 ], function() { 72 ok(expectCompletionCallback); 73 expectCompletionCallback = false; 74 }) 75 }); 76 77 test("callInSequence", 7, function() { 78 var expectedArg = 42; 79 var expectCompletionCallback = true; 80 81 base.callInSequence(function(arg, callback) { 82 ok(arg < 45); 83 equals(arg, expectedArg++); 84 callback(); 85 }, [42, 43, 44], function() { 86 ok(expectCompletionCallback); 87 expectCompletionCallback = false; 88 }) 49 89 }); 50 90 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js
r91519 r92166 15 15 } 16 16 17 checkout.existsAtRevision = function 17 checkout.existsAtRevision = function(subversionURL, revision, callback) 18 18 { 19 19 $.ajax({ … … 29 29 }; 30 30 31 checkout.optimizeBaselines = function(testName, callback) 32 { 33 $.post('/optimizebaselines?' + $.param({ 34 'test': testName, 35 }), function() { 36 callback(); 37 }); 38 }; 39 31 40 checkout.rebaseline = function(builderName, testName, failureTypeList, callback) 32 41 { 33 var extensionList = [];42 var extensionList = Array.prototype.concat.apply([], failureTypeList.map(results.failureTypeToExtensionList)); 34 43 35 $.each(failureTypeList, function(index, failureType) { 36 extensionList = extensionList.concat(results.failureTypeToExtensionList(failureType)); 37 }); 38 39 if (!extensionList.length) 40 callback(); 41 42 var requestTracker = new base.RequestTracker(extensionList.length, callback); 43 44 $.each(extensionList, function(index, extension) { 44 base.callInSequence(function(extension, callback) { 45 45 $.post('/rebaseline?' + $.param({ 46 46 'builder': builderName, 47 47 'test': testName, 48 // FIXME: Rename "suffix" query parameter to "extension". 49 'suffix': extension 48 'extension': extension 50 49 }), function() { 51 requestTracker.requestComplete();50 callback(); 52 51 }); 53 } );52 }, extensionList, callback); 54 53 }; 55 54 56 55 checkout.rebaselineAll = function(rebaselineTasks, callback) 57 56 { 58 var nextIndex = 0; 59 60 function rebaselineNext() 61 { 62 if (nextIndex >= rebaselineTasks.length) { 63 callback(); 64 return; 65 } 66 var task = rebaselineTasks[nextIndex++]; 67 checkout.rebaseline(task.builderName, task.testName, task.failureTypeList, rebaselineNext); 68 } 69 70 rebaselineNext(); 57 base.callInSequence(function(task, callback) { 58 checkout.rebaseline(task.builderName, task.testName, task.failureTypeList, callback); 59 }, rebaselineTasks, function() { 60 var testNameList = base.uniquifyArray(rebaselineTasks.map(function(task) { return task.testName; })); 61 base.callInSequence(checkout.optimizeBaselines, testNameList, callback); 62 }); 71 63 }; 72 64 -
trunk/Tools/ChangeLog
r92160 r92166 1 2011-08-01 Adam Barth <abarth@webkit.org> 2 3 garden-o-matic should call optimize-baselines when rebaselining tests 4 https://bugs.webkit.org/show_bug.cgi?id=65499 5 6 Reviewed by Dimitri Glazkov. 7 8 I took the opportunity to modernize this code to use some of our more 9 powerful primitives from base. 10 11 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/base.js: 12 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/base_unittests.js: 13 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js: 14 * Scripts/webkitpy/tool/servers/gardeningserver.py: 15 * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: 16 1 17 2011-08-01 Stephanie Lewis <slewis@apple.com> 2 18 -
trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
r92137 r92166 84 84 builder = self.query['builder'][0] 85 85 test = self.query['test'][0] 86 suffix = self.query['suffix'][0]86 extension = self.query['extension'][0] 87 87 self._run_webkit_patch([ 88 88 'rebaseline-test', 89 89 builder, 90 90 test, 91 suffix,91 extension, 92 92 ]) 93 93 self._serve_text('success') 94 95 def optimizebaselines(self): 96 test = self.query['test'][0] 97 self._run_webkit_patch([ 98 'optimize-baselines', 99 test, 100 ]) 101 self._serve_text('success') -
trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py
r92137 r92166 78 78 expected_stderr = "MOCK run_command: ['echo', 'rebaseline-test', 'MOCK builder', 'user-scripts/another-test.html', 'txt'], cwd=/mock-checkout\n" 79 79 expected_stdout = "== Begin Response ==\nsuccess\n== End Response ==\n" 80 self._post_to_path("/rebaseline?builder=MOCK+builder&test=user-scripts/another-test.html&suffix=txt", expected_stderr=expected_stderr, expected_stdout=expected_stdout) 80 self._post_to_path("/rebaseline?builder=MOCK+builder&test=user-scripts/another-test.html&extension=txt", expected_stderr=expected_stderr, expected_stdout=expected_stdout) 81 82 def test_optimizebaselines(self): 83 expected_stderr = "MOCK run_command: ['echo', 'optimize-baselines', 'user-scripts/another-test.html'], cwd=/mock-checkout\n" 84 expected_stdout = "== Begin Response ==\nsuccess\n== End Response ==\n" 85 self._post_to_path("/optimizebaselines?test=user-scripts/another-test.html", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
Note: See TracChangeset
for help on using the changeset viewer.