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

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

Issue 2944653002: Add summary command to bot. (Closed)
Patch Set: Close bot. Created 3 years, 6 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/compare_failures.dart ('k') | tools/gardening/lib/src/bot.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
new file mode 100644
index 0000000000000000000000000000000000000000..6622d488cb69ec5d30849ce446a9c44c50af715d
--- /dev/null
+++ b/tools/gardening/bin/summary.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:args/args.dart';
+import 'package:gardening/src/bot.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(argParser.usage);
+}
+
+main(List<String> args) async {
+ ArgParser argParser = createArgParser();
+ ArgResults argResults = argParser.parse(args);
+ processArgResults(argResults);
+ var bot = new Bot(logdog: argResults['logdog']);
+ var recentUris = bot.mostRecentUris;
+ var results = await bot.readResults(recentUris);
+ results.forEach((result) {
+ if (result.hasFailures) {
+ print("${result.buildUri} has failures.");
+ }
+ });
+ bot.close();
+}
« no previous file with comments | « tools/gardening/bin/compare_failures.dart ('k') | tools/gardening/lib/src/bot.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698