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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 checkout.rollout = function(revision, reason) | 61 checkout.rollout = function(revision, reason) |
62 { | 62 { |
63 return checkoutAvailable().then(function() { | 63 return checkoutAvailable().then(function() { |
64 return net.post('/rollout?' + $.param({ | 64 return net.post('/rollout?' + $.param({ |
65 'revision': revision, | 65 'revision': revision, |
66 'reason': reason | 66 'reason': reason |
67 })); | 67 })); |
68 }); | 68 }); |
69 }; | 69 }; |
70 | 70 |
71 checkout.rebaseline = function(failureInfoList, progressCallback, debugBotsCallb
ack) | |
72 { | |
73 return checkoutAvailable().then(function() { | |
74 var tests = {}; | |
75 for (var i = 0; i < failureInfoList.length; i++) { | |
76 var failureInfo = failureInfoList[i]; | |
77 if (failureInfo.builderName.indexOf('dbg') != -1) { | |
78 debugBotsCallback(failureInfo); | |
79 continue; | |
80 } | |
81 tests[failureInfo.testName] = tests[failureInfo.testName] || {}; | |
82 tests[failureInfo.testName][failureInfo.builderName] = | |
83 base.uniquifyArray(base.flattenArray(failureInfo.failureTypeList
.map(results.failureTypeToExtensionList))); | |
84 } | |
85 net.post('/rebaselineall', JSON.stringify(tests)).then(progressCallback,
progressCallback); | |
86 }); | |
87 }; | |
88 | |
89 })(); | 71 })(); |
OLD | NEW |