| Index: tools/gardening/bin/current_summary.dart
|
| diff --git a/tools/gardening/bin/current_summary.dart b/tools/gardening/bin/current_summary.dart
|
| index 78e813b59677beddb4b3c8645470c806c154ac3f..318d407421d6b7ed6e0e076b907610f8a6f3d68a 100644
|
| --- a/tools/gardening/bin/current_summary.dart
|
| +++ b/tools/gardening/bin/current_summary.dart
|
| @@ -8,7 +8,8 @@
|
| /// The results are currently pulled from the second to last build since the
|
| /// last build might not have completed yet.
|
|
|
| -import 'dart:math';
|
| +import 'dart:async';
|
| +import 'dart:math' hide log;
|
| import 'dart:io';
|
|
|
| import 'package:args/args.dart';
|
| @@ -17,14 +18,24 @@ import 'package:gardening/src/buildbot_loading.dart';
|
| import 'package:gardening/src/buildbot_structures.dart';
|
| import 'package:gardening/src/util.dart';
|
|
|
| +void help(ArgParser argParser) {
|
| + print('Displays the current status of specific tests on the buildbot');
|
| + print('Only prints output for failing tests.');
|
| + print('The test-names may be fully qualified (such as in ');
|
| + print('"pkg/front_end/test/token_test") or just be a substring of the fully');
|
| + print(' qualified name.');
|
| + print('Usage: current_summary [options] <test-name1> [<test-name2> ...]');
|
| + print('where options are:');
|
| + print(argParser.usage);
|
| +}
|
| +
|
| main(List<String> args) async {
|
| ArgParser argParser = createArgParser();
|
| ArgResults argResults = argParser.parse(args);
|
| processArgResults(argResults);
|
| - if (argResults.rest.length == 0) {
|
| - print('Usage: current_summary [options] <test-name1> [<test-name2> ...]');
|
| - print('where options are:');
|
| - print(argParser.usage);
|
| + if (argResults.rest.length == 0 || argResults['help']) {
|
| + help(argParser);
|
| + if (argResults['help']) return;
|
| exit(1);
|
| }
|
| int maxStatusWidth = 0;
|
| @@ -36,13 +47,26 @@ main(List<String> args) async {
|
| for (BuildGroup group in buildGroups) {
|
| // TODO(johnniwinther): Support reading a partially completed shard, i.e.
|
| // use build number `-1`.
|
| - for (BuildUri buildUri in group.createUris(-2)) {
|
| - print('Reading $buildUri');
|
| - BuildResult buildResult = await readBuildResult(client, buildUri);
|
| + var resultFutures = group.createUris(-2).map((uri) {
|
| + log('Fetching $uri');
|
| + return readBuildResult(client, uri);
|
| + }).toList();
|
| + var results = await Future.wait(resultFutures);
|
| + for (BuildResult buildResult in results) {
|
| + bool havePrintedUri = false;
|
| + var buildUri = buildResult.buildUri;
|
| + if (argResults['verbose']) {
|
| + havePrintedUri = true;
|
| + print('Reading $buildUri');
|
| + }
|
| for (TestStatus testStatus in buildResult.results) {
|
| String testName = testStatus.config.testName;
|
| for (String arg in argResults.rest) {
|
| if (testName.contains(arg) || arg.contains(testName)) {
|
| + if (!havePrintedUri) {
|
| + havePrintedUri = true;
|
| + print("$buildUri:");
|
| + }
|
| resultMap.putIfAbsent(testName, () => {})[buildUri] = testStatus;
|
| maxStatusWidth = max(maxStatusWidth, testStatus.status.length);
|
| maxConfigWidth =
|
|
|