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

Side by Side Diff: tools/gardening/bin/summary.dart

Issue 2999433002: Fix `bot summary` when URIs couldn't be read. (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 | « no previous file | tools/gardening/lib/src/bot.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 import 'package:args/args.dart'; 5 import 'package:args/args.dart';
6 import 'package:gardening/src/bot.dart'; 6 import 'package:gardening/src/bot.dart';
7 import 'package:gardening/src/util.dart'; 7 import 'package:gardening/src/util.dart';
8 8
9 void help(ArgParser argParser) { 9 void help(ArgParser argParser) {
10 print('Summarizes the current status of the build bot.'); 10 print('Summarizes the current status of the build bot.');
11 print('Usage: summary [options]'); 11 print('Usage: summary [options]');
12 print(' where options are:'); 12 print(' where options are:');
13 print(argParser.usage); 13 print(argParser.usage);
14 } 14 }
15 15
16 main(List<String> args) async { 16 main(List<String> args) async {
17 ArgParser argParser = createArgParser(); 17 ArgParser argParser = createArgParser();
18 ArgResults argResults = argParser.parse(args); 18 ArgResults argResults = argParser.parse(args);
19 processArgResults(argResults); 19 processArgResults(argResults);
20 if (argResults['help']) { 20 if (argResults['help']) {
21 help(argParser); 21 help(argParser);
22 return; 22 return;
23 } 23 }
24 24
25 var bot = new Bot(logdog: argResults['logdog']); 25 var bot = new Bot(logdog: argResults['logdog']);
26 var recentUris = bot.mostRecentUris; 26 var recentUris = bot.mostRecentUris;
27 var results = await bot.readResults(recentUris); 27 var results = await bot.readResults(recentUris);
28 results.forEach((result) { 28 results.forEach((result) {
29 if (result.hasFailures) { 29 if (result != null && result.hasFailures) {
30 print("${result.buildUri} has failures."); 30 print("${result.buildUri} has failures.");
31 } 31 }
32 }); 32 });
33 bot.close(); 33 bot.close();
34 } 34 }
OLDNEW
« no previous file with comments | « no previous file | tools/gardening/lib/src/bot.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698