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 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 var model = model || {}; | 26 var model = model || {}; |
27 | 27 |
28 (function () { | 28 (function () { |
29 | 29 |
30 var kCommitLogLength = 50; | 30 var kCommitLogLength = 50; |
31 | 31 |
32 model.state = {}; | 32 model.state = {}; |
33 model.state.failureAnalysisByTest = {}; | 33 model.state.failureAnalysisByTest = {}; |
34 model.state.rebaselineQueue = []; | |
35 model.state.expectationsUpdateQueue = []; | 34 model.state.expectationsUpdateQueue = []; |
36 | 35 |
37 function findAndMarkRevertedRevisions(commitDataList) | 36 function findAndMarkRevertedRevisions(commitDataList) |
38 { | 37 { |
39 var revertedRevisions = {}; | 38 var revertedRevisions = {}; |
40 $.each(commitDataList, function(index, commitData) { | 39 $.each(commitDataList, function(index, commitData) { |
41 if (commitData.revertedRevision) | 40 if (commitData.revertedRevision) |
42 revertedRevisions[commitData.revertedRevision] = true; | 41 revertedRevisions[commitData.revertedRevision] = true; |
43 }); | 42 }); |
44 $.each(commitDataList, function(index, commitData) { | 43 $.each(commitDataList, function(index, commitData) { |
(...skipping 21 matching lines...) Expand all Loading... |
66 if (commitData.revision != revision) | 65 if (commitData.revision != revision) |
67 continue; | 66 continue; |
68 if (fuzzyFind(failureAnalysis.testName, commitData)) { | 67 if (fuzzyFind(failureAnalysis.testName, commitData)) { |
69 failureAnalysis.oldestFailingRevision = revision; | 68 failureAnalysis.oldestFailingRevision = revision; |
70 failureAnalysis.newestPassingRevision = revision - 1; | 69 failureAnalysis.newestPassingRevision = revision - 1; |
71 return; | 70 return; |
72 } | 71 } |
73 } | 72 } |
74 } | 73 } |
75 | 74 |
76 model.queueForRebaseline = function(failureInfo) | |
77 { | |
78 model.state.rebaselineQueue.push(failureInfo); | |
79 }; | |
80 | |
81 model.takeRebaselineQueue = function() | |
82 { | |
83 var queue = model.state.rebaselineQueue; | |
84 model.state.rebaselineQueue = []; | |
85 return queue; | |
86 }; | |
87 | |
88 model.queueForExpectationUpdate = function(failureInfo) | 75 model.queueForExpectationUpdate = function(failureInfo) |
89 { | 76 { |
90 model.state.expectationsUpdateQueue.push(failureInfo); | 77 model.state.expectationsUpdateQueue.push(failureInfo); |
91 }; | 78 }; |
92 | 79 |
93 model.takeExpectationUpdateQueue = function() | 80 model.takeExpectationUpdateQueue = function() |
94 { | 81 { |
95 var queue = model.state.expectationsUpdateQueue; | 82 var queue = model.state.expectationsUpdateQueue; |
96 model.state.expectationsUpdateQueue = []; | 83 model.state.expectationsUpdateQueue = []; |
97 return queue; | 84 return queue; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 }; | 219 }; |
233 | 220 |
234 // FIXME: Consider looking at the history to see how long this test | 221 // FIXME: Consider looking at the history to see how long this test |
235 // has been failing. | 222 // has been failing. |
236 | 223 |
237 failureCallback(failureAnalysis); | 224 failureCallback(failureAnalysis); |
238 }); | 225 }); |
239 }; | 226 }; |
240 | 227 |
241 })(); | 228 })(); |
OLD | NEW |