| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } else { | 46 } else { |
| 47 failuresToRebaseline.push(failureInfo); | 47 failuresToRebaseline.push(failureInfo); |
| 48 if (testNamesLogged.indexOf(failureInfo.testName) == -1) { | 48 if (testNamesLogged.indexOf(failureInfo.testName) == -1) { |
| 49 statusView.addMessage(id, 'Rebaselining ' + failureInfo.testName
+ '...'); | 49 statusView.addMessage(id, 'Rebaselining ' + failureInfo.testName
+ '...'); |
| 50 testNamesLogged.push(failureInfo.testName); | 50 testNamesLogged.push(failureInfo.testName); |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 }); | 53 }); |
| 54 | 54 |
| 55 if (failuresToRebaseline.length) { | 55 if (failuresToRebaseline.length) { |
| 56 checkout.rebaseline(failuresToRebaseline, function() { | 56 // FIXME: checkout.rebaseline() accepts only 3 arguments, we pass 5. |
| 57 statusView.addFinalMessage(id, 'Rebaseline done! Please land with "w
ebkit-patch land-cowhand".'); | 57 checkout.rebaseline(failuresToRebaseline, function(response) { |
| 58 try { |
| 59 var json = JSON.parse(response); |
| 60 if (!json.result_code) { |
| 61 statusView.addFinalMessage(id, 'Rebaseline done! Please comm
it locally and land with "git cl dcommit".'); |
| 62 } else { |
| 63 statusView.addMessage(id, 'Rebaseline failed (code=' + json.
result_code + ')!'); |
| 64 statusView.addFinalMessage(id, json.output); |
| 65 } |
| 66 } catch (e) { |
| 67 statusView.addFinalMessage(id, 'Invalid response received: "' +
response + '"'); |
| 68 } |
| 58 }, function(failureInfo) { | 69 }, function(failureInfo) { |
| 59 statusView.addMessage(id, failureInfo.testName + ' on ' + ui.display
NameForBuilder(failureInfo.builderName)); | 70 statusView.addMessage(id, failureInfo.testName + ' on ' + ui.display
NameForBuilder(failureInfo.builderName)); |
| 60 }, function() { | 71 }, function() { |
| 61 statusView.addFinalMessage(id, kCheckoutUnavailableMessage); | 72 statusView.addFinalMessage(id, kCheckoutUnavailableMessage); |
| 62 }, function(failureInfo) { | 73 }, function(failureInfo) { |
| 63 statusView.addMessage(id, 'Skipping rebaseline for ' + failureInfo.t
estName + ' on ' + ui.displayNameForBuilder(failureInfo.builderName) + ' because
we only rebaseline from release bots.'); | 74 statusView.addMessage(id, 'Skipping rebaseline for ' + failureInfo.t
estName + ' on ' + ui.displayNameForBuilder(failureInfo.builderName) + ' because
we only rebaseline from release bots.'); |
| 64 }); | 75 }); |
| 65 } else { | 76 } else { |
| 66 statusView.addFinalMessage(id, 'No non-reftests left to rebaseline!') | 77 statusView.addFinalMessage(id, 'No non-reftests left to rebaseline!') |
| 67 } | 78 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 81 function updateExpectationsWithStatusUpdates(failureInfoList) | 92 function updateExpectationsWithStatusUpdates(failureInfoList) |
| 82 { | 93 { |
| 83 var statusView = new ui.StatusArea('Expectations Update'); | 94 var statusView = new ui.StatusArea('Expectations Update'); |
| 84 var id = statusView.newId(); | 95 var id = statusView.newId(); |
| 85 | 96 |
| 86 var testNames = base.uniquifyArray(failureInfoList.map(function(failureInfo)
{ return failureInfo.testName; })); | 97 var testNames = base.uniquifyArray(failureInfoList.map(function(failureInfo)
{ return failureInfo.testName; })); |
| 87 var testName = testNames.length == 1 ? testNames[0] : testNames.length + ' t
ests'; | 98 var testName = testNames.length == 1 ? testNames[0] : testNames.length + ' t
ests'; |
| 88 statusView.addMessage(id, 'Updating expectations of ' + testName + '...'); | 99 statusView.addMessage(id, 'Updating expectations of ' + testName + '...'); |
| 89 | 100 |
| 90 checkout.updateExpectations(failureInfoList, function() { | 101 checkout.updateExpectations(failureInfoList, function() { |
| 91 statusView.addFinalMessage(id, 'Expectations update done! Please land wi
th "webkit-patch land-cowhand".'); | 102 statusView.addFinalMessage(id, 'Expectations update done! Please commit
them locally and land with "git cl dcommit".'); |
| 92 }, function() { | 103 }, function() { |
| 93 statusView.addFinalMessage(id, kCheckoutUnavailableMessage); | 104 statusView.addFinalMessage(id, kCheckoutUnavailableMessage); |
| 94 }); | 105 }); |
| 95 } | 106 } |
| 96 | 107 |
| 97 controllers.ResultsDetails = base.extends(Object, { | 108 controllers.ResultsDetails = base.extends(Object, { |
| 98 init: function(view, resultsByTest) | 109 init: function(view, resultsByTest) |
| 99 { | 110 { |
| 100 this._view = view; | 111 this._view = view; |
| 101 this._resultsByTest = resultsByTest; | 112 this._resultsByTest = resultsByTest; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 this._notification = new ui.notifications.BuildersFailing(this._mess
age); | 349 this._notification = new ui.notifications.BuildersFailing(this._mess
age); |
| 339 this._view.add(this._notification); | 350 this._view.add(this._notification); |
| 340 } | 351 } |
| 341 // FIXME: We should provide regression ranges for the failing builders. | 352 // FIXME: We should provide regression ranges for the failing builders. |
| 342 // This doesn't seem to happen often enough to worry too much about that
, however. | 353 // This doesn't seem to happen often enough to worry too much about that
, however. |
| 343 this._notification.setFailingBuilders(failuresList); | 354 this._notification.setFailingBuilders(failuresList); |
| 344 } | 355 } |
| 345 }); | 356 }); |
| 346 | 357 |
| 347 })(); | 358 })(); |
| OLD | NEW |