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

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

Issue 2912343002: Add BuildBotClient to abstract http/logdog access (Closed)
Patch Set: 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/compare_failures.dart ('k') | tools/gardening/bin/find_timeouts.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..4155071bedbef4a3a9e59630df5219fb5dcb73bb 100644
--- a/tools/gardening/bin/current_summary.dart
+++ b/tools/gardening/bin/current_summary.dart
@@ -15,12 +15,18 @@ import 'package:args/args.dart';
import 'package:gardening/src/buildbot_data.dart';
import 'package:gardening/src/buildbot_loading.dart';
import 'package:gardening/src/buildbot_structures.dart';
+import 'package:gardening/src/client.dart';
import 'package:gardening/src/util.dart';
main(List<String> args) async {
ArgParser argParser = createArgParser();
ArgResults argResults = argParser.parse(args);
processArgResults(argResults);
+
+ BuildbotClient client = argResults['logdog']
+ ? new LogdogBuildbotClient()
+ : new HttpBuildbotClient();
+
if (argResults.rest.length == 0) {
print('Usage: current_summary [options] <test-name1> [<test-name2> ...]');
print('where options are:');
@@ -30,15 +36,14 @@ main(List<String> args) async {
int maxStatusWidth = 0;
int maxConfigWidth = 0;
- HttpClient client = new HttpClient();
Map<String, Map<BuildUri, TestStatus>> resultMap =
<String, Map<BuildUri, TestStatus>>{};
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)) {
+ for (BuildUri buildUri in group.createUris(client.mostRecentBuildNumber)) {
print('Reading $buildUri');
- BuildResult buildResult = await readBuildResult(client, buildUri);
+ BuildResult buildResult = await client.readResult(buildUri);
for (TestStatus testStatus in buildResult.results) {
String testName = testStatus.config.testName;
for (String arg in argResults.rest) {
« no previous file with comments | « tools/gardening/bin/compare_failures.dart ('k') | tools/gardening/bin/find_timeouts.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698