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

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

Issue 2993913002: Add filtering to 'summary' (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gardening/bin/current_summary.dart ('k') | tools/gardening/lib/src/util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gardening/bin/summary.dart
diff --git a/tools/gardening/bin/summary.dart b/tools/gardening/bin/summary.dart
index b3b9f3f82a3b9cf0564c6a9b1393aa5466869c86..15a77e76c60d4c424ac114eb553c111576074d42 100644
--- a/tools/gardening/bin/summary.dart
+++ b/tools/gardening/bin/summary.dart
@@ -4,12 +4,15 @@
import 'package:args/args.dart';
import 'package:gardening/src/bot.dart';
+import 'package:gardening/src/buildbot_data.dart';
+import 'package:gardening/src/buildbot_structures.dart';
import 'package:gardening/src/util.dart';
void help(ArgParser argParser) {
print('Summarizes the current status of the build bot.');
- print('Usage: summary [options]');
- print(' where options are:');
+ print('Usage: summary [options] (<group> ...)');
+ print(" where <group> is (part of) a build bot group, like 'vm-kernel', ");
+ print(" and options are:");
print(argParser.usage);
}
@@ -22,13 +25,67 @@ main(List<String> args) async {
return;
}
- var bot = new Bot(logdog: argResults['logdog']);
- var recentUris = bot.mostRecentUris;
- var results = await bot.readResults(recentUris);
- results.forEach((result) {
- if (result != null && result.hasFailures) {
- print("${result.buildUri.toUri()} has failures.");
+ Bot bot = new Bot(logdog: argResults['logdog']);
+ List<BuildResult> buildResultsWithoutFailures = <BuildResult>[];
+ List<BuildResult> buildResultsWithFailures = <BuildResult>[];
+ for (BuildGroup group in buildGroups) {
+ if (argResults.rest.isNotEmpty) {
+ if (!argResults.rest
+ .any((arg) => containsIgnoreCase(group.groupName, arg))) {
+ log('Skipping group $group');
+ continue;
+ }
}
- });
+ // TODO(johnniwinther): Support reading a partially completed shard from
+ // http, i.e. always use build number `-1`.
+ List<BuildUri> uriList = group.createUris(bot.mostRecentBuildNumber);
+ if (uriList.isEmpty) continue;
+ print('Fetching "${uriList.first}" + ${uriList.length - 1} more ...');
+ List<BuildResult> results = await bot.readResults(uriList);
+ results.forEach((result) {
+ if (result != null) {
+ if (result.hasFailures) {
+ buildResultsWithFailures.add(result);
+ } else {
+ buildResultsWithoutFailures.add(result);
+ }
+ }
+ });
+ }
+ print('');
+ if (buildResultsWithFailures.isEmpty && buildResultsWithoutFailures.isEmpty) {
+ if (argResults.rest.isEmpty) {
+ print('No test steps found.');
+ } else {
+ print("No test steps found for '${argResults.rest.join("', '")}'.");
+ }
+ } else {
+ int totalCount =
+ buildResultsWithFailures.length + buildResultsWithoutFailures.length;
+ if (argResults.rest.isEmpty) {
+ print('${totalCount} test steps analyzed.');
+ } else {
+ print("${totalCount} test steps analyzed for build bot groups matching "
+ "'${argResults.rest.join("', '")}'.");
+ }
+ if (LOG) {
+ print(' Found ${buildResultsWithoutFailures.length} '
+ 'test steps without failures:');
+ for (BuildResult result in buildResultsWithoutFailures) {
+ print(' ${result.buildUri.toUri()}');
+ }
+ } else {
+ print(' Found ${buildResultsWithoutFailures.length} '
+ 'test steps without failures.');
+ }
+ if (buildResultsWithFailures.isNotEmpty) {
+ print(' Found ${buildResultsWithFailures.length} '
+ 'test steps with failures:');
+ for (BuildResult result in buildResultsWithFailures) {
+ print(' ${result.buildUri.toUri()}');
+ }
+ }
+ }
+
bot.close();
}
« no previous file with comments | « tools/gardening/bin/current_summary.dart ('k') | tools/gardening/lib/src/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698