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

Side by Side Diff: tools/gardening/lib/src/compare_failures_impl.dart

Issue 2996013002: Fix index bug in readResults (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « tools/gardening/lib/src/bot.dart ('k') | tools/gardening/test/bot_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Compares the test log of a build step with previous builds. 5 /// Compares the test log of a build step with previous builds.
6 /// 6 ///
7 /// Use this to detect flakiness of failures, especially timeouts. 7 /// Use this to detect flakiness of failures, especially timeouts.
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 10
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 } 31 }
32 if (buildUriList.isEmpty) { 32 if (buildUriList.isEmpty) {
33 for (String url in args) { 33 for (String url in args) {
34 buildUriList.add(new BuildUri.fromUrl(url)); 34 buildUriList.add(new BuildUri.fromUrl(url));
35 } 35 }
36 } 36 }
37 Map<BuildUri, List<BuildResult>> pastResultsMap = 37 Map<BuildUri, List<BuildResult>> pastResultsMap =
38 <BuildUri, List<BuildResult>>{}; 38 <BuildUri, List<BuildResult>>{};
39 List<BuildResult> buildResults = await bot.readResults(buildUriList); 39 List<BuildResult> buildResults = await bot.readResults(buildUriList);
40 for (int index = 0; index < buildUriList.length; index++) { 40 if (buildResults.length != buildUriList.length) {
41 print('Result mismatch: Pulled ${buildUriList.length} uris, '
42 'received ${buildResults.length} results.');
43 }
44 for (int index = 0; index < buildResults.length; index++) {
41 BuildUri buildUri = buildUriList[index]; 45 BuildUri buildUri = buildUriList[index];
42 BuildResult buildResult = buildResults[index]; 46 BuildResult buildResult = buildResults[index];
43 List<BuildResult> results = 47 List<BuildResult> results =
44 await readPastResults(bot, buildUri, buildResult, runCount); 48 await readPastResults(bot, buildUri, buildResult, runCount);
45 pastResultsMap[buildUri] = results; 49 pastResultsMap[buildUri] = results;
46 } 50 }
47 return pastResultsMap; 51 return pastResultsMap;
48 } 52 }
49 53
50 /// Prints summaries for the [buildResults]. 54 /// Prints summaries for the [buildResults].
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 sb.write('No errors found for ${name}'); 211 sb.write('No errors found for ${name}');
208 } 212 }
209 } 213 }
210 214
211 String get name => results.isNotEmpty 215 String get name => results.isNotEmpty
212 // Use the first result as name since it most likely has an absolute build 216 // Use the first result as name since it most likely has an absolute build
213 // number. 217 // number.
214 ? results.first.buildUri.toString() 218 ? results.first.buildUri.toString()
215 : buildUri.toString(); 219 : buildUri.toString();
216 } 220 }
OLDNEW
« no previous file with comments | « tools/gardening/lib/src/bot.dart ('k') | tools/gardening/test/bot_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698