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 /// Collects the test results for all build bots in [buildGroups] for tests | 5 /// Collects the test results for all build bots in [buildGroups] for tests |
6 /// that mention one of the test names given as argument. | 6 /// that mention one of the test names given as argument. |
7 /// | 7 /// |
8 /// The results are currently pulled from the second to last build since the | 8 /// The results are currently pulled from the second to last build since the |
9 /// last build might not have completed yet. | 9 /// last build might not have completed yet. |
10 | 10 |
| 11 import 'dart:async'; |
11 import 'dart:math' hide log; | 12 import 'dart:math' hide log; |
12 import 'dart:io'; | 13 import 'dart:io'; |
13 | 14 |
14 import 'package:args/args.dart'; | 15 import 'package:args/args.dart'; |
15 import 'package:gardening/src/bot.dart'; | 16 import 'package:gardening/src/bot.dart'; |
16 import 'package:gardening/src/buildbot_data.dart'; | 17 import 'package:gardening/src/buildbot_data.dart'; |
17 import 'package:gardening/src/buildbot_structures.dart'; | 18 import 'package:gardening/src/buildbot_structures.dart'; |
18 import 'package:gardening/src/util.dart'; | 19 import 'package:gardening/src/util.dart'; |
19 | 20 |
20 void help(ArgParser argParser) { | 21 void help(ArgParser argParser) { |
21 print('Displays the current status of specific tests on the buildbot'); | 22 print('Displays the current status of specific tests on the buildbot'); |
22 print('The test-names may be fully qualified (such as in '); | 23 print('The test-names may be fully qualified (such as in '); |
23 print('"pkg/front_end/test/token_test") or just be a substring of the fully'); | 24 print('"pkg/front_end/test/token_test") or just be a substring of the fully'); |
24 print(' qualified name.'); | 25 print(' qualified name.'); |
25 print('Usage: current_summary [options] <test-name1> [<test-name2> ...]'); | 26 print('Usage: current_summary [options] <test-name1> [<test-name2> ...]'); |
26 print('where options are:'); | 27 print('where options are:'); |
27 print(argParser.usage); | 28 print(argParser.usage); |
28 } | 29 } |
29 | 30 |
30 main(List<String> args) async { | 31 Future main(List<String> args) async { |
31 ArgParser argParser = createArgParser(); | 32 ArgParser argParser = createArgParser(); |
32 argParser.addOption('group', | 33 argParser.addOption('group', |
33 help: "Restricts the build groups\n" | 34 help: "Restricts the build groups\n" |
34 "to be searched for the results of the given test\n" | 35 "to be searched for the results of the given test\n" |
35 "to those containing the given substring, case insensitive."); | 36 "to those containing the given substring, case insensitive."); |
36 ArgResults argResults = argParser.parse(args); | 37 ArgResults argResults = argParser.parse(args); |
37 processArgResults(argResults); | 38 processArgResults(argResults); |
38 | 39 |
39 Bot bot = new Bot(logdog: argResults['logdog']); | 40 Bot bot = new Bot(logdog: argResults['logdog']); |
40 | 41 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 if (argResults.rest.length == 1) { | 111 if (argResults.rest.length == 1) { |
111 print("Test pattern '${argResults.rest.single}' not found " | 112 print("Test pattern '${argResults.rest.single}' not found " |
112 "in any build bot groups."); | 113 "in any build bot groups."); |
113 } else { | 114 } else { |
114 print("Test patterns '${argResults.rest.join("', '")}' not found " | 115 print("Test patterns '${argResults.rest.join("', '")}' not found " |
115 "in any build bot groups."); | 116 "in any build bot groups."); |
116 } | 117 } |
117 } | 118 } |
118 bot.close(); | 119 bot.close(); |
119 } | 120 } |
OLD | NEW |