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

Unified Diff: tools/gardening/bin/current_summary.dart

Issue 2908403002: Add a 'bot.dart' executable to the gardening tools. (Closed)
Patch Set: Address comments. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gardening/bin/create_shard_groups.dart ('k') | tools/gardening/bin/status_summary.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « tools/gardening/bin/create_shard_groups.dart ('k') | tools/gardening/bin/status_summary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698