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

Side by Side Diff: Tools/GardeningServer/scripts/garden-o-matic.js

Issue 173133003: Convert garden-o-matic guts over to promises where appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update to ToT Created 6 years, 10 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
« no previous file with comments | « Tools/GardeningServer/scripts/controllers.js ('k') | Tools/GardeningServer/scripts/model.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 var gtestIframe = document.querySelector('#chromium-gtests iframe'); 71 var gtestIframe = document.querySelector('#chromium-gtests iframe');
72 if (gtestIframe) 72 if (gtestIframe)
73 gtestIframe.src = gtestIframe.src; 73 gtestIframe.src = gtestIframe.src;
74 74
75 // FIXME: This should be a button with a progress element. 75 // FIXME: This should be a button with a progress element.
76 var numberOfTestsAnalyzed = 0; 76 var numberOfTestsAnalyzed = 0;
77 var updating = new ui.notifications.Info('Loading commit data ...'); 77 var updating = new ui.notifications.Info('Loading commit data ...');
78 78
79 g_info.add(updating); 79 g_info.add(updating);
80 80
81 builders.buildersFailingNonLayoutTests(function(failuresList) { 81 builders.buildersFailingNonLayoutTests().then(function(failuresList) {
82 g_nonLayoutTestFailureBuilders.update(failuresList); 82 g_nonLayoutTestFailureBuilders.update(failuresList);
83 updatePartyTime(); 83 updatePartyTime();
84 }); 84 });
85 85
86 base.callInParallel([model.updateRecentCommits, model.updateResultsByBuilder ], function() { 86 Promise.all([model.updateRecentCommits(), model.updateResultsByBuilder()]).t hen(function() {
87 if (g_failuresController) 87 if (g_failuresController)
88 g_failuresController.update(); 88 g_failuresController.update();
89 89
90 updating.update('Analyzing test failures ...'); 90 updating.update('Analyzing test failures ...');
91 91
92 model.analyzeUnexpectedFailures(function(failureAnalysis) { 92 model.analyzeUnexpectedFailures(function(failureAnalysis) {
93 updating.update('Analyzing test failures ... ' + ++numberOfTestsAnal yzed + ' tests analyzed.'); 93 updating.update('Analyzing test failures ... ' + ++numberOfTestsAnal yzed + ' tests analyzed.');
94 g_unexpectedFailuresController.update(failureAnalysis); 94 g_unexpectedFailuresController.update(failureAnalysis);
95 }, function() { 95 }).then(function() {
96 updatePartyTime(); 96 updatePartyTime();
97 g_unexpectedFailuresController.purge(); 97 g_unexpectedFailuresController.purge();
98 98
99 Object.keys(config.builders).forEach(function(builderName) { 99 Object.keys(config.builders).forEach(function(builderName) {
100 if (!model.state.resultsByBuilder[builderName]) 100 if (!model.state.resultsByBuilder[builderName])
101 g_info.add(new ui.notifications.Info('Could not find test re sults for ' + builderName + ' in the last ' + config.kBuildNumberLimit + ' runs. ')); 101 g_info.add(new ui.notifications.Info('Could not find test re sults for ' + builderName + ' in the last ' + config.kBuildNumberLimit + ' runs. '));
102 }); 102 });
103 103
104 updating.dismiss(); 104 updating.dismiss();
105 105
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (expected) { 162 if (expected) {
163 var failuresView = new ui.failures.List(); 163 var failuresView = new ui.failures.List();
164 g_failuresController = new controllers.ExpectedFailures(model.state, fai luresView, onebarController); 164 g_failuresController = new controllers.ExpectedFailures(model.state, fai luresView, onebarController);
165 expected.appendChild(failuresView); 165 expected.appendChild(failuresView);
166 } 166 }
167 167
168 update(); 168 update();
169 }); 169 });
170 170
171 })(); 171 })();
OLDNEW
« no previous file with comments | « Tools/GardeningServer/scripts/controllers.js ('k') | Tools/GardeningServer/scripts/model.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698