OLD | NEW |
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 'dart:async'; |
5 import 'package:args/args.dart'; | 6 import 'package:args/args.dart'; |
6 import 'package:gardening/src/bot.dart'; | 7 import 'package:gardening/src/bot.dart'; |
7 import 'package:gardening/src/buildbot_data.dart'; | 8 import 'package:gardening/src/buildbot_data.dart'; |
8 import 'package:gardening/src/buildbot_structures.dart'; | 9 import 'package:gardening/src/buildbot_structures.dart'; |
9 import 'package:gardening/src/util.dart'; | 10 import 'package:gardening/src/util.dart'; |
10 | 11 |
11 void help(ArgParser argParser) { | 12 void help(ArgParser argParser) { |
12 print('Summarizes the current status of the build bot.'); | 13 print('Summarizes the current status of the build bot.'); |
13 print('Usage: summary [options] (<group> ...)'); | 14 print('Usage: summary [options] (<group> ...)'); |
14 print(" where <group> is (part of) a build bot group, like 'vm-kernel', "); | 15 print(" where <group> is (part of) a build bot group, like 'vm-kernel', "); |
15 print(" and options are:"); | 16 print(" and options are:"); |
16 print(argParser.usage); | 17 print(argParser.usage); |
17 } | 18 } |
18 | 19 |
19 main(List<String> args) async { | 20 Future main(List<String> args) async { |
20 ArgParser argParser = createArgParser(); | 21 ArgParser argParser = createArgParser(); |
21 ArgResults argResults = argParser.parse(args); | 22 ArgResults argResults = argParser.parse(args); |
22 processArgResults(argResults); | 23 processArgResults(argResults); |
23 if (argResults['help']) { | 24 if (argResults['help']) { |
24 help(argParser); | 25 help(argParser); |
25 return; | 26 return; |
26 } | 27 } |
27 | 28 |
28 Bot bot = new Bot(logdog: argResults['logdog']); | 29 Bot bot = new Bot(logdog: argResults['logdog']); |
29 List<BuildResult> buildResultsWithoutFailures = <BuildResult>[]; | 30 List<BuildResult> buildResultsWithoutFailures = <BuildResult>[]; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 print(' Found ${buildResultsWithFailures.length} ' | 83 print(' Found ${buildResultsWithFailures.length} ' |
83 'test steps with failures:'); | 84 'test steps with failures:'); |
84 for (BuildResult result in buildResultsWithFailures) { | 85 for (BuildResult result in buildResultsWithFailures) { |
85 print(' ${result.buildUri.toUri()}'); | 86 print(' ${result.buildUri.toUri()}'); |
86 } | 87 } |
87 } | 88 } |
88 } | 89 } |
89 | 90 |
90 bot.close(); | 91 bot.close(); |
91 } | 92 } |
OLD | NEW |