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

Side by Side Diff: Tools/TestResultServer/static-dashboards/builders.js

Issue 309783002: Exclude test types that don't upload from the flakiness dashboard UI. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address review comments. update test Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (C) 2012 Google Inc. All rights reserved. 1 // Copyright (C) 2012 Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * 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 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 13 matching lines...) Expand all
24 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 function LOAD_BUILDBOT_DATA(builderData) 29 function LOAD_BUILDBOT_DATA(builderData)
30 { 30 {
31 builders.masters = {}; 31 builders.masters = {};
32 var groups = {}; 32 var groups = {};
33 var testTypes = {}; 33 var testTypes = {};
34 var testTypesThatDoNotUpload = {};
35 builders.noUploadTestTypes = builderData['no_upload_test_types']
34 builderData['masters'].forEach(function(master) { 36 builderData['masters'].forEach(function(master) {
35 builders.masters[master.name] = new builders.BuilderMaster(master.name, master.url, master.tests, master.groups); 37 builders.masters[master.name] = new builders.BuilderMaster(master.name, master.url, master.tests, master.groups);
36 38
37 master.groups.forEach(function(group) { groups[group] = true; }); 39 master.groups.forEach(function(group) { groups[group] = true; });
38 40
39 Object.keys(master.tests).forEach(function(testType) { 41 Object.keys(master.tests).forEach(function(testType) {
40 if (builders.testTypeUploadsToFlakinessDashboardServer(testType)) 42 if (builders.testTypeUploadsToFlakinessDashboardServer(testType))
41 testTypes[testType] = true; 43 testTypes[testType] = true;
44 else
45 testTypesThatDoNotUpload[testType] = true;
42 }); 46 });
43 }); 47 });
44 builders.groups = Object.keys(groups); 48 builders.groups = Object.keys(groups);
45 builders.groups.sort(); 49 builders.groups.sort();
46 builders.testTypes = Object.keys(testTypes); 50 builders.testTypes = Object.keys(testTypes);
47 builders.testTypes.sort(); 51 builders.testTypes.sort();
52 // FIXME: Expose this in the flakiness dashboard UI and give a clear error m essage
53 // pointing to a bug about getting the test type in question uploading resul ts.
54 builders.testTypesThatDoNotUpload = Object.keys(testTypesThatDoNotUpload);
55 builders.testTypesThatDoNotUpload.sort();
48 } 56 }
49 57
50 var builders = builders || {}; 58 var builders = builders || {};
51 59
52 (function() { 60 (function() {
53 61
54 builders.testTypeUploadsToFlakinessDashboardServer = function(testType) 62 builders.testTypeUploadsToFlakinessDashboardServer = function(testType)
55 { 63 {
56 // FIXME: Encode whether the test uploads to the server in the buildbot json so 64 for (var i = 0; i < builders.noUploadTestTypes.length; i++) {
57 // we can include that data in buildbot.jsonp and not need to do ugly heuris tics 65 if (string.contains(testType, builders.noUploadTestTypes[i]))
58 // based off the name of the test suite. This code both has some false posit ives 66 return false;
59 // and some false negatives. 67 }
60 return !testType.match(/_only|_ignore|_perf$/) && !testType.match(/^memory t est:|install_/) && testType != 'Run tests'; 68 return true;
61 } 69 }
62 70
63 var currentBuilderGroup = {}; 71 var currentBuilderGroup = {};
64 var testTypesThatRunToTBlinkBots = ['layout-tests', 'webkit_unit_tests']; 72 var testTypesThatRunToTBlinkBots = ['layout-tests', 'webkit_unit_tests'];
65 73
66 builders.getBuilderGroup = function(groupName, testType) 74 builders.getBuilderGroup = function(groupName, testType)
67 { 75 {
68 if (!builders in currentBuilderGroup) { 76 if (!builders in currentBuilderGroup) {
69 currentBuilderGroup = builders.loadBuildersList(groupName, testType); 77 currentBuilderGroup = builders.loadBuildersList(groupName, testType);
70 } 78 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if (prev.indexOf(curr) == -1) { 220 if (prev.indexOf(curr) == -1) {
213 prev.push(curr); 221 prev.push(curr);
214 } 222 }
215 return prev; 223 return prev;
216 }, []); 224 }, []);
217 225
218 return groupNames; 226 return groupNames;
219 } 227 }
220 228
221 })(); 229 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698