Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1574)

Unified Diff: Tools/GardeningServer/model/ct-failure-group.html

Issue 546433003: Add failed_once category to Sheriff-O-Matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: bail loop early, rebased, and fixed style for new text Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Tools/GardeningServer/model/test/ct-failure-group-tests.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/model/ct-failure-group.html
diff --git a/Tools/GardeningServer/model/ct-failure-group.html b/Tools/GardeningServer/model/ct-failure-group.html
index 60fc5578c1690a93348c65613b9bf121a40ed74c..1b8565ef14d3e24aeb82aba86ca37a627b09eade 100644
--- a/Tools/GardeningServer/model/ct-failure-group.html
+++ b/Tools/GardeningServer/model/ct-failure-group.html
@@ -44,13 +44,30 @@ CTFailureGroup.prototype.clearBug = function(bug) {
});
};
+CTFailureGroup.prototype._failedOnce = function() {
+ var totalFailures = 0;
+ for (var i = 0; i < this.data.dataToExamine().length; i++) {
+ var resultNodes = this.data.dataToExamine()[i].resultNodesByBuilder;
+ Object.keys(resultNodes, function(r) {
+ totalFailures += resultNodes[r].failingBuildCount;
+ if (totalFailures > 1)
+ return false;
+ }.bind(this));
+ }
+ return totalFailures == 1;
+}
+
CTFailureGroup.prototype._computeProperties = function() {
this.isSnoozed = Date.now() < this._annotation.snoozeTime;
if (this.isSnoozed) {
this.category = 'snoozed';
} else {
+ if (this._failedOnce()) {
+ this.category = 'failedOnce';
+ } else {
+ this.category = 'default';
+ }
// FIXME: crbug.com/400397 Split into: Whole step failure, Tree closer, Test failure, Flaky tests
- this.category = 'default';
}
this.bug = this._annotation.bug;
« no previous file with comments | « no previous file | Tools/GardeningServer/model/test/ct-failure-group-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698